Reputation: 3817
I am new to twilio. I am trying to setup a phone number that rings multiple destinations. I followed this blog and set up a twiML script like so.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Number>+1-777-777-7777</Number>
<Sip>sip:[email protected];region=us2</Sip>
<Sip>sip:[email protected];region=us2</Sip>
</Dial>
</Response>
However as reported by other users in the comments this does not seem to work for scenarios where the destinations are a mix of sip and numbers. In my case only the phone number rings. The sip destinations don't receive the call at all.
Is there a way to make this work? either with bins or the new twilio functions?
Upvotes: 1
Views: 685
Reputation: 73029
Twilio developer evangelist here.
It is not possible to use multiple <Sip>
nouns in a <Dial>
. From the documentation:
Currently, only one
<Sip>
noun may be specified per<Dial>
, and the INVITE message may be sent to only one SIP endpoint. Also, you cannot add any other nouns (eg<Number>
,<Client>
) in the same<Dial>
as the SIP. If you want to use another noun, set up a callback on the<Dial>
to use alternate methods.
You could, instead, add the incoming caller to a queue with <Enqueue>
and dial each of the numbers/SIP addresses using the REST API. Then, when one connects, connect it to the call in the queue and disconnect the other calls. You'd need to keep a reference to the original call SID so that could connect directly to it and to each of the generated call SIDs so that you can terminate them with the REST API too.
Let me know if that helps at all.
Upvotes: 3