7

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.

Alex Baban
  • 11,312
  • 4
  • 30
  • 44
mndrix
  • 3,131
  • 1
  • 30
  • 23

3 Answers3

9

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>
mndrix
  • 3,131
  • 1
  • 30
  • 23
  • 1
    I confirm, with the phone will ring for 10 minutes if the carrier does not stop it. Also, Twilio will still charge you for the call. – Alex Baban May 27 '16 at 04:24
  • 1
    Wow - like 5 years old, and nobody talks about the Pause verb to put a call on hold (which is working perfect for me), but when I try to redirect the call - I get an error that it can't redirect, as the "Call is not in-progress".... How do you handle a call that is on hold with the Pause verb then? – codeputer Dec 15 '19 at 21:17
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).

Megan Speir
  • 3,745
  • 1
  • 15
  • 25
E.J. Brennan
  • 45,870
  • 7
  • 88
  • 116
0

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.

tcbeaton
  • 85
  • 7