[asterisk-users] Problem: no such extension 'xx' in context 'default'

Michael michael at networkstuff.co.nz
Fri Dec 26 04:30:37 CST 2008


> sip.conf :
>
> [general]
> port=5060
> bindaddr=0.0.0.0

put "context=default" here
>
> [10]
> type=friend
> secret=1234
> host=dynamic
> context=internal
>
> [11]
> type=friend
> secret=1234
> host=dynamic
> context=internal
>
> extensions.conf
>
> [default]
> exten =>2,1,Playback(digits/2) ;
> exten =>2,2,Goto(default,10,1)
> exten=>3,1,Playback(pbx-invalid)
> exten=3,2,Goto(default,4,1)
> exten=4,1,Playback(vm-goodbye)
> exten=>4,2,Hangup()

Change it to the following:
exten =>_2,1,Playback(digits/2) ; 
exten =>_2,n,Goto(default,10,1)
exten=>_3,1,Playback(pbx-invalid)
exten=_3,n,Goto(default,4,1)
exten=_4,1,Playback(vm-goodbye)
exten=>_4,n,Hangup()

> [internal]
> exten => 10,1,Dial(SIP/10,10)
> exten =>10,2,Background(vm-nobodyavail)
> exten => 11,1,Dial(SIP/11,5)
> exten =>11,2,Background(vm-nobodyavail)
>
> now when I dial 10, I got the following error : no such extension '10' in
> context 'default'

Change it to the following:
exten => _10,1,Dial(SIP/10,10)
exten =>_10,n,Background(vm-nobodyavail)
exten => _11,1,Dial(SIP/11,5)
exten =>_11,n,Background(vm-nobodyavail)

The only time I am aware of that you can leave out the prefix underscore is 
for "exten => s" and "exten => i"

Hope this helps,

Michael



More information about the asterisk-users mailing list