[asterisk-users] Multiple phones when one is unregistered

D'Arcy J.M. Cain darcy at Vex.Net
Tue Aug 30 10:31:36 CDT 2016

On Tue, 30 Aug 2016 10:39:14 -0400
Eric Wieling <ewieling at nyigc.com> wrote:
> The dialplan below cannot go to voicemail, either something else is 

Of course not.  It's the individual extensions that have voice mail.  I
have a similar problem when one of those destinations is a cell phone
but I know that there is no Asterisk solution for that problem.  If the
cell phone answers and goes into the cell phone voice mail I am
screwed.  I can't fix that unless I also run the cell phone company.

In this case the extensions are all set up in the same asterisk
server.  Here is an example.

callerid=John Doe <5555551212>  
mailbox=user1 at VoiceMail

And here is the extension that calls it.  Sorry about the wrapping.

user1,1,Verbose(0,Entering extension user1)  
 same => n,GotoIf($["${DEVICE_STATE(SIP/9999906549)}" =
 same => n(DialWifi),Verbose(0, ${CALLERID(all)} Calling ${EXTEN} and
 same => n,Dial(SIP/user1&SIP/9999906549,30)  
 same => n,Goto(VoiceMail) 

 same => n(DialCell),GotoIf($["x7165550000" = "x"]?DialDesk) 
 same => n,GotoIf($["${CALLERID(ani)}" = "7165550000"]?DialDesk) 
 same => n,Verbose(0,${CALLERID(all)} Calling "${EXTEN}" and cell
 same => n,Dial(SIP/user1&SIP/thinktel/7165550000,30)  
 same => n,Goto(VoiceMail) 
 same => n(DialDesk),Verbose(0,${CALLERID(all)} Calling ${EXTEN}) 
 same => n,Dial(SIP/user1,30)  
 same => n(VoiceMail),Set(CDR(userfield)=VoiceMail) 
 same => n,Set(_ACCOUNT=user1)  
 same => n,VoiceMail(user1 at VoiceMail,u)  
 same => n,Hangup() 

It's a complicated extension but I believe that the following is the
essential part.

user1,1,Verbose(0,Entering extension user1)  
 same => n,Dial(SIP/user1,30)
 same => n,VoiceMail(user1 at VoiceMail,u)
 same => n,Hangup()

> going on or the dialplan below is not the actual dialplan. Calls only
> go to voicemail when the dialplan runs the VoiceMail application.

> Paste the Asterisk console output of a call showing the problem,
> maybe someone can help.

Here is what the log shows.  I can't put the unregistered user back at
the moment.  Perhaps I can do it overnight when no one is going to the

[Aug 23 10:20:55] WARNING[-1][C-0001fee7] app_dial.c: Unable to create
channel of type 'SIP' (cause 20 - Subscriber absent)

I am assuming that the voice mail is for the absent (unregistered) user.

> > exten => 5555551111,1,Verbose(Door buzzer calling)
> >    same => n,Dial(SIP/user1&SIP/user2&SIP/user3)

Other than sanitizing the buzzer phone number and the user names this
is the full extension for the buzzer.

D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy at Vex.Net
VoIP: sip:darcy at Vex.Net

More information about the asterisk-users mailing list