Can't receive call from SIP trunk

This is my first time configuring Asterisk. I’ve managed to follow through tutorial for deployinf Asterisk as local PBX.
When configuring to connect with my SIP Trunk (AVAYA based) it can make outbound call, but incoming call from SIP trunk always get rejected

Call from ‘AVAYA’ (10.x.x.xx) to extension ‘2403’ rejected because extension was not found in context ‘default’

My config in extensions.conf goes as

exten => 2403,1,Dial(SIP/2403)

[incoming]
exten => s,1,Answer()
exten => s,n,Dial(SIP/2403,90)

Thank you for your help and sorry if the question was so basic

system : CentOS 7
Asterisk 15

As it says, 2403 isn’t in default, so chan_sip has matched the call to a peer whose context is set to default. You have provided the incoming context, not the default context. That context does not contain an extension 2403.

You haven’t provided sip.conf or the contents of the INVITE, so there is no practical way that we work out why you are going to the default context.

I see, I only edited sip.conf and extensions.conf that I learned from various Google sources

my sip.conf goes as

[2403]
type=friend
secret=password
host=dynamic
canreinvite=yes
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw
transport=udp
context=users

[AVAYA]
type=peer
host=10.1.2.3
port=5060
dtmfmode=auto
canreinvite=no
transport=udp
disallow=all
allow=h264
allow=h264
allow=ulaw
allow=alaw

I’m also trying to figure things out and willing to learn more about this

The result of a Google search will be a lot of obsolete parameters and settings that trade reduced security for the chances of working first time. You need to read the sample sip.conf and understand what the options in the current version do.

It is obvious that no incoming call will be routed to the incoming context and the error messages should be very clear that it is trying to match 2403 in incoming and not s in default.

type=friend is not advisable unless there is some reason why the peer cannot be matched on IP address (after registration).

You don’t seem to have disabled anonymous callers.

1 Like

Hello !

Try to change your AVAYA incoming context:

[AVAYA]
type=peer
host=10.1.2.3
port=5060
dtmfmode=auto
canreinvite=no
transport=udp
disallow=all
allow=h264
allow=h264
allow=ulaw
allow=alaw
context=incoming

Your problem is related to your context. If changing your AVAYA context doesn’t work try to remove context=users

I’m not an expert too :slight_smile: !

1 Like