Skip to main content

<Dial>

Connects the inbound caller to another party — a phone number, SIP URI, or a group of numbers.

Syntax​

<Dial>+919876543210</Dial>

The content of <Dial> is the number or SIP URI to connect to.

Attributes​

AttributeRequiredDefaultDescription
callerIdNoYour ExoPhoneThe number displayed to the dialled party
timeoutNo30Seconds to wait for the dialled party to answer
timeLimitNo14400Maximum call duration in seconds
recordNofalsetrue to record the call
actionNo—URL to POST dial status to when the dial ends
methodNoPOSTHTTP method for action

Examples​

Dial a phone number​

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Connecting you to our support team.</Say>
<Dial timeout="30">+919876543210</Dial>
</Response>

Dial with recording​

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial record="true" action="https://your-app.example.com/dial-complete">
+919876543210
</Dial>
</Response>

Dial a SIP URI​

<Dial>sip:agent@pbx.example.com</Dial>

Action URL parameters​

When the dial ends (call answered and then disconnected, or unanswered), Exotel POSTs to your action URL:

ParameterDescription
DialCallStatuscompleted, busy, no-answer, failed
DialCallSidSID of the outbound call leg
DialCallDurationDuration in seconds
RecordingUrlRecording URL (if record="true")

Legs API — Dial action​

For mid-call dialling on an active Legs API leg (second leg / warm transfer):

curl -u '<api_key>:<api_token>' -X POST \
'https://cpaas-api.in.exotel.com/v2/accounts/<account_sid>/legs/<leg_sid>/actions' \
-H 'Content-Type: application/json' \
-d '{
"exoml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Flow><Dial contactUri=\"+919876543210\" exophone=\"08047491899\"/></Flow>"
}'

Legs API Dial attributes​

XML AttributeRequiredDescription
contactUriYesNumber or SIP URI to dial
exophoneYesYour ExoPhone (virtual number)
timeoutNoRing timeout in seconds

Events emitted​

EventDescription
dial_initiatedDial has started
dial_successCalled party answered
dial_terminalDial ended (completed or unanswered)

Best practices​

  • Always set action on <Dial> so you can handle post-dial flows (e.g., voicemail if no-answer)
  • Use timeLimit to prevent runaway calls; Exotel's max is 14400 seconds (4 hours)
  • For warm transfers, use the Legs API Dial action instead — it gives you gRPC events and mid-call control