将 Twilio 呼叫移至会议室 [英] Move Twilio call to a conference room

查看:39
本文介绍了将 Twilio 呼叫移至会议室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将通话的双方同时转移到会议室?

How do I move the two parties involved on the call to a conference room at the same time?

我通过 Web SDK 开始调用,因此调用从 元素开始.

I started the call through the Web SDK, thus the call started from a <Dial> element.

现在我有 ParentCallSidChildCallSid 来识别每一方.

Now I have the ParentCallSid and ChildCallSid to identify each party.

但是使用 Twilio 的 PHP 库,我似乎无法找到如何同时将双方移动到新 URL(这将开始会议).

But using the Twilio's PHP library, I can't seem to find how I can move both parties to a new URL (which would start the conference) at the same time.

如果我尝试一次只移动一个,当我移动一方时,Twilio 会挂断另一方,可能是因为它被单独留在了通话中.并且我搬家的一方成功转入会议.

And if I try to move only one at a time, the moment I move one party Twilio hangs up the other party, probably because it was left alone on the call. And the party I moved is successfully transferred to the conference.

Twilio 的文档 没有这样做的例子.我试过传递一个数组,传递一个用空格分隔的字符串,链接 calls() 方法,但没有运气.也找不到该方法的文档.

On Twilio's docs there's no example of doing it. I've tried passing an array, passing a string separated with spaces, chaining the calls() method, but no luck. Couldn't find the docs of that method as well.

推荐答案

Twilio 布道者在这里.

Twilio evangelist here.

认为最好的选择是将它们放在 ; 如果可以的话,在通话开始时.这样做非常简单.您在会议中挂断来电,然后使用 REST API 向第二方发起去电.当他们回答时,您将他们放到同一个会议中.

Think the best option would be to just put them in a <Conference> at the start of the call if you can. Doing that is pretty simple. You drop the incoming call in the the conference, then using the REST API, you initiate the outgoing call to the second party. When they answer you drop them into the same conference.

如果这不是一个选项,您需要做的是使用 REST API 将每个呼叫段重定向到会议中.重定向可让您告诉 Twilio 去获取一组新的 TwiML 以针对特定的调用 SID 执行.在您的情况下,您希望 TwiML 类似于:

If that's not an option, what you'll need to do is use the REST API to redirect each call leg into the conference. Redirect lets you tell Twilio to go get a new set of TwiML to execute for a specific call SID. In your case you want that TwiML to be something like:

<Response>
    <Dial>
        <Conference>BrayansBestConferenceEvar</Conference>
    </Dial>
</Response>

查看我们文档中的修改实时通话以了解更多信息信息.

Check out Modifying Live Calls in our docs for more info.

希望有所帮助.

这篇关于将 Twilio 呼叫移至会议室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆