I am writing code in PHP for twilio to make it so that when I call my twilio number, it calls another number and when the user picks up it reads them a message using the say number.
How can I do this? I can't find any example of a say verb nested into a dial verb?
I tried this but it does not work as the say verb only activates after the user hangs up so I need to somehow nest the say verb into the dial verb.
<Response>
<Dial>
4166789876
</Dial>
<Say>hello monkey</Say>
</Response>
When connected via Dial
, Twilio blocks execution of further verbs until the caller or called party hangs up.
If you need a message played for the called party, you can wrap the phone number in a Number
noun and specify a url attribute:
<Response>
<Dial>
<Number url="other-script">
415-123-4567
</Number>
</Dial>
</Response>
The called party will then hear the results of the other script. During this time the caller will continue to hear ringing. Then, after the other script is complete, the two parties will be connected.
http://www.twilio.com/docs/api/twiml/number
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With