[asterisk-users] Calls to sip extensions not defined

Steve Edwards asterisk.org at sedwards.com
Fri Mar 21 17:12:43 CDT 2008


On Fri, 21 Mar 2008, Ricardo B. wrote:

> 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.
>
> What I am looking for is to play Playback(pbx-invalid) if a user enters a
> sip extension not created.

While I didn't take the time to test it, the following should be close:

[default]
 	exten =	_1[1-3],1,	dial(sip/${EXTEN},10)
 	exten = _1[1-3],n,	voicemail(${EXTEN}@default,u)
 	exten = _1[1-3],n,	hangup
 	exten = i,1,		playback(pbx-invalid)
 	exten = i,n,		hangup

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list