Rejected because extension not found in context 'from-test'

Hi guys

I am failing to make incoming calls to DIDs to work. All calls going to every DID gives me same message:

[Apr 9 12:19:17] NOTICE[2103][C-00003dcf]: chan_sip.c:26455 handle_request_invite: Call from ‘2711xxx6600’ (172.xx.xx.xx:5060) to extension ‘+2711xxx6600’ rejected because extension not found in context ‘from-test’.

My extension.conf looks like this:

exten => s,1,n,Dial(SIP/Shoretel/6600)
;same => n,Dial(SIP/Shoretel/6600)

exten=>_X.,1,Dial(SIP/${EXTEN}@172.xx.xx.xx)

My outgoing calls are working.

This is my Dialplan show:
[ Context ‘from-test’ created by ‘pbx_config’ ]
‘s’ => 1. n,Dial(SIP/Shoretel/6600) [pbx_config]
‘_X.’ => 1. Dial(SIP/${EXTEN}@172.xx.xx.xx) [pbx_config]

my sip.conf:
register => 2711xxx6600@ims.gbn.co.za:11xxx6600@172.xx.xx.xx

disallow=all
allow=g729

defaultexpiry=3600

directmedia=no
context=from-test

callerid=“Shoretel”
nat=no
context=from-test
directmedia=no
qualify=yes
disallow=all
allow=g729
port=5060
insecure=port,invite
canreinvite=no
fromuser=2711xxx6600

[172.xx.xx.xx]
dtmfmode=rfc2833
type=friend
host=172.xx.xx.xx
username=2711xxx6600
secret=11xxx6600
qualify=yes
context=from-test
insecure=port,invite
fromuser=2711xxx6600
nat=no
port=5060
fromdomain=xxx.xxx.co.za
realm=xxx.xxx.co.za
directmedia=no
disallow=all
allow=g729

Help!!

Your from-test context has no extension that would match “+2711xxx6600” so it is rejected. _X. only matches an extensions beginning with a number, not a +.

1 Like

So how would i resolve it?
the _X. is for outgoing.

howdo i catch that + ?

“+” has no special meaning in either exact match mode or pattern match mode, so just use it.

dont understand David, how would i use it?
do you have an example string i can use?

It should be obvious if you have taken dialplans 101, but there is an example in one of today’s other threads.

I am new to asterisk, this is my first that’s why am asking for help.

If you need that level of help you should pay for a commercial course, or pay commercial consultancy rates.

https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching