TwiML for voice calls.
Example
alias Twilio.TwiML.VoiceResponse
VoiceResponse.new()
|> VoiceResponse.say("Hello!", voice: "alice")
|> VoiceResponse.gather(num_digits: 1, children: [
VoiceResponse.say_element("Press 1 for sales.")
])
|> VoiceResponse.to_xml()
Summary
Functions
Create a Client noun for use inside Dial.
Dial a phone number or SIP endpoint.
Enqueue a call.
Gather input from the caller (DTMF or speech).
Hang up the call.
Create a Number noun for use inside Dial.
Pause for a number of seconds.
Play an audio file.
Create a Queue noun for use inside Dial.
Record the caller.
Redirect to another TwiML URL.
Reject an incoming call.
Say text to the caller.
Create a Say element for use as a child (e.g. inside Gather).
Create a Sip noun for use inside Dial.
Types
@type t() :: Twilio.TwiML.t()
Functions
@spec client( String.t(), keyword() ) :: Twilio.TwiML.element()
Create a Client noun for use inside Dial.
Dial a phone number or SIP endpoint.
Enqueue a call.
Gather input from the caller (DTMF or speech).
Hang up the call.
@spec new() :: t()
@spec number( String.t(), keyword() ) :: Twilio.TwiML.element()
Create a Number noun for use inside Dial.
Pause for a number of seconds.
Play an audio file.
@spec queue( String.t(), keyword() ) :: Twilio.TwiML.element()
Create a Queue noun for use inside Dial.
Record the caller.
Redirect to another TwiML URL.
Reject an incoming call.
Say text to the caller.
@spec say_element( String.t(), keyword() ) :: Twilio.TwiML.element()
Create a Say element for use as a child (e.g. inside Gather).
@spec sip( String.t(), keyword() ) :: Twilio.TwiML.element()
Create a Sip noun for use inside Dial.