Greetings,
I'm not sure if I found a bug, or if I just have something completely misconfigured... I'm a total newb with Kamailio, working on a proof of concept design.
Here's my configuration:
provider -> nat firewall -> kamailio/rtpproxy -> asterisk
For outbound calls from a phone registered to asterisk via kamailio, I'm trying to use fix_nated_sdp("2", "10.50.50.8") to rewrite the media ip address to resolve my audio issues, where 10.50.50.8 is the address outside my firewall. What I'm running into is the 'c=' line doesn't get re-written properly... it inserts the specified address in front of the existing address, and I end up with the following line in my INVITE: c=IN IP4 10.50.50.810.0.10.10
I have the fix_nated_sdp command under route[sipout], because I only want to use it on calls being sent outside the nat firewall.
Here's the sip invite without the 'fix_nated_sdp' command: -------------------------------------------------------------------------------------------------------------- INVITE sip:19165551212@xxx.xxx.xxx.xxx SIP/2.0 Record-Route: sip:10.0.10.10;lr=on;ftag=as5498b77e;nat=yes Via: SIP/2.0/UDP 10.50.50.8.;branch=z9hG4bK4b3a.960f6466.0 Via: SIP/2.0/UDP 10.0.10.11:5060;branch=z9hG4bK145db73e;rport=5060 Max-Forwards: 69 From: "1009" sip:1009@10.0.10.11;tag=as5498b77e To: sip:19165551212@xxx.xxx.xxx.xxx Contact: sip:1009@10.0.10.11:5060 Call-ID: 06b8bb1b7dd7801d7b3b9c917fcb9b12@10.0.10.11:5060 CSeq: 102 INVITE User-Agent: Asterisk PBX SVN-branch-1.8-r356107 Date: Wed, 22 Feb 2012 03:06:06 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces, timer Content-Type: application/sdp Content-Length: 309 P-hint: outbound
v=0 o=root 604360056 604360056 IN IP4 10.0.10.10 s=Asterisk PBX SVN-branch-1.8-r356107 c=IN IP4 10.0.10.10 t=0 0 m=audio 9702 RTP/AVP 0 3 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv a=nortpproxy:yes --------------------------------------------------------------------------------------------------------------
Here's the sip invite with the 'fix_nated_sdp' command: -------------------------------------------------------------------------------------------------------------- INVITE sip:19167828326@xxx.xxx.xxx.xxx SIP/2.0 Record-Route: sip:10.0.10.10;lr=on;ftag=as49e00c81;nat=yes Via: SIP/2.0/UDP 10.50.50.8.;branch=z9hG4bK1eab.800c4724.0 Via: SIP/2.0/UDP 10.0.10.11:5060;branch=z9hG4bK20d28324;rport=5060 Max-Forwards: 69 From: "1009" sip:1009@10.0.10.11;tag=as49e00c81 To: sip:19167828326@xxx.xxx.xxx.xxx Contact: sip:1009@10.0.10.11:5060 Call-ID: 4def5539675b6f644b99bb300e8ec8d6@10.0.10.11:5060 CSeq: 102 INVITE User-Agent: Asterisk PBX SVN-branch-1.8-r356107 Date: Wed, 22 Feb 2012 03:18:19 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH Supported: replaces, timer Content-Type: application/sdp Content-Length: 347 P-hint: outbound
v=0 o=root 1009117068 1009117068 IN IP4 10.0.10.10 s=Asterisk PBX SVN-branch-1.8-r356107 c=IN IP4 10.50.50.8.10.0.10.10 t=0 0 m=audio 13540 RTP/AVP 0 3 8 101 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv a=oldmediaip:10.0.10.11 a=nortpproxy:yes --------------------------------------------------------------------------------------------------------------
Is this a bug, or is it likely I have something else screwed up?
Thank you in advance for your assistance - this list is an incredible resource!
-Ric