Question

When a Twilio number receives an incoming voice call, what TwiML can I use so that the phone continues ringing indefinitely?

In certain circumstances, I want to pretend that the phone is ringing but there's nobody around to answer it and there's no voicemail configured. I thought the Reject verb could help. It appears to support only a busy signal or a "number disconnected" message.

Was it helpful?

Solution 2

Probably the easiest way to do this is going to be to get an mp3 recording of a ringing phone, one that is very long (you can find them by googling) and setup twilio to <Play> the mp3 when someone calls it - I've done it and its very convincing.

Doing this will give you the extra benefit of letting you track who calls that number and how long they let it ring (of course you get billed for this).

OTHER TIPS

One can use the Pause verb to have Twilio delay pickup. By specifying a sufficiently long delay, the call effectively rings "forever". For example,

<?xml version="1.0" encoding="UTF-8" ?>
<Response>
    <Pause length="600"/>
    <Hangup />
</Response>

Even though this was answered a long time ago, some additional insight.

Typically, the ring time before either disconnecting or changing to busy, then disconnecting is 30-45 seconds for mobile and 60-120 seconds for a landline. Depending on the carriers, this may not apply to everyone reading this response.

Unless you use the reject function, you will pay for the duration of the Twilio call while it's ringing; so, disconnecting after about two minutes will sound normal to the caller for a non-answered/no voice mail call and will save you some Twilio money.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top