I'm trying to setup a simple proxy with NAT/RTPproxy. I have started with the basic cfg file and added nat and forced rtpproxy.
The proxy is to reside in between endpoints and multiple SIP servers. Currently calls from endpoints are working great but my issue is calls from the server to the endpoint. The SIP messages are good until the 200 OK sent from the phone back, Kamailio is not fixing the contact so it's sending the private IP of the phone back to the server so all subsequent traffic is attempting to route to the private IP. I have tried using the fix_nated_contact everywhere I could think but still no difference. Attached is sip capture and the kamailio.cfg i'm currently using. Thank you, Brian
Sanitized info: Phone public- 150.0.0.1 PBX public- 198.0.0.1 Kamailio Public- 99.0.0.1 Call was from 7555555555 INVITE sip:3145@150.0.0.1:5060 SIP/2.0 Record-Route: <sip:99.0.0.1:5065;lr=on> Via: SIP/2.0/UDP 99.0.0.1:5065;branch=z9hG4bK9dc3.cb2627aae4c1ca35ff4995c534ad8080.0 Via: SIP/2.0/UDP 198.0.0.1:5060;received=198.0.0.1;branch=z9hG4bK-524287-1---96dbe6462276ff2e;rport=5060 Max-Forwards: 69 Contact: <sip:7555555555@198.0.0.1:5060> To: <sip:3...@sipvendor-cloudpbx.sipvendor.net> From: ":Extra Numbers"<sip:7555555555@198.0.0.1:5060;nf=e>;tag=b015873c Call-ID: dYkdLrrbuP18hRc8d6y8iA.. CSeq: 1 INVITE Alert-Info: <http://www.notused.invalidtld>;info=external Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE, UPDATE Content-Type: application/sdp Supported: replaces, timer User-Agent: 3CXPhoneSystem 15.5.15502.6 (15502) Content-Length: 425 P-hint: outbound v=0 o=3cxPS 11142950780141568 33067355999305729 IN IP4 198.0.0.1 s=3cxPS Audio call c=IN IP4 198.0.0.1 t=0 0 m=audio 8320 RTP/AVP 0 8 9 3 18 112 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=rtpmap:3 GSM/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:112 opus/48000/2 a=fmtp:112 maxplaybackrate=16000;sprop-maxcapturerate=16000 a=rtpmap:101 telephone-event/8000 a=sendrecv SIP/2.0 100 Trying Via: SIP/2.0/UDP 99.0.0.1:5065;branch=z9hG4bK9dc3.cb2627aae4c1ca35ff4995c534ad8080.0 Via: SIP/2.0/UDP 198.0.0.1:5060;received=198.0.0.1;branch=z9hG4bK-524287-1---96dbe6462276ff2e;rport=5060 From: ":Extra Numbers" <sip:7555555555@198.0.0.1:5060;nf=e>;tag=b015873c To: <sip:3...@sipvendor-cloudpbx.sipvendor.net> Call-ID: dYkdLrrbuP18hRc8d6y8iA.. CSeq: 1 INVITE User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Content-Length: 0 SIP/2.0 180 Ringing Via: SIP/2.0/UDP 99.0.0.1:5065;branch=z9hG4bK9dc3.cb2627aae4c1ca35ff4995c534ad8080.0 Via: SIP/2.0/UDP 198.0.0.1:5060;received=198.0.0.1;branch=z9hG4bK-524287-1---96dbe6462276ff2e;rport=5060 Record-Route: <sip:99.0.0.1:5065;lr=on> From: ":Extra Numbers" <sip:7555555555@198.0.0.1:5060;nf=e>;tag=b015873c To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=812445237 Call-ID: dYkdLrrbuP18hRc8d6y8iA.. CSeq: 1 INVITE Contact: <sip:3145@10.10.8.96:5060> Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Allow-Events: talk,hold,conference,refer,check-sync Content-Length: 0 INFO sip:3145@198.0.0.1:5060 SIP/2.0 Via: SIP/2.0/UDP 10.10.8.96:5060;branch=z9hG4bK2102060417 Route: <sip:99.0.0.1:5065;lr=on> From: <sip:3145@150.0.0.1:5060>;tag=1656825630 To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=7a9f4963 Call-ID: wm97Nz_03L-LgEgqzWac1Q.. CSeq: 13 INFO Contact: <sip:3145@10.10.8.96:5060> Content-Type: application/csta+xml Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE Max-Forwards: 70 User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Content-disposition: signal;handling=required Content-Length: 783 <?xml version="1.0" encoding="utf-8"?> <DeliveredEvent xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed5"> <monitorCrossRefID>0</monitorCrossRefID> <connection> <callID>33987</callID> <deviceID>sip:3...@sipvendor-cloudpbx.sipvendor.net:5060</deviceID> </connection> <alertingDevice> <deviceIdentifier>sip:3...@sipvendor-cloudpbx.sipvendor.net:5060</deviceIdentifier> </alertingDevice> <callingDevice> <deviceIdentifier>sip:7555555555@198.0.0.1</deviceIdentifier> </callingDevice> <calledDevice> <deviceIdentifier>sip:3...@sipvendor-cloudpbx.sipvendor.net:5060</deviceIdentifier> </calledDevice> <lastRedirectionDevice> <notKnown /> </lastRedirectionDevice> <localConnectionInfo>alerting</localConnectionInfo> <cause>normal</cause> </DeliveredEvent> SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.8.96:5060;rport=5060;received=150.0.0.1;branch=z9hG4bK2102060417 Contact: <sip:3145@198.0.0.1:5060> To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=7a9f4963 From: <sip:3145@150.0.0.1:5060>;tag=1656825630 Call-ID: wm97Nz_03L-LgEgqzWac1Q.. CSeq: 13 INFO User-Agent: 3CXPhoneSystem 15.5.15502.6 (15502) Content-Length: 0 SIP/2.0 200 OK Via: SIP/2.0/UDP 99.0.0.1:5065;branch=z9hG4bK9dc3.cb2627aae4c1ca35ff4995c534ad8080.0 Via: SIP/2.0/UDP 198.0.0.1:5060;received=198.0.0.1;branch=z9hG4bK-524287-1---96dbe6462276ff2e;rport=5060 Record-Route: <sip:99.0.0.1:5065;lr=on> From: ":Extra Numbers" <sip:7555555555@198.0.0.1:5060;nf=e>;tag=b015873c To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=812445237 Call-ID: dYkdLrrbuP18hRc8d6y8iA.. CSeq: 1 INVITE Contact: <sip:3145@10.10.8.96:5060> Content-Type: application/sdp Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Allow-Events: talk,hold,conference,refer,check-sync Content-Length: 207 v=0 o=- 20108 20108 IN IP4 10.10.8.96 s=SDP data c=IN IP4 10.10.8.96 t=0 0 m=audio 12252 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv INFO sip:3145@198.0.0.1:5060 SIP/2.0 Via: SIP/2.0/UDP 10.10.8.96:5060;branch=z9hG4bK769324178 Route: <sip:99.0.0.1:5065;lr=on> From: <sip:3145@150.0.0.1:5060>;tag=1656825630 To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=7a9f4963 Call-ID: wm97Nz_03L-LgEgqzWac1Q.. CSeq: 14 INFO Contact: <sip:3145@10.10.8.96:5060> Content-Type: application/csta+xml Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE Max-Forwards: 70 User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Content-disposition: signal;handling=required Content-Length: 812 <?xml version="1.0" encoding="utf-8"?> <EstablishedEvent xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed5"> <monitorCrossRefID>0</monitorCrossRefID> <establishedConnection> <callID>33987</callID> <deviceID>sip:3...@sipvendor-cloudpbx.sipvendor.net:5060</deviceID> </establishedConnection> <answeringDevice> <deviceIdentifier>sip:3...@sipvendor-cloudpbx.sipvendor.net:5060</deviceIdentifier> </answeringDevice> <callingDevice> <deviceIdentifier>sip:7555555555@198.0.0.1</deviceIdentifier> </callingDevice> <calledDevice> <deviceIdentifier>sip:3...@sipvendor-cloudpbx.sipvendor.net:5060</deviceIdentifier> </calledDevice> <lastRedirectionDevice> <notKnown /> </lastRedirectionDevice> <localConnectionInfo>connected</localConnectionInfo> <cause>normal</cause> </EstablishedEvent> SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.8.96:5060;rport=5060;received=150.0.0.1;branch=z9hG4bK769324178 Contact: <sip:3145@198.0.0.1:5060> To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=7a9f4963 From: <sip:3145@150.0.0.1:5060>;tag=1656825630 Call-ID: wm97Nz_03L-LgEgqzWac1Q.. CSeq: 14 INFO User-Agent: 3CXPhoneSystem 15.5.15502.6 (15502) Content-Length: 0 SIP/2.0 200 OK Via: SIP/2.0/UDP 99.0.0.1:5065;branch=z9hG4bK9dc3.cb2627aae4c1ca35ff4995c534ad8080.0 Via: SIP/2.0/UDP 198.0.0.1:5060;received=198.0.0.1;branch=z9hG4bK-524287-1---96dbe6462276ff2e;rport=5060 Record-Route: <sip:99.0.0.1:5065;lr=on> From: ":Extra Numbers" <sip:7555555555@198.0.0.1:5060;nf=e>;tag=b015873c To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=812445237 Call-ID: dYkdLrrbuP18hRc8d6y8iA.. CSeq: 1 INVITE Contact: <sip:3145@10.10.8.96:5060> Content-Type: application/sdp Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Allow-Events: talk,hold,conference,refer,check-sync Content-Length: 207 v=0 o=- 20108 20108 IN IP4 10.10.8.96 s=SDP data c=IN IP4 10.10.8.96 t=0 0 m=audio 12252 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv SIP/2.0 200 OK Via: SIP/2.0/UDP 99.0.0.1:5065;branch=z9hG4bK9dc3.cb2627aae4c1ca35ff4995c534ad8080.0 Via: SIP/2.0/UDP 198.0.0.1:5060;received=198.0.0.1;branch=z9hG4bK-524287-1---96dbe6462276ff2e;rport=5060 Record-Route: <sip:99.0.0.1:5065;lr=on> From: ":Extra Numbers" <sip:7555555555@198.0.0.1:5060;nf=e>;tag=b015873c To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=812445237 Call-ID: dYkdLrrbuP18hRc8d6y8iA.. CSeq: 1 INVITE Contact: <sip:3145@10.10.8.96:5060> Content-Type: application/sdp Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Allow-Events: talk,hold,conference,refer,check-sync Content-Length: 207 v=0 o=- 20108 20108 IN IP4 10.10.8.96 s=SDP data c=IN IP4 10.10.8.96 t=0 0 m=audio 12252 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=ptime:20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv BYE sip:7555555555@198.0.0.1:5060 SIP/2.0 Via: SIP/2.0/UDP 10.10.8.96:5060;branch=z9hG4bK143243009 Route: <sip:99.0.0.1:5065;lr=on> From: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=812445237 To: ":Extra Numbers" <sip:7555555555@198.0.0.1:5060;nf=e>;tag=b015873c Call-ID: dYkdLrrbuP18hRc8d6y8iA.. CSeq: 2 BYE Contact: <sip:3145@10.10.8.96:5060> Max-Forwards: 70 User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Content-Length: 0 INFO sip:3145@198.0.0.1:5060 SIP/2.0 Via: SIP/2.0/UDP 10.10.8.96:5060;branch=z9hG4bK74261630 Route: <sip:99.0.0.1:5065;lr=on> From: <sip:3145@150.0.0.1:5060>;tag=1656825630 To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=7a9f4963 Call-ID: wm97Nz_03L-LgEgqzWac1Q.. CSeq: 15 INFO Contact: <sip:3145@10.10.8.96:5060> Content-Type: application/csta+xml Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE Max-Forwards: 70 User-Agent: Yealink SIP-T46S 66.83.0.20 805ec02194db Content-disposition: signal;handling=required Content-Length: 537 <?xml version="1.0" encoding="utf-8"?> <ConnectionClearedEvent xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed5"> <monitorCrossRefID>0</monitorCrossRefID> <droppedConnection> <callID>33987</callID> <deviceID>sip:3...@sipvendor-cloudpbx.sipvendor.net:5060</deviceID> </droppedConnection> <releasingDevice> <deviceIdentifier>sip:3...@sipvendor-cloudpbx.sipvendor.net:5060</deviceIdentifier> </releasingDevice> <localConnectionInfo>null</localConnectionInfo> <cause>normalClearing</cause> </ConnectionClearedEvent> SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.8.96:5060;rport=5060;received=150.0.0.1;branch=z9hG4bK143243009 Contact: <sip:7555555555@198.0.0.1:5060> To: ":Extra Numbers"<sip:7555555555@198.0.0.1:5060;nf=e>;tag=b015873c From: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=812445237 Call-ID: dYkdLrrbuP18hRc8d6y8iA.. CSeq: 2 BYE User-Agent: 3CXPhoneSystem 15.5.15502.6 (15502) Content-Length: 0 SIP/2.0 200 OK Via: SIP/2.0/UDP 10.10.8.96:5060;rport=5060;received=150.0.0.1;branch=z9hG4bK74261630 Contact: <sip:3145@198.0.0.1:5060> To: <sip:3...@sipvendor-cloudpbx.sipvendor.net>;tag=7a9f4963 From: <sip:3145@150.0.0.1:5060>;tag=1656825630 Call-ID: wm97Nz_03L-LgEgqzWac1Q.. CSeq: 15 INFO User-Agent: 3CXPhoneSystem 15.5.15502.6 (15502) Content-Length: 0
kamailio.cfg
Description: kamailio.cfg
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users