[asterisk-users] Prevent cell phone voice mail capturing call

jonas kellens jonas.kellens at telenet.be
Fri Nov 6 02:26:29 CST 2009


This comes from the book Asterisk 1.4 Professional Guide :

A practical queue
Reading the above, you may well feel that queues are pretty constrained
in their
application, however, consider this scenario—a busy executive wants any
call hitting
his desk phone to ring his desk phone, and at the same time call his
mobile/cell. You
might think it's easy ... we'll simply ring both the numbers:
     Dial(SIP/200&IAX2/${mytrunk}/07749000001)
There is no problem if the mobile is switched on and has a signal, but
if it's switched
off, guess what? It's going to go to voicemail straight away and perhaps
ring the desk
phone once or twice.

Using queues to cascade calls
In order to resolve the above situation, what we need to do is ring the
desk phone
and delay the call to the mobile so as to give the executive a chance to
answer the
phone on his desk (if he's there).
You could of course do this:
    Exten => s,1,Dial(SIP/200,10)
    Exten => s,2,Dial(SIP/200&IAX2/${mytrunk}/07749000001)
The problem with the above is that you'll get a break in the ringing, so
that if the
desk phone is picked up (just as it's going to the second priority), it
will result in
a dead call.
A neater solution is to use the queue application to kickoff multiple
calls for
you with delays where required. Look at the following example of queues
in
extensions.conf:

; Call Sales
exten => 1,1,NoOp(calling sales)
exten => 1,2,Queue(salesQ)
[Queues.conf]
[salesQ]
joinempty = yes
member => Local/*35 at call_nik_mobile
member => Local/1 at call_sales/n
member => Local/1 at call_200/n
[..extensions.conf]
[call_sales]
exten => 1,1,Dial(${SALES},30,ortT)
exten => 1,2,VoiceMail(200 at default,su)
[call_200]
exten => 1,1,wait(5)
exten => 1,2,Dial(SIP/200&SIP/201,30,ortT)
[call_nik_mobile]
exten => *35,1,wait(10)
exten => *35,2,Dial(SIP/${mytrunk}/07749600000)
exten => *35,3,Hangup()

In this example, an inbound call is routed to [salesQ].

Within [Queues.conf], we've defined three static members to call. The
queue
application executes all three of them at the same time. In essence, now
we have
three independent threads running for a single inbound call.
The net result is that the phones defined in the ${Sales} ring group are
called, and
ten seconds later, the extension 200 starts to ring. In the meantime,
the sales phones
continue to ring uninterrupted. Finally, the mobile starts to ring.
The above shows how you can stagger calls to devices without
interrupting the
ring process.


Jonas.

On Thu, 2009-11-05 at 20:25 -0600, Darrick Hartman wrote:

> Russell Horn wrote:
> > Hi,
> > 
> > I've a DID number that gets passed to three internal phones and a cell
> > phone via my outbound IAX trunk. If the cell phone is off or out of
> > coverage, its voice mail captures the call.
> > 
> > What's the best way to avoid this? Is there a recommended way to force
> > the cell phone user to press 1 before the call is passed there ala
> > google voice? Or is there another way to detect the presence of the
> > answering machine rather than a human?
> > 
> > Thanks,
> > 
> > Russell.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091106/40a3e9dc/attachment-0001.htm 


More information about the asterisk-users mailing list