Twilio - forward call after 2 rings

喜欢而已 提交于 2019-12-12 15:05:45

问题


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?

The XML looks like this right now:

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

回答1:


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.

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

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.

(Disclosure: Twilio employee here.)



来源:https://stackoverflow.com/questions/14807544/twilio-forward-call-after-2-rings

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!