Twilio - 响铃 2 次后转接电话 [英] Twilio - forward call after 2 rings

查看:35
本文介绍了Twilio - 响铃 2 次后转接电话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 Twilio 将来电转移到电话号码 A(假设为 416-555-1234),如果电话号码 A 占线或在响铃 2 或 3 次后没有接听,则转移到电话号码 B?

Is it possible using Twilio to forward an incoming call to Phone Number A (Assume 416-555-1234), and if Phone Number A is busy or doesn't answer after 2 or 3 rings, forwards to Phone Number B?

XML 现在看起来像这样:

The XML looks like this right now:

<xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial>
        <Number>416-555-1234</Number>
    </Dial>
</Response>

推荐答案

这里是电话网络有点奇怪的地方之一.您听到的铃声只是录音……与其他任何事物都没有同步或关系.此外,它会在网络开始连接您的呼叫后立即开始,而不是在另一端的物理设备开始响铃时开始.这更明显是国际电话,您(来电者)可能已经听到 10 次铃声,但接收器只响了一次或两次.

Here's one of the places the phone network gets a little odd. The ringing you hear is just a recording.. with no synchronization or relationship with anything else. Also, it starts as soon as the network starts connecting your call, not once the physical device on the other end starts ringing. This is more apparently calling internationally where you (the caller) might have heard 10 rings but the receiver has only rung once or twice.

无论如何,这样做的策略一点也不难.您正在寻找的是 Dial 动词上的超时参数:http://www.twilio.com/docs/api/twiml/dial#attributes-timeout

Anyway, the strategy for doing this isn't difficult at all. What you're looking for is the timeout parameter on the Dial verb: http://www.twilio.com/docs/api/twiml/dial#attributes-timeout

当计时器到期时,它会转到您指定的 TwiML.默认值是 30 秒,但我发现 15-20 秒是一个相当不错的范围,可以让前锋反应更快.

When the timer expires, it goes on to the TwiML you specify. The default is 30 seconds but I've found 15-20 is a pretty good range for a more responsive forward.

(披露:此处为 Twilio 员工.)

这篇关于Twilio - 响铃 2 次后转接电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆