Everything seems fine, the SIP messages go tot he right place, the NAT tests are finding everything as they should.. and in the o= row, they're being replaced (more as a test, I don't think it's completely neccessary) without an issue. However, in the c= line, it adds the IP I've specified (for some reason, if I leave it blank it only puts 127.0.0.1; or a mashup of the public address and localhost (as mediaproxy runs on the same machine for the moment).
here are the two sections of code I've added.. these are the only places I call fix_nated_sdp()
if (method=="INVITE") { if (nat_uac_test("8")) { fix_nated_sdp("10","89.xxx.xxx.16"); }; t_on_failure("1"); } else if (method == "BYE" || method == "CANCEL") { end_media_session(); };
onreply_route[1] { if (status=~"(183)|(2[0-9][0-9])") { if (client_nat_test("1")) { fix_contact(); }; if (nat_uac_test("8")) { fix_nated_sdp("10","89.xxx.xxx.16"); }; use_media_proxy(); }; }
I'm using openser 1.1.0 notls, on a dual opteron server running CentOS 4.3
here is a trace of the code in action.. (names changed.. because I enjoy search and replace)
U 89.xxx.xxx.8:30626 -> 89.xxx.xxx.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.xxx.xxx.16;branch=z9hG4bK674e.0d2a4f64.0. Via: SIP/2.0/UDP 192.168.20.16:38000;received=87.xxx.xxx.99;branch=z9hG4bK-d87543-b3783334b231975b-1--d87543-;rport=38000. Record-Route: sip:89.xxx.xxx.16;lr;ftag=5c63711f. Contact: sip:nick@89.xxx.xxx.8:30626;rinstance=f0677dc7f7d4d2f0. To: "Joe Blow"sip:joe@blow.com;tag=ee11f527. From: "Tom"sip:tom@blow.com;tag=5c63711f. Call-ID: NTFjYmM5Y2JhNWE5MzU2NzQ1NTMxYTg2NGQ3ZDYzNmM.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 237. . v=0. o=- 1 2 IN IP4 192.168.1.67. s=CounterPath X-Lite 3.0. c=IN IP4 192.168.1.67. t=0 0. m=audio 31556 RTP/AVP 0 8 3 101. a=alt:1 1 : 0W8e8Rrk y9fAinpH 192.168.1.67 31556. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv.
# U 89.xxx.xxx.16:5060 -> 87.xxx.xxx.99:38000 SIP/2.0 200 OK. Via: SIP/2.0/UDP 192.168.20.16:38000;received=87.xxx.xxx.99;branch=z9hG4bK-d87543-b3783334b231975b-1--d87543-;rport=38000. Record-Route: sip:89.xxx.xxx.16;lr;ftag=5c63711f. Contact: sip:nick@89.xxx.xxx.8:30626;rinstance=f0677dc7f7d4d2f0. To: "Joe Blow"sip:joe@blow.com;tag=ee11f527. From: "Tom"sip:tom@blow.com;tag=5c63711f. Call-ID: NTFjYmM5Y2JhNWE5MzU2NzQ1NTMxYTg2NGQ3ZDYzNmM.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 302. . v=0. o=- 1 2 IN IP4 89.xxx.xxx.16. s=CounterPath X-Lite 3.0. c=IN IP4 89.xxx.xxx.16127.0.0.1. t=0 0. m=audio 60070 RTP/AVP 0 8 3 101. a=alt:1 1 : 0W8e8Rrk y9fAinpH 192.168.1.67 31556. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv. a=oldmediaip:192.168.1.67. a=oldmediaip:192.168.1.67.
# U 87.xxx.xxx.99:38000 -> 89.xxx.xxx.16:5060 ACK sip:nick@89.xxx.xxx.8:30626;rinstance=f0677dc7f7d4d2f0 SIP/2.0. Via: SIP/2.0/UDP 192.168.20.16:38000;branch=z9hG4bK-d87543-7e77316e3b41bd7d-1--d87543-;rport. Max-Forwards: 70. Route: sip:89.xxx.xxx.16;lr;ftag=5c63711f. Contact: sip:thomas@87.xxx.xxx.99:38000. To: "Joe Blow"sip:joe@blow.com;tag=ee11f527. From: "Tom"sip:tom@blow.com;tag=5c63711f. Call-ID: NTFjYmM5Y2JhNWE5MzU2NzQ1NTMxYTg2NGQ3ZDYzNmM.. CSeq: 1 ACK. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.xxx.xxx.16:5060 -> 89.xxx.xxx.8:30626 ACK sip:nick@89.xxx.xxx.8:30626;rinstance=f0677dc7f7d4d2f0 SIP/2.0. Record-Route: sip:89.xxx.xxx.16;lr=on;ftag=5c63711f. Via: SIP/2.0/UDP 89.xxx.xxx.16;branch=z9hG4bK674e.0d2a4f64.2. Via: SIP/2.0/UDP 192.168.20.16:38000;received=87.xxx.xxx.99;branch=z9hG4bK-d87543-7e77316e3b41bd7d-1--d87543-;rport=38000. Max-Forwards: 69. Contact: sip:thomas@87.xxx.xxx.99:38000. To: "Joe Blow"sip:joe@blow.com;tag=ee11f527. From: "Tom"sip:tom@blow.com;tag=5c63711f. Call-ID: NTFjYmM5Y2JhNWE5MzU2NzQ1NTMxYTg2NGQ3ZDYzNmM.. CSeq: 1 ACK. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. P-hint: rr-enforced. .
As you can see, the code is appending 127.0.0.1 for no good reason (at least that I can tell)
Any ideas (bug fixes, or tricks...)?
Nick
Maybe the message gets looped to your openser before rewriting the SDP? Watch the loopback device for looped messages:
ngrep -d any port 5060
regards klaus
nick wrote:
Everything seems fine, the SIP messages go tot he right place, the NAT tests are finding everything as they should.. and in the o= row, they're being replaced (more as a test, I don't think it's completely neccessary) without an issue. However, in the c= line, it adds the IP I've specified (for some reason, if I leave it blank it only puts 127.0.0.1; or a mashup of the public address and localhost (as mediaproxy runs on the same machine for the moment).
here are the two sections of code I've added.. these are the only places I call fix_nated_sdp()
if (method=="INVITE") { if (nat_uac_test("8")) { fix_nated_sdp("10","89.xxx.xxx.16"); }; t_on_failure("1"); } else if (method == "BYE" || method == "CANCEL") { end_media_session(); };
onreply_route[1] { if (status=~"(183)|(2[0-9][0-9])") { if (client_nat_test("1")) { fix_contact(); }; if (nat_uac_test("8")) { fix_nated_sdp("10","89.xxx.xxx.16"); }; use_media_proxy(); }; }
I'm using openser 1.1.0 notls, on a dual opteron server running CentOS 4.3
here is a trace of the code in action.. (names changed.. because I enjoy search and replace)
U 89.xxx.xxx.8:30626 -> 89.xxx.xxx.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.xxx.xxx.16;branch=z9hG4bK674e.0d2a4f64.0. Via: SIP/2.0/UDP 192.168.20.16:38000;received=87.xxx.xxx.99;branch=z9hG4bK-d87543-b3783334b231975b-1--d87543-;rport=38000.
Record-Route: sip:89.xxx.xxx.16;lr;ftag=5c63711f. Contact: sip:nick@89.xxx.xxx.8:30626;rinstance=f0677dc7f7d4d2f0. To: "Joe Blow"sip:joe@blow.com;tag=ee11f527. From: "Tom"sip:tom@blow.com;tag=5c63711f. Call-ID: NTFjYmM5Y2JhNWE5MzU2NzQ1NTMxYTg2NGQ3ZDYzNmM.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 237. . v=0. o=- 1 2 IN IP4 192.168.1.67. s=CounterPath X-Lite 3.0. c=IN IP4 192.168.1.67. t=0 0. m=audio 31556 RTP/AVP 0 8 3 101. a=alt:1 1 : 0W8e8Rrk y9fAinpH 192.168.1.67 31556. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv.
# U 89.xxx.xxx.16:5060 -> 87.xxx.xxx.99:38000 SIP/2.0 200 OK. Via: SIP/2.0/UDP 192.168.20.16:38000;received=87.xxx.xxx.99;branch=z9hG4bK-d87543-b3783334b231975b-1--d87543-;rport=38000.
Record-Route: sip:89.xxx.xxx.16;lr;ftag=5c63711f. Contact: sip:nick@89.xxx.xxx.8:30626;rinstance=f0677dc7f7d4d2f0. To: "Joe Blow"sip:joe@blow.com;tag=ee11f527. From: "Tom"sip:tom@blow.com;tag=5c63711f. Call-ID: NTFjYmM5Y2JhNWE5MzU2NzQ1NTMxYTg2NGQ3ZDYzNmM.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 302. . v=0. o=- 1 2 IN IP4 89.xxx.xxx.16. s=CounterPath X-Lite 3.0. c=IN IP4 89.xxx.xxx.16127.0.0.1. t=0 0. m=audio 60070 RTP/AVP 0 8 3 101. a=alt:1 1 : 0W8e8Rrk y9fAinpH 192.168.1.67 31556. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv. a=oldmediaip:192.168.1.67. a=oldmediaip:192.168.1.67.
# U 87.xxx.xxx.99:38000 -> 89.xxx.xxx.16:5060 ACK sip:nick@89.xxx.xxx.8:30626;rinstance=f0677dc7f7d4d2f0 SIP/2.0. Via: SIP/2.0/UDP 192.168.20.16:38000;branch=z9hG4bK-d87543-7e77316e3b41bd7d-1--d87543-;rport.
Max-Forwards: 70. Route: sip:89.xxx.xxx.16;lr;ftag=5c63711f. Contact: sip:thomas@87.xxx.xxx.99:38000. To: "Joe Blow"sip:joe@blow.com;tag=ee11f527. From: "Tom"sip:tom@blow.com;tag=5c63711f. Call-ID: NTFjYmM5Y2JhNWE5MzU2NzQ1NTMxYTg2NGQ3ZDYzNmM.. CSeq: 1 ACK. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.xxx.xxx.16:5060 -> 89.xxx.xxx.8:30626 ACK sip:nick@89.xxx.xxx.8:30626;rinstance=f0677dc7f7d4d2f0 SIP/2.0. Record-Route: sip:89.xxx.xxx.16;lr=on;ftag=5c63711f. Via: SIP/2.0/UDP 89.xxx.xxx.16;branch=z9hG4bK674e.0d2a4f64.2. Via: SIP/2.0/UDP 192.168.20.16:38000;received=87.xxx.xxx.99;branch=z9hG4bK-d87543-7e77316e3b41bd7d-1--d87543-;rport=38000.
Max-Forwards: 69. Contact: sip:thomas@87.xxx.xxx.99:38000. To: "Joe Blow"sip:joe@blow.com;tag=ee11f527. From: "Tom"sip:tom@blow.com;tag=5c63711f. Call-ID: NTFjYmM5Y2JhNWE5MzU2NzQ1NTMxYTg2NGQ3ZDYzNmM.. CSeq: 1 ACK. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. P-hint: rr-enforced. .
As you can see, the code is appending 127.0.0.1 for no good reason (at least that I can tell)
Any ideas (bug fixes, or tricks...)?
Nick
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Klaus Darilion wrote:
Maybe the message gets looped to your openser before rewriting the SDP? Watch the loopback device for looped messages:
ngrep -d any port 5060
regards klaus
this is the ngrep command I've been using up to now..
ngrep -W byline port 5060
would I be missing any packets that way?
check the '-d' argument. If you don't specify '-d', ngrep will only listen to one interface. '-d any' will force ngrep to listen to all interfaces, including the loopback.
Hope this helps, Ovidiu Sas
On 11/21/06, nick nick@mobilia.it wrote:
Klaus Darilion wrote:
Maybe the message gets looped to your openser before rewriting the SDP? Watch the loopback device for looped messages:
ngrep -d any port 5060
regards klaus
this is the ngrep command I've been using up to now..
ngrep -W byline port 5060
would I be missing any packets that way?
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Ovidiu Sas wrote:
check the '-d' argument. If you don't specify '-d', ngrep will only listen to one interface. '-d any' will force ngrep to listen to all interfaces, including the loopback.
Hope this helps, Ovidiu Sas
On 11/21/06, nick nick@mobilia.it wrote:
Klaus Darilion wrote:
Maybe the message gets looped to your openser before rewriting the SDP? Watch the loopback device for looped messages:
ngrep -d any port 5060
ngrep -d any -W byline port 5060
# U 89.XXX.XXX.16:5060 -> 89.XXX.XXX.8:30282 OPTIONS sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f SIP/2.0. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. From: sip:ping@mobilia.it;tag=87578784. To: sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f. Call-ID: d93b5966-05c0a9c7-0613@89.XXX.XXX.16. CSeq: 1 OPTIONS. Content-Length: 0. .
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 OPTIONS sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. From: sip:ping@mobilia.it;tag=97578784. To: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. Call-ID: d93b5966-15c0a9c7-0613@89.XXX.XXX.16. CSeq: 1 OPTIONS. Content-Length: 0. .
# U 89.XXX.XXX.8:30282 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. Contact: sip:192.168.1.67:30282. To: sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f;tag=1309844d. From: sip:ping@mobilia.it;tag=87578784. Call-ID: d93b5966-05c0a9c7-0613@89.XXX.XXX.16. CSeq: 1 OPTIONS. Accept: application/sdp. Accept-Language: en. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 87.XXX.XXX.99:38000 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. Contact: sip:192.168.20.16:38000. To: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424;tag=a757e362. From: sip:ping@mobilia.it;tag=97578784. Call-ID: d93b5966-15c0a9c7-0613@89.XXX.XXX.16. CSeq: 1 OPTIONS. Accept: application/sdp. Accept-Language: en. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.XXX.XXX.8:30282 -> 89.XXX.XXX.16:5060 INVITE sip:Tom@domain.tld SIP/2.0. Via: SIP/2.0/UDP 192.168.1.67:30282;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport. Max-Forwards: 70. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 237. . v=0. o=- 0 2 IN IP4 192.168.1.67. s=CounterPath X-Lite 3.0. c=IN IP4 192.168.1.67. t=0 0. m=audio 30394 RTP/AVP 0 8 3 101. a=alt:1 1 : 32BzQDbx MJsKKhO7 192.168.1.67 30394. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv.
# U 89.XXX.XXX.16:5060 -> 89.XXX.XXX.8:30282 SIP/2.0 100 trying -- your call is important to us. Via: SIP/2.0/UDP 192.168.1.67:30282;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport=30282;received=89.XXX.XXX.8. To: "tom"sip:Tom@domain.tld. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. Server: OpenSer (1.1.0-notls (x86_64/linux)). Content-Length: 0. Warning: 392 89.XXX.XXX.16:5060 "Noisy feedback tells: pid=693 req_src_ip=89.XXX.XXX.8 req_src_port=30282 in_uri=sip:Tom@domain.tld out_uri=sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 via_cnt==1". .
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 INVITE sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Record-Route: sip:89.XXX.XXX.16;lr=on;ftag=6d735567. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bK1a96.ba8989c.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport=30282. Max-Forwards: 69. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 300. . v=0. o=- 0 2 IN IP4 89.XXX.XXX.8. s=CounterPath X-Lite 3.0. c=IN IP4 89.XXX.XXX.8127.0.0.1. t=0 0. m=audio 60080 RTP/AVP 0 8 3 101. a=alt:1 1 : 32BzQDbx MJsKKhO7 192.168.1.67 30394. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv. a=oldmediaip:192.168.1.67. a=oldmediaip:192.168.1.67.
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 INVITE sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Record-Route: sip:89.XXX.XXX.16;lr=on;ftag=6d735567. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bK1a96.ba8989c.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport=30282. Max-Forwards: 69. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 300. . v=0. o=- 0 2 IN IP4 89.XXX.XXX.8. s=CounterPath X-Lite 3.0. c=IN IP4 89.XXX.XXX.8127.0.0.1. t=0 0. m=audio 60080 RTP/AVP 0 8 3 101. a=alt:1 1 : 32BzQDbx MJsKKhO7 192.168.1.67 30394. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv. a=oldmediaip:192.168.1.67. a=oldmediaip:192.168.1.67.
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 INVITE sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Record-Route: sip:89.XXX.XXX.16;lr=on;ftag=6d735567. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bK1a96.ba8989c.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport=30282. Max-Forwards: 69. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 300. . v=0. o=- 0 2 IN IP4 89.XXX.XXX.8. s=CounterPath X-Lite 3.0. c=IN IP4 89.XXX.XXX.8127.0.0.1. t=0 0. m=audio 60080 RTP/AVP 0 8 3 101. a=alt:1 1 : 32BzQDbx MJsKKhO7 192.168.1.67 30394. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv. a=oldmediaip:192.168.1.67. a=oldmediaip:192.168.1.67.
# U 87.XXX.XXX.99:38000 -> 89.XXX.XXX.16:5060 SIP/2.0 180 Ringing. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bK1a96.ba8989c.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport=30282. Record-Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.XXX.XXX.16:5060 -> 89.XXX.XXX.8:30282 SIP/2.0 180 Ringing. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport=30282. Record-Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.XXX.XXX.16:5060 -> 89.XXX.XXX.8:30282 OPTIONS sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f SIP/2.0. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. From: sip:ping@mobilia.it;tag=a7578784. To: sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f. Call-ID: d93b5966-25c0a9c7-a613@89.XXX.XXX.16. CSeq: 1 OPTIONS. Content-Length: 0. .
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 OPTIONS sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. From: sip:ping@mobilia.it;tag=b7578784. To: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. Call-ID: d93b5966-35c0a9c7-a613@89.XXX.XXX.16. CSeq: 1 OPTIONS. Content-Length: 0. .
# U 89.XXX.XXX.8:30282 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. Contact: sip:192.168.1.67:30282. To: sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f;tag=e9468e51. From: sip:ping@mobilia.it;tag=a7578784. Call-ID: d93b5966-25c0a9c7-a613@89.XXX.XXX.16. CSeq: 1 OPTIONS. Accept: application/sdp. Accept-Language: en. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 87.XXX.XXX.99:38000 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. Contact: sip:192.168.20.16:38000. To: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424;tag=bd07d37c. From: sip:ping@mobilia.it;tag=b7578784. Call-ID: d93b5966-35c0a9c7-a613@89.XXX.XXX.16. CSeq: 1 OPTIONS. Accept: application/sdp. Accept-Language: en. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 87.XXX.XXX.99:38000 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bK1a96.ba8989c.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport=30282. Record-Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 240. . v=0. o=- 0 2 IN IP4 192.168.20.16. s=CounterPath X-Lite 3.0. c=IN IP4 192.168.20.16. t=0 0. m=audio 64595 RTP/AVP 0 8 3 101. a=alt:1 1 : 7jIjXByj 7pH5I4Cu 192.168.20.16 38002. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv.
# U 89.XXX.XXX.16:5060 -> 89.XXX.XXX.8:30282 SIP/2.0 200 OK. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-982ac06a2b233339-1--d87543-;rport=30282. Record-Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 INVITE. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. Content-Type: application/sdp. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 303. . v=0. o=- 0 2 IN IP4 87.XXX.XXX.99. s=CounterPath X-Lite 3.0. c=IN IP4 87.XXX.XXX.99127.0.0.1. t=0 0. m=audio 60080 RTP/AVP 0 8 3 101. a=alt:1 1 : 7jIjXByj 7pH5I4Cu 192.168.20.16 38002. a=fmtp:101 0-15. a=rtpmap:101 telephone-event/8000. a=sendrecv. a=oldmediaip:192.168.20.16. a=oldmediaip:192.168.20.16.
# U 89.XXX.XXX.8:30282 -> 89.XXX.XXX.16:5060 ACK sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Via: SIP/2.0/UDP 192.168.1.67:30282;branch=z9hG4bK-d87543-32298a7e3d523e19-1--d87543-;rport. Max-Forwards: 70. Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 ACK. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 ACK sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Record-Route: sip:89.XXX.XXX.16;lr=on;ftag=6d735567. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bK1a96.ba8989c.2. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-32298a7e3d523e19-1--d87543-;rport=30282. Max-Forwards: 69. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 1 ACK. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. P-hint: rr-enforced. .
# U 87.XXX.XXX.99:38000 -> 89.XXX.XXX.16:5060 . .
# U 89.XXX.XXX.16:5060 -> 89.XXX.XXX.8:30282 OPTIONS sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f SIP/2.0. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. From: sip:ping@mobilia.it;tag=c7578784. To: sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f. Call-ID: d93b5966-45c0a9c7-4713@89.XXX.XXX.16. CSeq: 1 OPTIONS. Content-Length: 0. .
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 OPTIONS sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. From: sip:ping@mobilia.it;tag=d7578784. To: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. Call-ID: d93b5966-55c0a9c7-4713@89.XXX.XXX.16. CSeq: 1 OPTIONS. Content-Length: 0. .
# U 89.XXX.XXX.8:30282 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. Contact: sip:192.168.1.67:30282. To: sip:nick@89.XXX.XXX.8:30282;rinstance=1f441f973249207f;tag=d0349f6e. From: sip:ping@mobilia.it;tag=c7578784. Call-ID: d93b5966-45c0a9c7-4713@89.XXX.XXX.16. CSeq: 1 OPTIONS. Accept: application/sdp. Accept-Language: en. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 87.XXX.XXX.99:38000 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16:5060;branch=0. Contact: sip:192.168.20.16:38000. To: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424;tag=d30cb301. From: sip:ping@mobilia.it;tag=d7578784. Call-ID: d93b5966-55c0a9c7-4713@89.XXX.XXX.16. CSeq: 1 OPTIONS. Accept: application/sdp. Accept-Language: en. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.XXX.XXX.8:30282 -> 89.XXX.XXX.16:5060 BYE sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Via: SIP/2.0/UDP 192.168.1.67:30282;branch=z9hG4bK-d87543-d2782e547542fa1c-1--d87543-;rport. Max-Forwards: 70. Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 2 BYE. User-Agent: X-Lite release 1006e stamp 34025. Reason: SIP;description="User Hung Up". Content-Length: 0. .
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 BYE sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Record-Route: sip:89.XXX.XXX.16;lr=on;ftag=6d735567. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bKe996.cf7794e6.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-d2782e547542fa1c-1--d87543-;rport=30282. Max-Forwards: 69. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 2 BYE. User-Agent: X-Lite release 1006e stamp 34025. Reason: SIP;description="User Hung Up". Content-Length: 0. P-hint: rr-enforced. .
# U 89.XXX.XXX.16:5060 -> 87.XXX.XXX.99:38000 BYE sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424 SIP/2.0. Record-Route: sip:89.XXX.XXX.16;lr=on;ftag=6d735567. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bKe996.cf7794e6.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-d2782e547542fa1c-1--d87543-;rport=30282. Max-Forwards: 69. Contact: sip:nick@89.XXX.XXX.8:30282. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 2 BYE. User-Agent: X-Lite release 1006e stamp 34025. Reason: SIP;description="User Hung Up". Content-Length: 0. P-hint: rr-enforced. .
# U 87.XXX.XXX.99:38000 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bKe996.cf7794e6.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-d2782e547542fa1c-1--d87543-;rport=30282. Record-Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 2 BYE. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.XXX.XXX.16:5060 -> 89.XXX.XXX.8:30282 SIP/2.0 200 OK. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-d2782e547542fa1c-1--d87543-;rport=30282. Record-Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 2 BYE. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 87.XXX.XXX.99:38000 -> 89.XXX.XXX.16:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 89.XXX.XXX.16;branch=z9hG4bKe996.cf7794e6.0. Via: SIP/2.0/UDP 192.168.1.67:30282;received=89.XXX.XXX.8;branch=z9hG4bK-d87543-d2782e547542fa1c-1--d87543-;rport=30282. Record-Route: sip:89.XXX.XXX.16;lr;ftag=6d735567. Contact: sip:tom@87.XXX.XXX.99:38000;rinstance=4df9b6b16a763424. To: "tom"sip:Tom@domain.tld;tag=cf479379. From: "Nick"sip:nick@domain.tld;tag=6d735567. Call-ID: ZGJiN2NkMjQyYmRhNTRlMDMwY2JhNzIxMDQ0MDdlNzA.. CSeq: 2 BYE. User-Agent: X-Lite release 1006e stamp 34025. Content-Length: 0. .
# U 89.XXX.XXX.8:30282 -> 89.XXX.XXX.16:5060 . .
exit 32 received, 0 dropped
Ovidiu Sas wrote:
check the '-d' argument. If you don't specify '-d', ngrep will only listen to one interface. '-d any' will force ngrep to listen to all interfaces, including the loopback.
Hope this helps, Ovidiu Sas
BTW, I changed my fix_nated_sdp() command to fix_nated_sdp("10") only, which is adding the origin IP instead of the mediaproxy one.. I don't mind this, but it still seems to be adding the 127.0.0.1
It seems that you are trying to do a double processing of the SDP (that's why you have 2 IPs inside SDP). Check you script if you use force_rtp_proxy and fix_nated_sdp at the same time.
Regards, Ovidiu Sas
On 11/21/06, nick nick@mobilia.it wrote:
Ovidiu Sas wrote:
check the '-d' argument. If you don't specify '-d', ngrep will only listen to one interface. '-d any' will force ngrep to listen to all interfaces, including the loopback.
Hope this helps, Ovidiu Sas
BTW, I changed my fix_nated_sdp() command to fix_nated_sdp("10") only, which is adding the origin IP instead of the mediaproxy one.. I don't mind this, but it still seems to be adding the 127.0.0.1