Twilio TaskRouter 不工作
Twilio TaskRouter not working
我正在使用 Twilio TaskRouter 和 Nodejs 开发联络中心应用程序。
我已经按照快速入门教程设置了所有 TaskRouter 配置,但是当我每次调用 Twilio 联系中心号码(Twilio 号码)时,呼叫被取消并在下面显示取消原因 超出最大分配 是代码。
app.post('/call', function(req, res) {
console.log('Incoming Call Center!!');
var twiml = new Twilio.TwimlResponse();
var message = "Thanks for calling support line. One of our agents will speak with you soon.";
var json = JSON.stringify({selected_type:"support"});
twiml.say(message, {
voice:'woman',
language:'en-gb'
});
twiml.enqueue({workflowSid:sid}, function(node) {
node.task(json);
});
res.writeHead(200, {
'Content-Type' : 'text/xml'
});
res.end(twiml.toString());
console.log('Outbound : ',twiml.toString());
});
app.post('/assign', function(req, res) {
var reservationSid = JSON.stringify(req.body.ReservationSid);
var taskSid = JSON.stringify(req.body.TaskSid);
console.log('Reservation SID : ', reservationSid);
console.log('Task SID : ', taskSid);
var data = JSON.stringify({
"instruction": "dequeue",
"from": fromNo
});
// dequeue a reservation
res.writeHead(200, {
"Content-Type" : "application/json"
});
//res.setHeader('Content-Type', 'application/json');
res.end(data);
});
当我使用指令作为接受时,任务分配状态显示已分配,工人也显示忙碌但没有向工人发起呼叫contact_uri.
我正在使用 Twilio 试用帐户。
我错过了什么吗?
这里是 Twilio 员工。
首先,对于这两个帖子的回复延迟,我们深表歉意。 help@twilio.com 是与我们联系的最快方式。
除了潜在的 fromNo 之外,上面的所有内容看起来都不错。我们最近更正了我们的文档以表明这不是必填字段。您可以尝试删除它吗?
https://www.twilio.com/docs/api/taskrouter/handling-assignment-callbacks#dequeue-call
我正在使用 Twilio TaskRouter 和 Nodejs 开发联络中心应用程序。 我已经按照快速入门教程设置了所有 TaskRouter 配置,但是当我每次调用 Twilio 联系中心号码(Twilio 号码)时,呼叫被取消并在下面显示取消原因 超出最大分配 是代码。
app.post('/call', function(req, res) {
console.log('Incoming Call Center!!');
var twiml = new Twilio.TwimlResponse();
var message = "Thanks for calling support line. One of our agents will speak with you soon.";
var json = JSON.stringify({selected_type:"support"});
twiml.say(message, {
voice:'woman',
language:'en-gb'
});
twiml.enqueue({workflowSid:sid}, function(node) {
node.task(json);
});
res.writeHead(200, {
'Content-Type' : 'text/xml'
});
res.end(twiml.toString());
console.log('Outbound : ',twiml.toString());
});
app.post('/assign', function(req, res) {
var reservationSid = JSON.stringify(req.body.ReservationSid);
var taskSid = JSON.stringify(req.body.TaskSid);
console.log('Reservation SID : ', reservationSid);
console.log('Task SID : ', taskSid);
var data = JSON.stringify({
"instruction": "dequeue",
"from": fromNo
});
// dequeue a reservation
res.writeHead(200, {
"Content-Type" : "application/json"
});
//res.setHeader('Content-Type', 'application/json');
res.end(data);
});
当我使用指令作为接受时,任务分配状态显示已分配,工人也显示忙碌但没有向工人发起呼叫contact_uri.
我正在使用 Twilio 试用帐户。 我错过了什么吗?
这里是 Twilio 员工。
首先,对于这两个帖子的回复延迟,我们深表歉意。 help@twilio.com 是与我们联系的最快方式。
除了潜在的 fromNo 之外,上面的所有内容看起来都不错。我们最近更正了我们的文档以表明这不是必填字段。您可以尝试删除它吗?
https://www.twilio.com/docs/api/taskrouter/handling-assignment-callbacks#dequeue-call