设置
假设您有一个呼叫者被升级为队列。然后,您的应用程序拨打 agent ,在接听电话后,将连接到队列中的呼叫者。现在两方已被桥接或连接。
通过通过 hangup_on_star:true
to dial Verb , agent agent 能够结束按压星的呼叫。
问题
是否有一种等效的方法可以使呼叫者通过按下星星结束连接的呼叫?我希望双方都具有这种能力。
逻辑
我能想象启用呼叫者结束呼叫的唯一方法是让他们向我的twilio电话号码发送带有“ end”或“ hangup”之类的短信,然后我将拥有 到随着更新呼叫资源 状态:已完成
。
Setup
Suppose you have a caller who is enqueued into a queue. Then, your app dials an agent, who upon answering the call is connected to the caller in queue. The two parties are now bridged, or connected.
By passing hangup_on_star: true
to the Dial verb, the agent is able to end the call by pressing star.
Question
Is there an equivalent way to enable the caller to end the connected call by pressing star? I would like for both parties to have this ability.
Workaround
The only way I can imagine enabling the caller to end the call is to have them send an SMS with something like "end" or "hangup" to my Twilio phone number, and then I would have logic to update the call resource with status: completed
.
发布评论
评论(1)
首先,将呼叫呼叫
状态:已完成的
将结束呼叫,呼叫者只需挂断电话就可以做到这一点。如果您希望他们能够挂断电话,然后继续进行通话中的其他内容,那么您将无法使用直接桥梁进行此操作,例如
< dial>> number>
。取而代之的是,最好将呼叫者最初发送到a< conference> conference>
。
这样,您可以将
< conferition>
嵌套在< dial hanguponstar =“ true”>
中,让呼叫者也与Star挂起。<会议>
还支持等待音乐,如果您设置startConfereneenters =“ false”
用于呼叫者。然后,当您拨打代理时,您提供给他们的Twiml应将其引导到
< conferition>
带有startConferenceOntioner =“ true”
时,以便它们连接时他们可以立即开始与呼叫者交谈。然后,对于对话的任何一侧,您可以在
< dial>
之后再添加twiml,当他们与Star挂断电话时,他们将进入该twiml。First up, setting a call to
status: completed
will end the call, which the caller could do by simply hanging up their phone.If you want them to be able to hang up and then carry on to something else in the call then you won't be able to do this with a direct bridge like a
<Dial><Number>
. Instead, it would be better to send the caller initially into a<Conference>
.That way you can nest the
<Conference>
in a<Dial hangupOnStar="true">
and let the caller also hangup with star.<Conference>
also supports wait music if you setstartConferenceOnEnter="false"
for the caller.Then, when you dial out to the agent, the TwiML you provide to them should direct them into the
<Conference>
withstartConferenceOnEnter="true"
so that when they connect they can immediately start talking to the caller.Then, for either side of the conversation you can add further TwiML after the
<Dial>
and when they hang up with star they will go onto that TwiML.