I have a mostly working chrome extension that uses the Twilio client to allow calling a number from the browser. The twilio client is too unstable to be used reliably, so I'm re-wiring the extension to just perform 'reverse click to dial', but am having trouble getting my head wrapped around the twiml flow.
Assume I have a web service that can produce twiml. Here's the call flow I want to achieve:
- Agent launches my chrome extension, and gives it a phone number to dial.
- Stored in the extension's settings is the twilio account sid,token, app sid for the twiml app/service, AND the number to connect the dialed number to, typically the agent's cell phone.
- My extension makes a request to twilio API, which in turn requests a route in my twiml app.
- some magical twiml is produced
- agent's cell phone rings
- agent answers
- he is connected to an outbound dial to the original number he was dialing
What is the simplest twiml that will accomplish this? to boil down the flow:
- agent enters number into chrome extension and clicks CALL
- agent's phone rings
- agent answers and is connected to number entered in step 1.