Varol
Varol

Reputation: 1858

Twilio Client taking call on hold

I am working on a voip system supposed to work like this:

i call the number like this inside twilio client:

Twilio.Device.connect({"call": num});

then store the call details in database. when twilio responds to twiml url, the databse record is updated with callsid so i can access it to modify the call.

at this point when i want to take the call on hold, on server side i use:

$client->account->calls->get($callSid)->update("CurrentUrl", 'hold.xml');

the problem is, when i run the line above. the other party disconnects and i am taken on hold music instead of him.

how can i make sure he doesnt disconnect and go on hold?

Upvotes: 2

Views: 1547

Answers (1)

ajtrichards
ajtrichards

Reputation: 30565

Have you looked at the REST API documentation?

http://www.twilio.com/docs/api/rest/change-call-state

Although, I think changing URL may change the URL for all parties... Have a look and let me know how you get on. If I have some time later I'll try and replicate.

Upvotes: 1

Related Questions