[asterisk-users] "Follow me" with Asterisk that detects cellphone voicemail and similar announcements

A J Stiles asterisk_list at earthshod.co.uk
Thu Apr 28 10:46:37 CDT 2016

On Thursday 28 Apr 2016, Robin Kipp wrote:
> Hi all,
> sorry if the subject is a bit confusing, but I just couldn’t think of a
> good way of better describing the situation…
> Basically, I travel a lot and have several SIM cards for my phone from
> local carriers. What I’d like to do now is to setup Asterisk, so that
> people who want to reach me just have to dial one number which forwards
> the call to all my cellphone numbers in turn. I’m still pretty new to
> Asterisk, so I’m unsure which method would be most suitable for this
> scenario.
> Theoretically, I could use the dial function to call one number, then wait
> a few seconds and then dial another number. In practice, this won’t work
> because as soon as a call is answered by the mobile carrier’s voicemail
> the caller would be connected to that, no other numbers would be called.
> So here’s my question: how can I possibly avoid this situation? Is there a
> way for Asterisk to detect such situations and distinguish them from me
> actually trying to answer the call when the correct number is called? Not
> sure if this is technically possible, but figured I’d ask just in case
> there is any sort of solution. I’m aware that it would be best to simply
> use SIP and a SIP client on my phone in order to take the call, but due to
> most carriers blocking SIP traffic on their mobile data networks this
> wouldn’t work as soon as I’m not connected to any WiFi. So, in case
> there’s any solution to this problem I’d greatly appreciate if you could
> share that with me! Many thanks and best wishes,
> Robin

There is no reliable way to distinguish whether a phone was answered by a 
human being or a machine.  

If you can't just disable voicemail on all your SIMs then you will need to find 
out how long each carrier will wait before diverting to voicemail, and then 
make sure the timeouts in your Dial() statements are short enough not to 
trigger the carrier's voicemail.  Then use Asterisk's VoiceMail() application 
to record any message your caller might leave.

You can just chain a whole bunch of Dial() statements one after another within 
an extension because once the first one has been answered, execution will 
proceed to the "h" extension.

If you install ConnectBot on your mobile phone, you should be able to login to 
your Asterisk server each time you swap in a new SIM card, and edit your 
dialplan so the phone you are using today gets tried first.  This could even be 
automated, but talk of such may not be appropriate for a non-commercial list.

Out of politeness to the caller, play them a recorded announcement before your 
bank of Dial() statements, so they know to wait while your Asterisk box 
searches for you.

Finally, remember:  You will be tying up two channels -- and therefore maybe 
two DAHDI spans, depending how the calls are coming into and out of your 
Asterisk box -- with this.  


Note:  Originating address only accepts e-mail from list!  If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160428/f46030f7/attachment.html>

More information about the asterisk-users mailing list