3

我想在更新他们在队列中的状态之前限制呼叫者听到的音乐量。

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>The average hold time is 15 seconds and you are in position 2.</Say>
    <Gather timeout="30" action="http://someURL.com?nextStep=OptOut" method="GET" numDigits="1">
        <Play>http://com.twilio.sounds.music.s3.amazonaws.com/BusyStrings.mp3</Play>
    </Gather>
    <Redirect method="GET">http://someURL.com?nextStep=Hold</Redirect>
</Response>

我正在播放的 AWESOME 音乐超过 30 秒。我希望它会在 Gather 中指定的 30 秒超时后下降到重定向,但它会播放整个 MP3,然后点击重定向。我知道我可以将 MP3 缩短到 30 秒,但我想要更灵活的东西。

谢谢并恭祝安康。

4

1 回答 1

0

你不能用 twilio 做到这一点,但你可以有一个服务,将 mp3 削减到你想要的持续时间,并给 twilio 那个 URL。会是这样的

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Say>The average hold time is 15 seconds and you are in position 2.</Say>
    <Gather timeout="30" action="http://someURL.com?nextStep=OptOut" method="GET" numDigits="1">
        <Play>http://example.com/cut?url=http%3A%2F%2Fcom.twilio.sounds.music.s3.amazonaws.com%2FBusyStrings.mp3&length=30</Play>
    </Gather>
    <Redirect method="GET">http://someURL.com?nextStep=Hold</Redirect>
</Response>

您可以查看这篇博客文章,了解如何使用 mtpsplit 或 mp3cut 来获得精彩音乐的前 30 秒。

于 2013-11-09T22:36:30.467 回答