简体   繁体   中英

Twilio - forward call after 2 rings

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>

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.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM