Search code examples
twiliovoicetwilio-twiml

Twilio - call routing


I have a CRM tool that salespeople use to call out. I want to set Twilio up so that they click on the icon to initiate the call in their browser, Twilio will call their cell phone and then the customers phone number after they have accepted the call on their cell. I want to do this so that the users are not forced to use their computer mic/headphones to call the customer. Does anyone know how to do this or point me to a tutorial that explains it?


Solution

  • Twilio developer evangelist here.

    That feature is known as click-to-call. There is an example application for this in the Twilio CodeExchange including example code in Ruby, Python, JavaScript, PHP, Java and .NET. There is also a tutorial in some of these languages, here is the PHP one: https://www.twilio.com/docs/voice/tutorials/click-to-call-php.

    The flow in the example application is slightly different to what you describe. In the example a user enters their phone number into a form and submits. This causes Twilio to dial the user and then the sales team. However, the theory for your use-case is the same. You just need to initiate the submission from your CRM, call your sales person first and then connect them to the user.