[asterisk-users] Calls to sip extensions not defined
Steve Edwards
asterisk.org at sedwards.com
Sat Mar 22 14:03:08 CDT 2008
On Sat, 22 Mar 2008, R. B. wrote:
> [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 Steve, your solution works but I am looking for is something more
> general. The example I posted is a simplified one and on the real one I
> am using extensions on the 5XXX scenario so I can have 5000 to 5999
> range. You answer for just 10 extension is great but for a 1000 and when
> not all extensions on the 5XXX are set up then it is not optimal to
> define each extension manually or add exceptions manually and I was
> looking to see if there a command or state that I could use like
> DIALSTATUS, etc to see if the dialled extension doesn't exist and then
> jump to the invalid prompt.
This really isn't my "field of expertise," but nobody else is chiming in.
Will the following help?
; test for availability
exten = _5xxx,1, verbose(1,Testing for availability)
exten = _5xxx,n, chanisavail(sip/${EXTEN})
exten = _5xxx,n, verbose(${AVAILCHAN})
exten = _5xxx,n, verbose(${AVAILORIGCHAN})
exten = _5xxx,n, verbose(${AVAILSTATUS})
exten = _5xxx,n, voicemail(${EXTEN}@default,u)
exten = _5xxx,103, playback(pbx-invalid)
exten = _5xxx,n, hangup
If you took an "AGI/database" approach, you wouldn't be constrained to
"the extension is numeric and has to match the stanza in sip.conf" and
would allow more features like a web page to "check-in" or whatever.
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