开发者

twilio say verb nested into a dial verb

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
</Dia开发者_开发技巧l>
<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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜