Call rejected because extension not found

error: chan_sip.c:20006 handle_request_invite: Call from ‘5001’ to extension ‘5000’ rejected because extension not found.

my dial plan settings

[globals]

[general]
autofallthrough=yes

[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

[incoming_calls]

[internal]
exten => 5000,1,Verbose(1|Extension 5000)
exten => 5000,n,Dial(SIP/5000,30)
exten => 5000,n,Hangup()

exten => 5001,1,Verbose(1|Extension 5001)
exten => 5001,n,Dial(SIP/5001,30)
exten => 5001,n,Hangup()

sip settings in sip.conf

[general]
srvlookup=yes

[5000]
deny=0.0.0.0/0.0.0.0
disallow=all
secret=1234
dtmfmode=rfc2833
canreinvite=no
context=from-sip
host=dynamic
type=friend
nat=yes
port=5060
qualify=yes
callgroup=
pickupgroup=
allow=ulaw
allow=h263
allow=h263p
allow=h264
dial=SIP/5000
mailbox=5000@device
permit=0.0.0.0/0.0.0.0
callerid=device <5000>
callcounter=yes
faxdetect=no
insecure=invite,port

[5001]
deny=0.0.0.0/0.0.0.0
disallow=all
secret=1234
dtmfmode=rfc2833
canreinvite=no
context=from-sip
host=dynamic
type=friend
nat=yes
port=5060
qualify=yes
callgroup=
pickupgroup=
allow=ulaw
allow=h263
allow=h263p
allow=h264
dial=SIP/5001
mailbox=5001@device
permit=0.0.0.0/0.0.0.0
callerid=device <5001>
callcounter=yes
faxdetect=no
insecure=invite,port

Thanks in Advance
sivakumar

where is the context from-sip in your extensions.conf file

Thanks for the reply

i added context=from-sip in extensions.conf and reloaded asterisk
but still i am getting the same error…

What did you put in it?

Also note that your subject doesn’t contain the error message, it just contains the source file, line number and function name of the call to the function that printed the message.

Thanks david55

i changed my subject line please suggest me a solution

Create a context called from-sip. Add an extension 5000 to that context. Make that context do whatever you want to do with the incoming call.

Hi all,

when i am calling to ext 5000 i am getting ring back to 5000 even ext 5000 is in call with ext 5001
with out saying busy or hangup

my dial plan settings

[globals]

[general]
static=yes
writeprotect=no
autofallthrough=yes
context=default

[default]

exten => 5000,1,Dial(SIP/5000)
exten => 5000,2,answer(SIP/5000)
exten => 5000,3,busy(2)
exten => 5000,4,hangup(3)
exten => 5001,1,Dial(SIP/5001)
exten => 5001,2,answer(SIP/5001)
exten => 5001,3,busy(2)
exten => 5001,4,hangup(3)
exten => 5002,1,Dial(SIP/5002)
exten => 5002,2,answer(SIP/5002)
exten => 5002,3,busy(2)
exten => 5002,4,hangup(3)

sip settings in sip.conf

[general]
srvlookup=yes

[5000]
deny=0.0.0.0/0.0.0.0
disallow=all
secret=1234
dtmfmode=rfc2833
canreinvite=no
context=from-sip
host=dynamic
type=friend
nat=yes
port=5060
qualify=yes
callgroup=
pickupgroup=
allow=ulaw
allow=h263
allow=h263p
allow=h264
dial=SIP/5000
mailbox=5000@device
permit=0.0.0.0/0.0.0.0
callerid=device <5000>
callcounter=yes
faxdetect=no
insecure=invite,port

[5001]
deny=0.0.0.0/0.0.0.0
disallow=all
secret=1234
dtmfmode=rfc2833
canreinvite=no
context=from-sip
host=dynamic
type=friend
nat=yes
port=5060
qualify=yes
callgroup=
pickupgroup=
allow=ulaw
allow=h263
allow=h263p
allow=h264
dial=SIP/5001
mailbox=5001@device
permit=0.0.0.0/0.0.0.0
callerid=device <5001>
callcounter=yes
faxdetect=no
insecure=invite,port

[5002]
deny=0.0.0.0/0.0.0.0
permit=0.0.0.0/0.0.0.0
secret=1234
type=friend
canreinvite=yes
host=dynamic
allow=all
disallow=all
dtmfmode=rfc2833
nat=yes
port=5060
qualify=yes
callgroup=
pickupgroup=
allow=ulaw
allow=h263
allow=h263p
allow=h264
dial=SIP/5002
mailbox=5002@device
callerid=device <5002>
callcounter=yes
faxdetect=no

Thanks in Advance
sivakumar

Try www.asteriskdocs.org

As navaismo is hinting, you have such a low understanding of how dial plans work that you need to study the documentation further. However…

The parameter on Answer is invalid.

canreinvite is deprecated or unrecognized in all currently supported versions.

Specifying insecure on host=dynamic and secret=xxx is almost certainly a security error. Specifying invite=port is often a security error.

nat=yes is deprecated in the latest version and is often not necessary, even when NAT is involved.

You don’t need to answer a call to generate a busy indication, and the downstream system doing something like that may be the cause of your problems.

You don’t need to call hangup.

My guess at your underlying problem is that the system you are calling is returning a busy tone as early media and not definitively rejecting the call. You may find that calling Progress before Dial helps. If not, you will need detailed logging.

Hi,

I have the same error, but when i call to an extension defined by a trunk.

exten => 163,1,Dial(DAHDI/g1/PBXID${EXTEN}) same => n,PlayTones(Busy) etc...

when I call to the extension, the next error appears:

I also prove:

and the same error appears :cry:

I reloaded the dialplan and verify that the extension exists:

*CLI>dialplan show 163@contexto

'163' => 1. dialplan(DAHDI/g1/PBXID/${EXTEN})    [pbx_config]
            2.PlayTones(Busy)                                   [pbx_config]
            3. Hangup()                                             [pbx_config]

thank you. :smiley:

Its Dial, not dialplan. if its a typo then don’t edit, just copy & paste otherwise we havent any valid proof of what you are saying.