Dial
DialAction connects the caller to one or more numbers/SIP endpoints. Number/SIP URIs are subject to the same destination authorisation as POST /v1/calls.
DialAction connects the caller to one or more numbers/SIP endpoints. Number/SIP URIs are subject to the same destination authorisation as POST /v1/calls. URL must be on the allow-list when dialling SIP.
| Parameter | Type | JSON key | Required | Description |
|---|---|---|---|---|
Number | string | number | No | Number is a single E.164 destination to dial. Use Numbers instead for fan-out to more than one. Exactly one of number, numbers or sip is required. |
Numbers | []string | numbers | No | Numbers is the fan-out list of E.164 destinations — the PBX <Dial> verb tries them per its own contract. Rendered into the phoneNumbers attribute as a delimited list. Mutually exclusive with Number and SIP. |
SIP | string | sip | No | SIP is the SIP destination to dial (e.g. "sip:alice@example.com"). Mutually exclusive with Number/Numbers. Rendered into the same phoneNumbers attribute as Number/Numbers — the PBX dispatches on identity and has no separate SIP element. It used to render as a nested <Sip> child element, a Twilio shape this PBX never parsed, so anything set here was silently unroutable. |
CallerID | string | callerId | No | CallerID is the caller ID presented to the callee. Optional. |
Timeout | int | timeout | No | Timeout is the number of seconds to ring before giving up. |
Record | string | record | No | Record requests recording of the connected leg ("record-from-answer", "record-from-ringing", etc.). Optional. |
Sequential | *bool | sequential | No | Sequential rings destinations in order (PBX advances on no-answer/busy per Timeout) when true, all at once when false. Nil ⇒ attribute omitted (PBX default). Pointer so an explicit false is distinguishable from unset. |
FirstAnswerWins | *bool | first_answer_wins | No | FirstAnswerWins bridges the first answered leg and cancels the rest. Nil ⇒ attribute omitted. Rendered as the firstAnswerWins attribute. |
import { sauti } from "@sautikit/node";
res.json(sauti.dial({
number: "+254712345678",
callerId: "+254200000001",
timeout: 30,
record: "true",
}));{
"actions": [
{
"dial": {
"number": "+254712345678",
"callerId": "+254200000001",
"timeout": 30,
"record": "true"
}
}
]
}<Dial callerId="+254200000001" timeout="30" record="true"><Number>+254712345678</Number></Dial>