Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twilio - forward call after 2 rings

Tags:

php

twilio

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>
like image 827
ajacian81 Avatar asked Feb 11 '13 07:02

ajacian81


People also ask

How do I forward my Twilio number to another number?

Forwarding phone calls with Twilio Studio Let's call it “message forwarding.” From the Widget Library on the right-hand side, drag a “Connect Call To” widget on to the canvas. Connect it to the Incoming Call trigger. Configure the widget to connect the call to a single number and type your cell phone number in the box.

Can you call forward to 2 numbers?

Set up simultaneously ringTap your photo, and then tap Call forwarding. On the Call Forwarding Settings screen, tap Simultaneously ring, and then select one of the following: Tap a number you've added before, such as your mobile device. Tap New Number and type in a new phone number, and then tap OK.

Can a call be forwarded automatically?

This function allows calls to be forwarded when your telephone line is busy or when you do not answer the call after a set period of time. If your telephone line is busy when the call comes in, the call forwards immediately.


1 Answers

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

like image 185
CaseySoftware Avatar answered Oct 05 '22 19:10

CaseySoftware