Can outbound calls be made through Twilio TaskRouter

痞子三分冷 提交于 2019-12-12 02:15:31

问题


Currently we have a call center application that is built on Twilio Client for JavaScript (for the WebRTC call handling capabilities) and we have started to use Twilio TaskRouter for managing the workflows of incoming calls. We have incoming calls properly being routed to our TaskRouter Workers using the Twilio Client WebRTC client. We previously had outbound calling working through the Twilio Client library in our JavaScript client and this worked well. Now that Twilio TaskRouter has been added to the mix and there's the concept of current Worker activity, our outbound calls never actually dial out to an external phone number.

The TaskRouter documentation for assignment callbacks seems to suggest that outbound calling is quite doable using Twilio TaskRouter, but the documentation seems to frame the use cases to outbound calls from one WebRTC client to another WebRTC client using Twilio Client. We want to create an outbound call from a Twilio Client WebRTC worker to an external phone line (e.g. calling back a customer). I'm pretty sure this use case is supported within the realm of Twilio TaskRouter, but I was hoping others have definitive documentation to support how to perform that scenario.


回答1:


Twilio developer evangelist here.

You're right, the documentation does show an outbound call being made from client to client, however calls to an external phone are certainly possible.

I believe you are referring to this "call" JSON response from the docs:

{
  "instruction": "call",
  "to": "client:jenny",
  "from": "+15558675309",
  "url": "http://example.com/agent_answer",   
  "status_callback_url":
    "http://example.com/agent_answer_status_callback"
}

All you would need to do to change that to call a number is replace "client:jenny" with the number you wish to call.

{
  "instruction": "call",
  "to": "+15551234567",
  "from": "+15558675309",
  "url": "http://example.com/agent_answer",   
  "status_callback_url":
    "http://example.com/agent_answer_status_callback"
}

Let me know if that helps.



来源:https://stackoverflow.com/questions/42609952/can-outbound-calls-be-made-through-twilio-taskrouter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!