Easy Conference Calling with Twilio

We’re running a developer contest this week centered around Twilio’s conference calling features, so I thought it would be helpful if I did a quick run through of the <Conference> verb.

Have Your People Call My People

The most straight-forward way of setting up conference calling is to drop all incoming calls into a conference using the <Conference> verb:

The name of the conference is namespaced to your account, so you can name it anything you like. Anyone dialing into “MyConference” for your account will be put in a conference room together.

We can spice up our conference room a bit using the waitUrl attribute. Set waitUrl to an audio file (like an MP3), and you can give your conference participants some music to listen to while they wait for the conference to start.

If you wanted to route incoming phone calls to different conference rooms based on something like their phone number, you would do:

If you wanted to mimic the popular conference calling solutions, you might want to ask that your participants enter a PIN before they’re allowed to join.

 

Reach Out and Call Somebody

Up until now, we’ve been handling incoming phone calls only. That is, people are only in a conference room if they dial into your Twilio phone number. Most conference systems you’ve worked with have been that model. Using Twilio’s REST API, having the conference call you is simple.

If you’ve got multiple conference calls going on, you can get a list of all the active ones:

If you wanted to get the call SIDs of the pariticpants you would add:

With the call SID of a participant, you can take fine-grained control and mute specific participants.

With all that under your belt, you’re all set to roll your own conference calling solution, or build something completely different. If you do, be sure to enter it into this week’s developer contest. You could win yourself an Amazon Kindle 3G, $100 in Twilio credit, and some awesome Twilio swag. Happy hacking!

  • Tom Martin

    Seems this example PHP doesn’t work any more since the client library has been updated? It would be nice if you went back through your old posts and cleaned them up to reflect the latest PHP API

  • Tom Martin

    Seems this example PHP doesn’t work any more since the client library has been updated? It would be nice if you went back through your old posts and cleaned them up to reflect the latest PHP API

  • Jak Rowe

    Is this post even relevant?

    • Jak, we think that the conference feature is very useful. We will update the post’s code to make sure it’s useable. We’d love to hear what technical posts you’d like to see on the Twilio blog. Shoot a note to kyleky@twilio.com

  • Can we get the XML that the PHP scripts are sending? I’m using NodeJS and I find the PHP difficult to read and understand how it maps to the Node API. If I had the XML it would be easier for me to hard code a response for testing as well as use the Node API.

  • shc

    How user will hung up call after dialing using below code?

    foreach ($participants as $particpant)
    {
    $vars = array(
    ‘From’ => ‘+15551234567’,
    ‘To’ => $participant,
    ‘Url’ => ‘http://yourserver/conference.xml’);

    $response = $client->request(“/$API_VERSION/Accounts/$ACCOUNT_SID/Calls”, “POST”, $vars);
    }