【发布时间】:2015-03-28 21:57:51
【问题描述】:
我正在使用 node.js 和 twilio 客户端。
我可以将呼叫置于保持状态并取回它,但是,只有在我将呼叫放入保持队列后等待 6 秒以断开呼叫。如果我在呼叫者处于保持队列后尝试断开网络电话,它也会断开呼叫者的连接。
function holdCall(){
console.log(callStatus);
//I am passing the agents name, and the current call status which is a boolean to the back end to modify the call so it is in a hold enqueue
socket.emit('holdCall', {agent: '{{client}}', status: callStatus});
//If the call is currently on hold it returns true and I connect the agent to their custom queue
if(callStatus){
params = {"PhoneNumber": $("#number").val(), "State": "{{client}}"};
call = Twilio.Device.connect(params);
//if the call is not currently on hold then we want the twilio client to disconnect so the call can be taken off hold.
}else{
console.log(call);
call.disconnect();
}
//switch the call status
callStatus = !callStatus;
}
如果有更好的日子来做这件事,我可以修改实时呼叫以将其重新连接到尚未断开连接的客户端,我很乐意这样做
【问题讨论】:
-
这里是 Twilio 传播者。您是否考虑过使用 TaskRouter (twilio.com/taskrouter) 为您管理呼叫的入队和出队?使用 TaskRouter,您可以将调用排入 TaskQueue。当代理(或 TaskRouter 术语中的工作人员)可用时,呼叫将分配给他们。 Twilio 将主动要求他们接受任务(例如呼叫)以及他们是否将两个呼叫连接在一起。
-
@DevinRader 如何与我们当前的流程整合。现在我们已经将所有路由都内置到我们的系统中。我们想要做的就是增加保持呼叫和恢复呼叫的能力。我们可以这样做,但 Web RTC 在呼叫者已经处于保持状态时断开连接似乎存在问题。如何将呼叫提供给代理?我们不希望它响铃,我们希望座席按下保持按钮以取消保持呼叫。您描述它的方式只会提供给下一个可用的代理,这并不是真正的保留功能
-
您如何让客户“搁置”?
-
我正在将它们移到等待队列中。这样可行。然后为了让他们离开队列,我将他们和代理移动到另一个工作正常的队列。问题是,当您将它们搁置时,它会使代理客户端保持打开 6 秒。在那 6 秒内,你无法让它们停下来。如果您让系统断开客户端与呼叫的连接,那么您可以将其取消保留。但是,如果您在客户端进入新的保持队列后尝试断开连接,它也会断开它们
-
不确定我是否完全遵循您的工作流程。介意将此发送到电子邮件吗? devin [at] twilio [dot] com.
标签: twilio