问题
I am trying to create an interactive dashboard that will display active Twilio calls with the ability to listen in on any call in progress.
The documentation seems to point me at Conferences, but I don't want to have to initiate every call in my organization as a conference, and would rather covert the call if possible. This also has to be seamless - the parties to a call should not experience any delays or pauses just because someone is listening in.
What are my options?
回答1:
Generally it is best practice to establish a <Conference> from the beginning if that's where the call is headed.
When you use <Dial>
to join two calls together, they are in a parent-child relationship. The first call that you created is the parent, the call that is created by the <Dial action="foo.com">
is the child. You can split the calls by modifying the child call to a different URL.
If you just modify the parent, the child will hang up.
Modifying the child will cause the calls to split, the child will execute the TwiML specified by the modify call request. The parent call post to your "action" and will then begin to execute the TwiML at "foo.com". I'm looking into your calls that dropped and trying to understand why that happens, you should not get a call drop from pulling the child away from the parent, this is the correct way to convert a <Dial>
call to a <Conference>
.
Hope this is helpful.
来源:https://stackoverflow.com/questions/37953278/listen-in-on-a-live-call-in-twilio