Rejected because extension not_found


I made a Dial plan test as below but when i try to call from 6001 to 6003 I couldn’t an error message appears:
([Oct 19 08:38:11] NOTICE[2597][C-000000c0]: chan_sip.c:26407 handle_request_invite: Call from ‘6001’ ( to extension ‘6003’ rejected because extension not found in context ‘users’)

exten => 6001,1,Dial(SIP/6003)
same => n,hangup
exten => 6002,1,Dial(SIP/6001)
same => n,hangup
exten => 6003,1,Dial(SIP/6001)
same => n,hangup
exten =>6001,n,Dial(SIP/6003)
same => n,hangup

Your extensions are in context “test”, but the call is arriving in context “users”.

1 Like

what i should to do change the context Test to users ?

change the [test] to [users] in extensions.conf

a same error :frowning:

Type “dialplan show” at the CLI prompt and see if you have created extension 6003 in the users context.

no i didn’t find it:
[ Context ‘users’ created by ‘pbx_config’ ]
‘6001’ => 1. Dial(SIP/6001) [pbx_config]
‘6002’ => 1. Dial(SIP/6002) [pbx_config]

I have add it with nano /etc/asterisk/extensions.conf right now it’s work fine
exten => 6001,1,Dial(SIP/6001)
exten => 6002,1,Dial(SIP/6002)
exten => 6002,1,Dial(SIP/6003)

i have question if i create many extensions 60XX should i make same thing ?
exten => 60xx,1,Dial(SIP/60xx)

_60XX … ${EXTEN:2} (I thought there was an example in the sample configuration.)

Note that using the extension number for the device name eases the task of hackers.