[asterisk-users] Calls to sip extensions not defined

Ricardo B. ragb at mail.com
Fri Mar 21 16:13:12 CDT 2008


Hi all, new to the list and this is probably a basic question and
couldn't find anything clear googling around but I don't know how to
handle calls to sip extensions not defined on sip.conf while using
pattern matching. On my example I have sip extensions 10, 11, 12, and 13
on sip.conf. On a basic extension.conf I set up a pattern starting with
"1" and a second digit should dial the sip extension entered by the user
and if the user don't pick up or is unavailable  the call goes to the
user voicemail and then hangup. This basic setup can be seen next:

[default]
exten => _1X,1,Dial(SIP/${EXTEN},10)
exten => _1X,2,VoiceMail(${EXTEN}@default,u)
exten => _1X,3,HangUp()

Now, what happens if the user dials 15? Then the pattern is applied and
the asterisk tries to dial that sip extension that doesn't exist, the
next step that is the voicemail also fails as 15 is not defined on
voicemail.conf and finally reaches the last step where it hang ups. This
can be seen on the cli output copied below:

astbox*CLI>
-- Executing [15 at default:1] Dial("SIP/10-0820d8e0", "SIP/15|10") in new
stack
[Mar 21 19:57:48] WARNING[14321]: chan_sip.c:2860 create_addr: No such
host: 15
[Mar 21 19:57:48] WARNING[14321]: app_dial.c:1111 dial_exec_full: Unable
to create channel of type 'SIP' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [15 at default:2] VoiceMail("SIP/10-0820d8e0", "15 at default|u")
in new stack
[Mar 21 19:57:48] WARNING[14321]: app_voicemail.c:2808 leave_voicemail:
No entry in voicemail config file for '15'
-- Executing [15 at default:3] Hangup("SIP/10-0820d8e0", "") in new stack
== Spawn extension (default, 15, 3) exited non-zero on 'SIP/10-0820d8e0'
astbox*CLI>


What I am looking for is to play Playback(pbx-invalid) if a user enters a
sip extension not created. I've been testing a few options using
DIALSTATUS, AVAILSTATUS and their values but without luck as if the sip
phone 11 is not registered the pbx-invalid message.

Thansk for reading and any suggestion will be welcome.

Richard

-- 
Want an e-mail address like mine?
Get a free e-mail account today at www.mail.com!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080321/59f6e528/attachment.htm 


More information about the asterisk-users mailing list