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: 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=22.214.171.124 [kamailio-mars] type=aor contact=sip:126.96.36.199:5060  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  type=aor max_contacts=1
And the REGISTER packet received by Asterisk is
REGISTER sip:188.8.131.52:5060 SIP/2.0 Via: SIP/2.0/UDP 184.108.40.206;branch=z9hG4bKde8f.43c0cb32000000000000000000000000.0 To: <sip:email@example.com> From: <sip:firstname.lastname@example.org>;tag=533cb9e91f4b999cf76861cbb9ed54ed-180c CSeq: 10 REGISTER Call-ID: email@example.com Max-Forwards: 70 Content-Length: 0 User-Agent: kamailio (4.3.4 (x86_64/linux)) Contact: <sip:firstname.lastname@example.org:5060> Expires: 300
220.127.116.11 is Asterisk and
18.104.22.168 is Kamailio. From what I see, the real IP of the client does appear in the communication Asterisk-Kamailio.