<Dial>
Connect the call to a phone number, SIP endpoint or conference.
Connects the caller to another party. The destination is either the text of <Dial> (a phone number, or a SIP URI starting with sip:) or one or more nouns: <Number>, <Sip> or one <Conference>. Several <Number>/<Sip> nouns ring at the same time and the first to answer wins, or one after another with sequential=“true”; at most 10 nouns ring. A <Conference> should be the only noun. Attribute names of <Dial> are matched in any letter case. With action, SIPRTC requests action when the dialled call ends and runs the TinyML it returns instead of the rest of this document; without action it goes on with the next verb. Outbound PSTN legs need rates for the destination, and the caller ID must be a number of the account (or verified for it); otherwise the call is hung up. On demo accounts <Dial> is replaced by a spoken upgrade notice.
Examples
Section titled “Examples”<Response> <Dial callerId="+14155550123" timeout="25" record="record-from-answer" action="https://example.com/dial-done"> <Number>+14155550100</Number> <Sip username="alice" password="secret">sip:alice@pbx.example.com</Sip> </Dial></Response><Response> <Dial>+14155550100</Dial></Response>Content
Section titled “Content”The element’s text is its value (see the description above).
Attributes
Section titled “Attributes”| Attribute | Values | Default | Description |
|---|---|---|---|
action |
An absolute http:// or https:// URL | — | URL requested when the dialled call ends; its TinyML continues the call. When set, verbs after <Dial> are not executed. |
method |
GET, POST |
POST |
HTTP method for action. |
callerId |
string | the calling party |
Caller ID (number) presented to the dialled party. For phone numbers it must be a number of the account or a verified caller ID; when it is not, SIPRTC falls back to the call’s caller ID or From and hangs up (CallerId_Not_Whitelisted) if none is valid. |
displayName |
string | the caller ID |
Caller name presented to the dialled party. |
timeout |
integer ≥ 0 | 30 |
Seconds to let the dialled party ring before giving up (DialCallStatus no-answer). |
timeLimit |
positive integer | 14400 (4 hours) |
Maximum seconds the dialled call may last once answered. |
answerOnBridge |
true or false, in any letter case | false |
true keeps an inbound caller unanswered (hearing ringback as early media) until the dialled party answers, so billing starts at the bridge. Default false answers the caller before dialling. |
hangupOnStar |
true or false, in any letter case | false |
true lets the caller press * to drop the dialled party; the caller’s document then continues. |
sequential |
true or false, in any letter case | false |
true rings the nouns one after another, in document order, each for timeout seconds; false rings them all at once. |
ringTone |
A two-letter country code (the national ringback tone) or the http(s) URL of an audio file to play instead | a US-style ring |
Ringback the caller hears while the dialled party rings: a country code (us, uk, in, de, …) or the http(s) URL of an audio file. |
record |
true, false, do-not-record, record-from-answer, record-from-ringing, record-from-answer-dual, record-from-ringing-dual |
false |
Record the dialled call. The account’s recording policy can refuse it; the call is then dialled without recording and recordingStatusCallback receives RecordingStatus absent. |
recordingTrack |
both, inbound, outbound |
both |
Which audio the recording keeps. |
recordingStatusCallback |
An absolute http:// or https:// URL | — | URL notified as the recording’s status changes. |
recordingStatusCallbackMethod |
GET, POST |
POST |
HTTP method for recordingStatusCallback. |
recordingStatusCallbackEvent |
A space- or comma-separated list of event names | completed |
Which recording events to send: in-progress, completed, absent. |
callReason |
string | — | Accepted and ignored. Accepted; currently has no effect on a dialled call. |
trim |
string | — | Accepted and ignored. Accepted; currently has no effect on a dialled call. |
Nested elements
Section titled “Nested elements”| Element | Description |
|---|---|
<Number> |
A phone number to dial. |
<Sip> |
A SIP endpoint to dial. |
<Conference> |
A conference room to join. |
Callback parameters
Section titled “Callback parameters”Sent to action:
| Parameter | Description |
|---|---|
DialCallStatus |
Outcome of the dialled call: completed, busy, no-answer, failed or canceled; answered when a conference participant leaves. |
DialCallSid |
Call id of the dialled leg. |
DialCallDuration |
Seconds the dialled leg was connected. |
DialHangupDisposition |
Which side ended the dialled leg (SIP hangup disposition, e.g. recv_bye, send_bye). |
RecordingUrl |
The recording of the dialled call, when record was set. |
Sent to recordingStatusCallback:
| Parameter | Description |
|---|---|
RecordingSid |
Unique id of the recording. |
RecordingUrl |
Where the recording can be fetched (MP3). |
RecordingStatus |
in-progress, completed or absent. |
RecordingDuration |
Length in seconds. |
ErrorCode |
Set when the recording policy refused the recording. |
- action also receives the standard call parameters of the calling leg.