Dial destinations in order or all at once, with a failure path
Voicesequential and simultaneous ring
Dial destinations sequentially or simultaneously, then run a failure branch if no connection succeeds.
Also called ring group, hunt group, find me follow me, failover dialing
failover
The claim
One connect verb carries the whole hunt. The connect reference describes serial as destinations “to dial in order”, each “tried sequentially”. It describes parallel as destinations “to dial simultaneously”, where “the first destination to answer is bridged and the rest are cancelled”. The to field accepts phone numbers, SIP URIs and Resource addresses; this list mixes the first two.
Why it holds
When the bridge ends, result runs against connect_result, which the reference gives as connected or failed, with connect_failed_reason carrying the “detailed reason for failure”. The failed case is the failure path, whatever the reason.
How it works
- connect:
timeout: 15
serial:
- { to: "+15550100001" }
- { to: "sip:workshop@pbx.example.com" }
- { to: "+15550100003" }
result:
case:
connected:
- play: { url: "say:Thanks for calling Ridgeline Cycles. Goodbye." }
- hangup: {}
failed:
- play: { url: "say:Nobody could take your call. Please try again later." }
- hangup: {}
result runs “once the peer leg of the call has ended”, per the reference. For connected that is after the conversation; for failed it is after the last destination fails. The parallel section dials the two phone numbers together and keeps only a failed branch.
The schema defines connect as a oneOf over four shapes: a single to, a serial list, a parallel list, or serial_parallel. A verb carrying both to and serial fails validation, which the verifier shows.
The Python surface builds the same document with SWMLService, reading the list from DESTINATIONS. The verifier asserts the two documents are equal.
Limitations
The verifier proves the document, not the dialling. On a live call, connect_failed_reason carries the detail when the connect fails; this recipe does not read it.
A queue: destination needs transfer_after_bridge, per the reference, and is not part of this list.
What to change first
Swap the first two serial entries in both surfaces and run the verifier. The order assertion fails, which is the point: the list is the hunt order, and nothing else decides it.