I'm trying to setup a simple call forwarding app using twiml only. The process flow I'm trying to accomplish is;
- Call twilio #
- say prompt to ask for the phone number to dial
- dial to that phone number
Reading the documentation it looks fairly simply to gather the number;
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Gather action=“this is where the dial action goes” timeout="10" finishOnKey="*">
<Say>Please enter the phone number and press *.</Say>
</Gather>
</Response>
This should simply enough ask for a phone number, and log it as digits.
Next up the process should be to use dial to dial those digits, but that's where I'm a little lost. I've used dial several times, but not sure how to chain these two together.
<?xml version=”1.0″ encoding=”UTF-8″?>
<Response>
<Dial>
"the digits passed from gather"
</Number>
</Dial>
</Response>
Ideally I think it makes sense the dial command goes into the action="" section of the gather, but I'm not sure if that's doable. Any ideas on where to go from here?