【发布时间】:2020-03-20 03:46:06
【问题描述】:
您好,我正在使用 Twilio,我想将调用者放在队列中。然后按顺序呼叫所有座席,如果座席拿起电话,我想将他与排队的呼叫者联系起来。
这是我目前所拥有的,但是当我打电话时,我会听到代理语音邮件。没有等待的音乐。
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Please wait while we connect you to the next available agent.</Say>
<Enqueue>support</Enqueue>
<Dial timeout="15" url="/call-queue">+100000000</Dial>
<Dial timeout="15" url="/call-queue">+100000001</Dial>
<Dial timeout="15" url="/call-queue">+100000002</Dial>
</Response>
/call-queue 的响应是
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Queue>support</Queue>
</Dial>
</Response>
我的目标是让来电者在音乐中排队等候,直到一名座席接听电话。
有什么想法吗?这是正确的方法吗?谢谢!
更新:
调用者像这样被添加到调用中
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Please wait while we connect you with the next agent.</Say>
<Enqueue>support</Enqueue>
</Response>
然后我进行 REST 调用来调用代理
twilio.calls
.create({
url: "example.com/call-queue",
from: myTwilioNumber,
to: agentNumber
})
.then(call => console.log("twilio call sid", call.sid))
.catch(error => console.log("twilio call error", error));
example.com/call-queue 只返回
<Dial><Queue>support</Queue></Dial>
【问题讨论】:
标签: twilio