Rejected because extension not found in context 'default'

Inbound calls from a SIP provider fail because the call isn’t matched in the default context.

chan_sip.c:20161 handle_request_invite: Call from ‘’ to extension ‘##########’ rejected because extension not found in context ‘default’.

However the call is coming from a sip trunk configured in the sip.conf that should be named 'ISP1’
Adding a context called default in the extension.conf makes the calls route, but i would like to used the named context.

Here is our sip.conf for this provider:
[ISPName]
type=peer
port=5060
host=***.***.***.***
dtmfmode=rfc2833
context=from-ISP1
qualify=yes
transport=udp
notifyhold=yes

the extensions.conf is:

[from-ISP1]
exten => _XXXXXXXXXX,1,Dial(Sip/Trunk2/+##########,30)
exten => _XXXXXXXXXX,n,Hangup()

;[default]
;exten => _XXXXXXXXXX,1,Dial(Sip/Trunk2/+##########,30)
;exten => _XXXXXXXXXX,n,Hangup()

If i un-comment the default context the call routes, however if i have it commented out the call fails. I have several inbound sip trunks and would like to use named context to route the calls.

Set allowguest to no. This won’t make it work, but will stop attackers earlier.

I think you will find the source IP address isn’t the one you expect.