Dialing Multiple Numbers Simultaneously with Twilio

Yesterday, Brad Gessler asked whether he could use Twilio to simultaneously call multiple people for a call routing app.  This is a common use case, even for something as simple as a front desk phone of a small business that rings multiple people and hangs up once the first person answers.

Twilio-multi-dial-twitter-Q

Answer: YES, you can do that with Twilio.

I’m going to show you the TwiML you’ll need to
implement it.

Because the <Number> element can be nested within <Dial>, you can include multiple numbers under the same <Dial> element, like this:

<?xml version=“1.0” encoding=“UTF-8”?>

<Response>

<Dial>

    <Number>877-555-1212</Number>

    <Number>877-999-1234</Number>

    <Number>877-123-4567</Number>

</Dial>

</Response>

This command will dial all three numbers simultaneously, and the first number to answer will be connected to the call while the other two will be hung up on.

Tips & Advice When Using This Feature

A word to the wise, in the case of calling a phone that automatically goes to voicemail or an automated answering system, it’s likely the call will be picked up faster by one of these machines than any human being can answer.

If you want to offer a voicemail box as a fall back in the case that all three lines do not answer, try using a handler to determine the next step for the call based on the DialStatus, like this:

<?xml version=“1.0” encoding=“UTF-8”?>

<Response>

<Dial action=“/handleDialStatus.php” method=“GET”>

    <Number>877-555-1212</Number>

    <Number>877-999-1234</Number>

    <Number>877-123-4567</Number>

</Dial>

</Response>

When <Dial> ends, Twilio will submit to the action URL with the parameter
DialStatus with one of the following scenarios:

  • nobody picks up, DialStatus=no-answer
  • the line is busy,
    DialStatus=busy
  • he called party picked up, DialStatus=answered
  • an
    invalid phone number was provided, DialStatus=failed

Your web application can look at the DialStatus parameter and decide what to
do next.
If an action URL is provided for Dial, Twilio will always post to it, regardless of outcome of Dial.
All verbs remaining in the document will be unreachable and ignored.

Related Resources in the Twilio Documentation:

TwiML Dial Verb

Twilio REST API Call Resource

  • http://polleverywhere.com Brad Gessler

    This is awesome… we use RingCentral to do something similar for our companies phone system and I can’t stand how complicated and convoluted it is to configure everything that should be so simple.
    When I find some time I’m def. going to be playing with this!

  • http://polleverywhere.com Brad Gessler

    This is awesome… we use RingCentral to do something similar for our companies phone system and I can’t stand how complicated and convoluted it is to configure everything that should be so simple.
    When I find some time I’m def. going to be playing with this!

  • http://polleverywhere.com Brad Gessler

    This is awesome… we use RingCentral to do something similar for our companies phone system and I can’t stand how complicated and convoluted it is to configure everything that should be so simple.
    When I find some time I’m def. going to be playing with this!

  • http://polleverywhere.com Brad Gessler

    This is awesome… we use RingCentral to do something similar for our companies phone system and I can’t stand how complicated and convoluted it is to configure everything that should be so simple.
    When I find some time I’m def. going to be playing with this!

  • http://www.quickschools.com/ Fariza

    This is very helpful. Now, I am just wondering how the code will look like if I want to initiate multiple calls using the REST API (i.e. our application is to initiate calls to multiple agents)and have the calls dropped when one of the agents picks up the phone.

  • http://www.quickschools.com/ Fariza

    This is very helpful. Now, I am just wondering how the code will look like if I want to initiate multiple calls using the REST API (i.e. our application is to initiate calls to multiple agents)and have the calls dropped when one of the agents picks up the phone.

  • http://www.quickschools.com/ Fariza

    This is very helpful. Now, I am just wondering how the code will look like if I want to initiate multiple calls using the REST API (i.e. our application is to initiate calls to multiple agents)and have the calls dropped when one of the agents picks up the phone.

  • http://www.quickschools.com/ Fariza

    plus, i also want to have a one-minute delay between each outgoing call. =D

  • http://www.quickschools.com/ Fariza

    plus, i also want to have a one-minute delay between each outgoing call. =D

  • http://www.quickschools.com/ Fariza

    plus, i also want to have a one-minute delay between each outgoing call. =D

  • http://www.quickschools.com/ Fariza

    plus, i also want to have a one-minute delay between each outgoing call. =D

  • Barry Carter

    OK, but is it possible to call 3 numbers at the same time and connect all 3 of them with the caller? An instant 4-person conference call from one twilio number? If so, how

    • http://www.twilio.com Twilio

      Barry, this is possible but not something that we’ve seen anyone build yet.

      • Mr J

        How would that TwiML snippet look like? I’m actually planning on an app that will call N persons to have them into a conference quickly.

        1. An alarm goes off.
        2. A signal is sent to my server.
        3. An automatic call to N persons to host a conference with all of them.
        4. They agree who is best suited to handle the alarm in question.

      • George Friary

        Twilio, did you break this? Using two numbers or a sip and a number within a single dial only calls the top one. Dial does not simultaneously ring all numbers or sips within the dial verb. wth

  • Edward50

    This can be incredibly offensive and disrespectful to people. I get these calls often, you pick up and no one is there. So they call several numbers and the first one that picks up, they talk to and the others, oh well. That is in essence saying my time is totally worthless and their efficiency is more important. I will NEVER give to a charity that treats me that way!!!

  • Fol Justin Lacsina

    Hi, is it possible to simultaneously dial a sip account and number?

    I tried this

    +123456789
    john@someSip.com

    and

    john.buie@162.255.88.22

    +639123567996

    but its not working as i want it, either of the 2 is only reaching the call, not both.

    can you help me?

    Thanks!

    • George Friary

      I have the same problem, it seems like simultaneous dailing doesn’t work anymore. i’m trying to use two numbers or a sip and a number within a single dial and only the first number or sip gets called. Whats up twilio, did you break this????

    • Humberto

      Hi, we have the same problem, how do you solve it?

      • Devin Rader

        @georgefriary:disqus and @disqus_8RFIh8Lhh6:disqus: unfortunately, today we only support the simul-dialing of Numbers and Clients.

      • George Friary

        The only way I could solve it was by moving to plivo, which has worked flawlessly. I just logged back in to twiio 5 months later to see if my twilio ticket requesting multi sip maybe had an update, but nope. obviously people techy enough to setup something like twiio for their office use aren’t the sort of people to not have a distributed work force or not want to use SIP. I have another project im starting and plivo lacks a decent number search, so i was going to use twilio, but nope still no multi sip, so back to plivo again.

        • Humberto

          Thank you very much. I’m also checking plivo.

        • http://www.twilio.com Twilio

          Hey George, We’re sorry for that negative experience. We’d love to talk to you about the SIP roadmap, and hear your feedback. We’re here and we’re listening – kyleky@twilio.com

          • George Friary

            Negative is the wrong word. I actively use twilio for my VPS product, sending call verification codes. I was forced over to plivo for another project that needed multi sip. I am working on another one right now that needs multi sip dial, and again I checked if twilio could do it, but you can’t so i’m using plivo again. I’ll keep checking with twilio first for all my new projects. I prefer your UI and number search etc, but ultimately if the project needs sip then twilio falls short!

          • http://www.twilio.com Twilio

            George,
            Thanks for the feedback and clarification, much appreciated. Happy to hear you’re using Twilio for VPS and verification. We’d love to pick your brain about SIP and keep you updated when we roll out new features. Would you mind emailing kyleky@twilio.com?

  • Jirka Horník

    Hi all, I noticed that this feature is kinda unreliable in practice. I had Twilio dial two numbers simultaneously, but at first it only dialed one of them. Second attempt in couple of seconds was successful (both phones ringing at once), third attempt none ringing, etc. Moreover, in the log I only saw outbound call to one of the two numbers. Do you have similar experience? Is it a known bug? Is there any workaround to make it reliable?