4

如何使用(最好)TwiML XML 文件在通话中播放音乐?我已经做到了:

<!-- page located at http://example.com/simple_dial.xml -->
<Response>
<Dial>PHONE NUMBER</Dial>
<Play>
AUDIO FILE URL
</Play>
</Response>

但它会等到电话号码挂断才能播放音频。如何拨打电话号码,然后在通话中播放mp3?

4

1 回答 1

2

Initiate a new call via the REST API, using a URL that returns the following TwiML:

<Response>
    <Play>AUDIO FILE URL</Play>
</Response>

Here's a quickstart tutorial that talks through the process of making an outbound call with the PHP helper library. It's equally easy with the libraries in the other languages as well.

于 2012-01-24T01:41:49.983 回答