Twilio - 如何将现有呼叫转移到会议 [英] Twilio - How to move an existing call to a conference

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

问题描述

使用 twilio,在现有呼叫(2 条支路 - 主叫方支路和被叫方支路)中,我想将呼叫转移到会议室.双腿必须出现在房间里如何在不失去一条腿或另一条腿的情况下桥接双腿?

With twilio, on an existing call (2 legs - caller leg and called leg), I want to move the call into a conference room. Both legs have to be present into the room How to bridge the both legs without losing one or the other leg ?

谢谢

问候

推荐答案

防止掉线的诀窍是使用action" url让父分支拨入会议并修改子分支在同一个会议中移动.

The trick to prevent the call being dropped is by using "action" url for parent leg to dial into conference and modifying the child leg to move in the same conference.

这是在 2 人之间开始通话然后将其升级为会议的详细流程

Here’s the detailed flow to start calls between 2 person and then upgrade that to a conference

(1) 创建一个 TwiML 响应 API 以在会议中拨打电话(基于适合您的业务逻辑).这是一个简单的示例 TwiML (http://www.mocky.io/v2/584ac0f81000002b14fb0205)/p>

(1) Create a TwiML Response API to dial calls in conference(based suited to your business logic ) . Here’s a simple example TwiML (http://www.mocky.io/v2/584ac0f81000002b14fb0205)

<Response>
<Dial>
<Conference>letItGoSimple</Conference>
</Dial>
</Response>

(2) 当您发起呼叫时,您的 Url 参数应设置为返回 TwiML,如下所示(例如 Twiml:http://www.mocky.io/v2/584ac8a3100000c914fb0214 )

(2) When you initiate the call , your Url parameter should be set to return TwiML like the one below (example Twiml : http://www.mocky.io/v2/584ac8a3100000c914fb0214 )

<Response>
<Dial action="http://www.mocky.io/v2/584ac0f81000002b14fb0205" method="GET">
<Number>+44xxxxxxxx</Number>
</Dial>
</Response>

请注意,action 网址已从第一步设置为 TwiML.在此流程中非常重要,因为这将防止在您修改呼叫的子支路时掉线.

Note that the action url has been set to TwiML from step one . It is very important in this flow as this would prevent the call from being dropped when you modify the Child Leg of the call .

(3)执行第2步后,双方直接通话(不开会)

(3) After step 2 is executed, the two parties would be on a direct call (no conference)

(4) 当您想将呼叫升级到会议时,将 Url 设置为 Twiml 以 POST 到子呼叫 SID 以拨入会议,

(4) When you want to upgrade the call to a conference , POST to the child call SID with Url set to Twiml To Dial into conference ,

Example : 
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxx/Calls/CAyyyyyyyyyyyyyy -d "Url=http://www.mocky.io/v2/584ac0f81000002b14fb0205" -d "Method=GET"  -u ‘accountSID:authToken'

修改调用的子段很重要.

(5) 这是执行第 4 步时会发生的情况

(5) Here is what will happen when you execute step 4

  • 子呼叫将被重定向到 URL 并被拨入会议
  • 家长呼叫将采取行动,并将在同一个会议中拨打

希望这会有所帮助.

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

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