Twilio twiml:在呼叫转移期间保持音乐

Twilio twiml: Hold music during call transfer

具有循环 0 值的播放动词是否会导致音乐一直播放到呼叫接通?

https://www.twilio.com/docs/api/twiml/play

这里是 Twilio 开发人员布道者。

实际上,在这种情况下,您希望在拨打代理时让您的用户排队。您可以这样做:

首先,当您收到来电时,您可以使用 <Enqueue> that directs a user into a queue. You can set a waitUrl attribute 进行响应,这允许您定义将在用户等待接听电话时播放的音乐文件或 TwiML。

<Response>
  <Enqueue waitUrl='/wait-music'>incoming</Enqueue>
</Response>

当您的来电者正在等待时,您可以开始 making calls to your agents using the REST API. Once an agent connects and accepts the whisper you would then join the calls by dialling the <Queue>

<Response>
  <Dial><Queue>incoming</Queue></Dial>
</Response>

使用此方法,您需要维护您的用户是否已得到答复,并手动处理是否redirect their call from the queue to more TwiML to <Record> 语音邮件。

有一种更强大的方法来设置所有这些。它仍然需要首先排队,但您应该以 TaskRouter. It's an automated call distribution service with configurable workflows. There's a bit more setup involved on the Twilio side, but TaskRouter will handle directing calls to your agents and allow you to define rules for how to handle a user who's been waiting too long. I recommend you check out the TaskRouter documentation and then take a look at the quickstart guide 为例。

如果有帮助请告诉我。