本文介绍了尝试保持通话,然后检索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何保持实时通话?

尊重这一点,

我使用的是 Javascript SDK.

I'm using Javascript SDK.

如何使用 Twilio.Device 或 Twilio.Comunication 保持实时通话?

How can put on hold a live call with Twilio.Device or Twilio.Comunication?

例如:

  • 客户致电公司.

  • Customer phones to Company.

公司代理人响应电话

代理和客户在讲话

座席保持通话

客户听到声音

座席再次加入通话以继续发言

Agent is joins again on the call to continue speaking

通话结束

我希望我已经很好地解释了自己

I hope I've explained myself well

对不起我的英语!

谢谢

推荐答案

Twilio 布道者在这里.

Twilio evangelist here.

无法直接从 Javascript SDK 中保持"呼叫.您可以做的是将正在进行的呼叫重定向到一组新的 TwiML,它提供保持"体验,例如播放音频文件或将呼叫放入队列中.

There is no way to put a call "on hold" directly from the Javascript SDK. What you could do is redirect the ongoing call to a new set of TwiML which provides an "on hold" experience like playing an audio file, or putting the call into a Queue.

我们有一个 Twimlet,可以在这里循环播放音频文件作为保持"体验:

We have a Twimlet that provides the ability to loop over an audio file as a "hold" experience here:

https://www.twilio.com/labs/twimlets/holdmusic

作为一个例子,你可以使用一些看起来像这样的 TwiML:

As an example doing this, you would use some TwiML that looks something like this:

<Response>
    <Say> Thank you for calling, a representative will be with you shortly</Say>
   <Play loop="100">http://www.mydomain.foo/hold-music.mp3</Play>
</Response>

这将无限循环.要将呼叫者移回保持状态,您可以使用 REST API 重定向呼叫:

This would loop indefinitely. To move the caller back out of hold, you use the REST API to redirect the call:

POST https://api.twilio.com/2010-04-01/Account/{YourAccountSid}/Calls/{WaitingCallersCallSid}
CurrentUrl=http://www.example.com/dial-representitive

这些示例包含一篇博文中的代码,可引导您完成此场景:

Those samples contain code from a blog post that walks you through this scenario:

https://www.twilio.com/blog/2009/09/call-queueing-putting-callers-on-hold-call-redirect-new-url-new-feature.html

希望有所帮助.

这篇关于尝试保持通话,然后检索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 16:58