2

I have made a web application with Twilio Client javascript library. The call start from the browser and is direct to a real phone number: all works fine.

The question is: is possible to create another web page that can connect to the above call and listen the conversation of the two users?

Thanks. Alex

Alex
  • 163
  • 11

1 Answers1

3

To do this you will want to send the initial two calls to a conference, and then have your new web page also connect to that conference.

https://www.twilio.com/docs/api/twiml/conference

If this happens a lot, you can just have all of your calls running through conferences, and keep a list of conferences that can be joined by your new web page.

If this is infrequent, you can use the rest api to modify the calls in progress:

https://www.twilio.com/docs/api/rest/change-call-state#redirect-a-running-call-to-a-new-url

Grab the SIDs, redirect them to a URL that dials a conference, then join that conference with your new web page.

Progone
  • 236
  • 1
  • 5
  • I understand the second case (modify the calls in progress) but I don't understand the first case: can I combine NUMBER and CONFERENCE verbs in DIAL? – Alex Jul 09 '16 at 15:20
  • In the second case (modify the call in progress), the two users will notice the change or will enter in the conference in "silent mode"? – Alex Jul 09 '16 at 15:31
  • For your first question, see http://stackoverflow.com/questions/29903765/is-there-a-way-we-can-dial-two-numbers-and-make-them-join-a-conference, basically dial the number and on connect send them to the conference. For your second question, you can disable the beep on join/leave so it is silent observation: https://www.twilio.com/docs/api/twiml/conference#attributes-beep – Progone Jul 09 '16 at 19:34
  • Thanks for your help Progone, I have a last question: if the call started from the browser (with Twilio Client Javascript API), I don't have the same parameters of REST API call. So I can't use the solution of first case, correct? – Alex Jul 10 '16 at 10:28