Im trying to find a way to return information when placing an outgoing call through the twilio softphone in the browser.
When I place an outgoing call my application invites the remote party to a conference room throught the rest api, and the agent is invited to that same conference room through the returned twiml, so its not really a direct call.
I need a way to let the person in the soft phone know the reason why the call got disconnected like because the remote was busy, his number was disconnected, its a non US number, etc.
I dont want to save temp messages and retrieve them from the server to the softphone through a heartbeat or similar, so I want to know if there is a way to pass this information trough twilio itself or what other option I could use.
I'm using php and https://static.twilio.com/libs/twiliojs/1.2/twilio.min.js
Twilio evangelist here.
So just to be clear, Bob is making an inbound call via Twilio Client for JavaScript which is dropped into a Conference. Then your app makes an outbound call to Alice via PSTN and idealy she is dropped into that same Conference. If you can't connect to Alice, you want to let Bob know why.
If I've understood that correctly, there isn't a way to tell Bob directly through about Alices status. What you can do is use the StatusCallback parameter to Alices call to have Twilio tell you what the status of the call to her was and then using something like socket.io, send that message back to Bobs browser.
We actually just introduced a new feature called Call Progress Events that give you even more granular info about the state of an inprogress call.