Someone on the Twilio forums was interested in the same question , and currently the answer is that there is no direct call to the REST API for this.
What you will need to do when a participant joins the conference, you will use the REST API to make Twilio back to your application . You can choose how to determine that you are calling your conference as you like (for example, comparing outgoing and incoming phone numbers for equality); as soon as you discover this, you can join this call directly to the conference and use the TwiML <Say> and <Play> verbs to reproduce the introduction for everyone.
This is a bit confusing, but in this way you do not remove each participant from the conference (so that they do not hear each other for a moment), and then reunited with them.
Here's something like a good end-to-end solution.
First, the user dials a number, and you look at the standard prompts to get a PIN for the conference room and their name.
<?xml version="1.0" encoding="UTF-8"?> <Response> <Gather action="/conference/pin" finishOnKey="#"> <Say>Please the conference pin number followed by the pound key.</Say> </Gather> </Response> <?xml version="1.0" encoding="UTF-8"?> <Response> <Say>Say your name and then press the pound key.</Say> <Record action="/conference/name" finishOnKey="#" /> </Response>
Now, as soon as you have a user record and a record, two things will happen; the response from the message to /conference/name will contain the verb <Conference> , placing the user in the room:
<?xml version="1.0" encoding="UTF-8"?> <Response> <Dial> <Conference>{conference ID}</Conference> </Dial> </Response>
... and, asynchronously to this, it will use the REST API to initiate a new call back to the conference room.
POST /2010-04-01/Accounts/{AccountSid}/Calls From = {your conference phone number} To = {your conference phone number} SendDigits = wwww{conference PIN}
Now the next bit is getting confused. Twilio will now talk to your callback URL for the incoming end of the call and the above URL for the outgoing end of the call. Your incoming call handler will need to detect that the conference line is returning and behaving differently; First you need to answer with a simple TwiML, which allows the outgoing end of the call to enter a contact for the conference room.
<?xml version="1.0" encoding="UTF-8"?> <Response> <Gather action="/conference/announce-pin" finishOnKey="#" /> </Response>
The SendDigits POST parameter SendDigits provide the digits that the TwiML bit expects. This action should then be answered by the conference on a new call.
<?xml version="1.0" encoding="UTF-8"?> <Response> <Dial> <Conference>{conference ID}</Conference> </Dial> </Response>
The final piece of the puzzle is TwiML, emitted by the URL specified in the POST. That markup, which will run after the loopback call, will be added to the conference.
<?xml version="1.0" encoding="UTF-8"?> <Response> <Play>/conference/name-recordings/{name ID}</Play> <Say>has joined the call.</Say> <Hangup /> </Response>
This markup starts up, plays back the caller’s name and message in the conference room, and then hangs up.