We are building a custom phone system (PBX) on twilio.
When a caller calls in, a few recordings are played and then we have a dial verb. Within the dial verb can be one or more <number>
nouns, which allow us to create 1 or more calls depending on the need (ring group).
When one of the numbers answers, and is connected I need to be able to put in a GATHER verb so that the person answering the phone, can easily transfer the caller to another predetermined extension. Ideally, they would just be able to tap in 100# and the caller would be disconnected and the transferred to extension 100.
How do I accomplish this?
I have the following so far, but it seems I cannot nest Gather inside of anything else, so I am at a loss as to how to accomplish what I need.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Play>http://example.com/thankyouforcalling.mp3</Play>
<Play>http://example.com/anothermessage.mp3</Play>
<Play>http://example.com/connecttosales.mp3</Play>
<Dial action="inboundcomplete" record="true" timeout="90">
<Number>555-555-1211</Number>
<Number>555-555-1210</Number>
</Dial>
</Response>
Any help on this would be great!