Hello,
I have a following configuration of my environment - Asterisk 13.7.0 with PJSIP 2.4.5 stack working together with Kamailio 4.3.4
What I trying to achieve is to be able to connect my endpoints through Kamailio with performing authorization only on Asterisk (so to make Kamailio pass through all the REGISTER packets). As for now I was able to correctly (as I assume) configure Kamailio, but on Asterisk I’m getting the following error:
WARNING[1485]: res_pjsip_registrar.c:678 registrar_on_rx_request: AOR '102' not found for endpoint 'kamailio'
My configuration looks as follows
[kamailio]
type=endpoint
transport=transport-udp
context=testing
aors=kamailio
[kamailio]
type=identify
endpoint=kamailio
match=128.142.196.184
[kamailio-mars]
type=aor
contact=sip:128.142.196.184:5060
[102]
type=endpoint
context=testing
disallow=all
allow=ulaw
transport=transport-udp
auth=auth102
aors=102
[auth102]
type=auth
auth_type=userpass
password=102
username=102
[102]
type=aor
max_contacts=1
And the REGISTER packet received by Asterisk is
REGISTER sip:128.142.194.41:5060 SIP/2.0
Via: SIP/2.0/UDP 128.142.196.184;branch=z9hG4bKde8f.43c0cb32000000000000000000000000.0
To: <sip:102@128.142.194.41>
From: <sip:102@128.142.194.41>;tag=533cb9e91f4b999cf76861cbb9ed54ed-180c
CSeq: 10 REGISTER
Call-ID: 6fa94a272a247611-8719@127.0.0.1
Max-Forwards: 70
Content-Length: 0
User-Agent: kamailio (4.3.4 (x86_64/linux))
Contact: <sip:102@128.142.196.184:5060>
Expires: 300
where 128.142.194.41
is Asterisk and 128.142.196.184
is Kamailio. From what I see, the real IP of the client does appear in the communication Asterisk-Kamailio.