[Asterisk-Users] "invalid extension" dilemma

Joseph syscon at interbaun.com
Tue Aug 2 20:39:30 MST 2005


Ho do you folks solve the problem with invalid extension when someone
dials a wrong number?

For example if somebody dial prefix _7 I want to allow "tall free
numbers" from that line but not a long distance.  However, if somebody
dial
wrong number I want to play "invalid extension" instead of "congestion".

In the example below if I dial valid extension 1000, the "Invalid"
context plays "pbx-invalid" as it is included with _7 context.

[goto-dialout]
exten => _9.,1,SetMusicOnHold(loud)
exten => _9.,2,Dial(SIP/${EXTEN:1}@pstn-spa3k,60,tr)
exten => _9.,3,Hangup()

exten => _71800XXXXXXX,1,Dial(SIP/${EXTEN:1}@pstn-spa3k-c,60,tr)
exten => _71866XXXXXXX,1,Dial(SIP/${EXTEN:1}@pstn-spa3k-c,60,tr)
exten => _71877XXXXXXX,1,Dial(SIP/${EXTEN:1}@pstn-spa3k-c,60,tr)
exten => _71888XXXXXXX,1,Dial(SIP/${EXTEN:1}@pstn-spa3k-c,60,tr)

exten => _7NXXXXXX,1,SetMusicOnHold(loud)
exten => _7NXXXXXX,2,Dial(SIP/${EXTEN:1}@pstn-spa3k-c,60,tr)
exten => _7NXXXXXX,3,Hangup()
include => invalid

[invalid]
exten => _.,1,NoCDR()
exten => _.,2,Playback(pbx-invalid)
exten => _.,3,Hangup()

[voicemail]
exten => 1000,1,NoCDR()
exten => 1000,2,Answer()
exten => 1000,3,VoicemailMain(${CALLERIDNUM})
exten => 1000,4,Hangup()

-- 
#Joseph

-- 
#Joseph



More information about the asterisk-users mailing list