Call rejected because extension not found when calling

Hi all!

I have trouble with setting up my asterisk installation with easybell as a SIP Provider.
When I call my number from outside I get the following message:

 NOTICE[12008][C-00000001] chan_sip.c: Call from '004921xx12345' (195.185.xx.xx:5064) to extension '004921xx12345' rejected because extension not found in context 'sip-incoming'.

When doing an outside call from my phone I get the error:

NOTICE[12008][C-00000002] chan_sip.c: Call from '101' (172.20.10.21:5060) to extension '0173nnnnnn' rejected because extension not found in context 'dial-custom'.

004921xx12345 is my number which was provided by easybell
101 is the internal number
0173nnnnnn is the external number I tried to reach.

That is my sip.conf:

[general]
srvlookup=no
port = 5060
language=de
register => 004921xx12345:sipPass@sip.easybell.de:5064/004921xx12345

allowguest=no
alwaysauthreject=yes
context=sip-incoming
disallow=all
allow=ulaw
allow=alaw

[101] ; erste Nebenstelle .
type=friend
secret=secret
qualify=yes
host=dynamic
canreinvite=no
context=home

[102] ; zweite Nebenstelle
type=friend
secret=secret
qualify=yes
host=dynamic
canreinvite=no
context=home

[004921xx12345] ; Peer fĂĽr ausgehende Anrufe
type=peer
username= 004921xx12345
fromuser= 004921xx12345
secret= sipPass
host=sip.easybell.de
fromdomain=sip.easybell.de
insecure=invite,port
caninvite=no
canreinvite=no
nat=no

and here my extensions.conf

[globals]
phone1 = SIP/101
phone2 = SIP/102
callduration = 30

[home]
exten => 101,1,Dial(SIP/101)
exten => 102,1,Dial(SIP/102)

;dialplan
exten => _X.,1,Set(CALLERID(num)=004921xx12345)

;exten => _X.,2,Set(CALLERID(name)=49800123456)
;CLIP No Screening
;(Sofern CLIP No Screening nicht gewünscht, bitte Zeile löschen)

exten => _X.,n,Dial(SIP/${EXTEN}@004921xx12345)
exten => _X.,n,Hangup

;context for incoming SIP calls

[sip-incoming] 
;Ihre vollständig Durchwahl, beginnend mit 49 (ohne führendes +)
exten => 4921xx12345,1,NoOp(Incoming call on DDI 1)
exten => 4921xx12345,n,Ringing
exten => 4921xx12345,n,Wait(1)
exten => 4921xx12345,n,Dial(SIP/101)
exten => 4921xx12345,n,Hangup

;exten => 4921xx1234567,1,NoOp(Incoming call on DDI 2)
;exten => 4921xx1234567,n,Ringing
;exten => 4921xx1234567,n,Wait(1)
;exten => 4921xx1234567,n,Dial(SIP/102)
;exten => 4921xx1234567,n,Hangup
;

Can you help me, where is my mistake?
Thanks a lot in advance!

Regards
Daniel

The actual request URI user starts 0049, but you only have 49 in extensions.conf.

I don’t understand where the dial_custom context is coming from, but it must be in the configuration somewhere.

(caninvite doesn’t exist. canreinvite is an obsolete name. In most cases, local devices should be type=peer.

nat=no has no effect if you don’t have external IP addresses configured (and is usually wrong if you do.

You have private and public addresses, which typically means you do have NAT, and require an external IP to be configured, although it is possible that you are dual homed.)

1 Like

Thanks a lot for your reply!
I couln’t find dial_custom context any more in my configuration or logfiles any more.

I changed the 49 to 0049 in my configuration. That helped a lot! Thank you for that!
Now I am able to perform outbound calls.

But when I try to do an inbound call I get just a busy line signal on the caller side. But my phone doesn’t receive the call.

I will check caninvite, canreinvite and the type definitions.

I don’t have any external IP configured. Asterisk is working behind a router. Is there something I have to configure for the inbound calls?

If the router is translating addresses, you need to configures some means to let Asterisk know the public address of the router, and nat=no is very unlikely to be wise. It is just possible that the service provider uses work arounds such as ignoring the address in the registration and using the actual source IP address.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.