[Asterisk-Users] Invalid Extensions -- More like traditional PBX systems?

Chris Shaw chriss at watertech.com
Wed Jun 16 09:13:07 MST 2004


I had a tough time with this too, but I see the logic now...

FWIW Here's what I've found to work. At least with SIP channels, Asterisk
doesn't seem to want to go to the 'i' extension on invalid when you make a
general pattern. And I see the logic in this because SIP channels are
virtual and you could call a sip channel anything you like because it's not
tied to hardware.

;
; Begin office extensions...  We use 3 and 4 digit extensions that start at
1 and go to 6. 7-9 is for parking,voicemail and special use
;
[office]
;
;3 digit extension matching...
;
exten => _[1-6]XX,1,Dial(SIP/${EXTEN},15)
exten => _[1-6]XX,2,VoiceMail(u${EXTEN})
exten => _[1-6]XX,3,Goto(office,i,1)
exten => _[1-6]XX,102,VoiceMail(b${EXTEN})
;
;And now for something completely different...
;
exten => _[1-6]XXX,1,Dial(SIP/${EXTEN},15)
exten => _[1-6]XXX,2,VoiceMail(u${EXTEN})
exten => _[1-6]XXX,3,Goto(office,i,1)
exten => _[1-6]XXX,102,VoiceMail(b${EXTEN})
;
; invalid exts go here...
;
exten => i,1,Answer()
exten => i,2,Wait(2)
exten => i,3,Playback(invalid,skip)
exten => i,4,Hangup()

Works for me, I know that in PRIO 2 it will go to voicemail whether the box
exists or not so this creates a couple second delay while asterisk figures
out that there's no mailbox there. If anyone has a better suggestion I'm
open. Someone in an earlier post mentioned a "Mailboxexists()"
application...





More information about the asterisk-users mailing list