I am basically using twilio for creating conference call, usually the call is of about 30 minutes. Is it possible to play a warning message to conference call which say : Warning, Your 30 minute call is about to end after 5 minutes. I want to give the warning message after 25 minutes of call start and I also want to give warning message to all the participate in conferences. I would be grateful if someone refers me to that part of documentation.
Asked
Active
Viewed 236 times
1 Answers
2
Twilio developer evangelist here.
There is no built in timing system for conferences on Twilio, though you could build your own.
What you would need to do is, when your conference starts, schedule a job to run 25 minutes later. That job would need the SID for the Conference.
Then, in the job you would use the REST API to look up the participants in the conference, if there are any remaining, use the REST API again to redirect their calls (by updating the call with a URL) to a piece of TwiML that would read out your 25 minute warning and then direct them back into the conference to finish up.
The TwiML would look a bit like:
<Response>
<Say voice="alice">Warning, Your 30 minute call is about to end after 5 minutes</Say>
<Dial>
<Conference>YOUR_CONFERENCE_SID</Conference>
</Dial>
</Response>
Let me know if this helps at all.

philnash
- 70,667
- 10
- 60
- 88
-
i have tried the above method and it work for me, but i am unable to add call to the conference. It say particular phase and then hang up – ajay p Dec 18 '15 at 11:18
-
That is my fault @ajayp, sorry. The `
` should live in a ` – philnash Dec 18 '15 at 11:19`. I've edited the code in my answer. Try now. -
It work for me, one more thing, i have used $call = $client->account->calls->get('CAd465170bd847557ea3c0d3a7a4073c3d'); $call->update(array( "Url" => "http://test.talktoanexpertinc.com/counselor/profile/addwarningincall", "Method" => "POST" )); Using this i am able to update call but only for one participate, is it possible to use multiple participate at same time ? – ajay p Dec 18 '15 at 11:26
-
You would need to iterate over all the participants in the conference and make that call for each of them. There's no way to do that in one API call I'm afraid. – philnash Dec 18 '15 at 11:53
-
now in this i want to hangup a call after 2 minutes (120 second, for that i am trying)
, but it is not working for me – ajay p Jan 06 '16 at 12:56 -
Timeouts on Dial is for how long it should ring for, not how long the call lasts. You'd need to use the same scheduling process I suggested for your previous question, but hanging up instead of redirecting. – philnash Jan 06 '16 at 12:59