I’m trying to make a simple call between two extensions from last 3 days but getting error upon error but also got good hands on practice asterisk now.
After trying everything now I’m getting this error
Using SIP RTP CoS mark 5
[Dec 4 21:20:52] NOTICE[2237][C-00000008]: chan_sip.c:26828 handle_request_invite: Call from '1001' (192.168.1.126:54859) to extension '1002' rejected because extension not found in context 'local-office-extension'.
Here are my configure file
extensions.conf
[local-office-extension]
exten => 1001,1,Dial(PJSIP/1001)
exten => 1002,n,Dial(PJSIP/1002)
pjsip.conf
[1001]
type=endpoint
transport=transport-udp
context=local-office-extension
disallow=all
allow=ulaw
allow=gsm
auth=1001
aors=1001
[1002]
type=endpoint
transport=transport-udp
context=local-office-extension
disallow=all
allow=ulaw
allow=gsm
auth=1002
aors=1002
[1001]
type=auth
auth_type=userpass
password=1001
username=1001
[1002]
type=auth
auth_type=userpass
password=1002
username=1002
[1001]
type=aor
max_contacts=1
contact=sip:1001@192.168.1.126:5060
[1002]
type=aor
max_contacts=1
contact=sip:1002@192.168.1.126:5060
sip.cong
[1001]
username=1001
secret=1001
;nat=no
host=dynamic
type=peer
qualify=yes
context=local-office-extension
[1002]
username=1002
secret=1002
host=dynamic
;nat=no
type=peer
qualify=yes
context=local-office-extension
192.168.1.126 is my asterisk server IP address , OS Ubuntu 22.04, Asterisk Current Stable one
I’m trying to call within my local network
Thank you