[英]How can I accept reservation programmatically once reservation.created callback event fired in twilio task route?
1) How can I manage different instruction in single callback URL using asp.net mvc Library? 1)如何使用asp.net mvc库在单个回调URL中管理不同的指令?
--> Task created using enqueue. ->使用入队创建的任务。 I have placed dequeue instruction in Assignment callback url but how can I manage once task is created and reservation is created.
我已经将出队指令放置在Assignment回调URL中,但是一旦创建任务并创建保留后如何管理。 How can accept reservation using reservation Id and place a call to twilio client ?
如何使用预订ID接受预订并致电twilio客户?
public ActionResult Assignment()
{
var response = new
{
instruction = "dequeue" ,
post_work_activity_sid = Singleton.Instance.PostWorkActivitySid
};
return new JsonResult() { Data = response };
}
Any suggestions will be useful 任何建议都会有用
Thanks 谢谢
The dequeue response to the assignment callback, will automatically place a call to the to the selected worker. 对分配回调的出队响应,将自动向选定的工作程序发出呼叫。 For this it needs the number, which can be provided in either of these 2 ways:
为此,它需要数字,可以通过以下两种方式之一提供:
{
"instruction" "dequeue",
"to": "+14151112222",
"from": "+18001231234",
"post_work_activity_sid": "WA0123456789abcdef0123456789abcdef"
}
Here number is explicitly provided, this can be the number of the selected worker. 此处明确提供了编号,该编号可以是所选工作人员的编号。 Alternatively, contact_uri can be added in the worker attributes, and skip 'to' parameter above.
或者,可以在worker属性中添加contact_uri,并跳过上面的“ to”参数。 In that case, call will be placed automatically to the contact_uri
在这种情况下,呼叫将被自动发送到contact_uri
This is outlined at https://www.twilio.com/docs/api/taskrouter/handling-assignment-callbacks 在https://www.twilio.com/docs/api/taskrouter/handling-assignment-callbacks中对此进行了概述
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.