Callback service on the website using Twilio

ⅰ亾dé卋堺 提交于 2019-12-12 04:22:03

问题


Let's say I need to implement a callback service on a website. I'm curious if it's possible to develop it using Twilio.

For example, if a website visitor provides his mobile phone number from one side, from another side I have a manager using his web CRM application. Is it possible to:

  1. Make a call (using WebRTC?) to a manager
  2. When the manager replies the incoming call, call to the website visitor (on his mobile phone)
  3. Connect both sides together

I know there are lots of ready-to-use callback services, I'm just curious how it works under the hood.


回答1:


Twilio developer evangelist here.

This is a feature we call Click to Call. Here's how it would work with Twilio:

  1. The visitor provides his number through a form on the site
  2. Generate a call to the manager using the Twilio REST API
  3. When the call connects to the manager, dial the visitor.
    • This is achieved using TwiML
    • Whent the call connects, Twilio makes an HTTP request to a URL you provide in step 2
    • That URL needs to respond with TwiML, which is a subset of XML to tell Twilio what to do with the call
    • In this case the TwiML would be to <Dial> the visitors number
  4. When the visitor answers the two are connected

This is a high level view of it, we also have a tutorial walking you through Click to Call with Twilio (this is the Python version, but there are others available too) which I recommend you take a look at.

Let me know if this helps at all.



来源:https://stackoverflow.com/questions/41232238/callback-service-on-the-website-using-twilio

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