Hi ! I don't know that is a ser problem but I cannot make a call from ATA-186 ( with analog phone) to PSTN phone via my gateway. I receive 400 Bad Request - Invalid IP address If I call to IP everything is ok.
I don't have this proble when I call from softphone like kphone to PSTN phone.
Did somebody have similar problem ? Which version of ATA software do you use ?
Regards Andrzej
Hi,
On Tuesday 18 November 2003 22:54, radan wrote:
I don't know that is a ser problem but I cannot make a call from ATA-186 ( with analog phone) to PSTN phone via my gateway. I receive 400 Bad Request - Invalid IP address If I call to IP everything is ok.
I don't have this proble when I call from softphone like kphone to PSTN phone.
please make network dumps, e.g. with ngrep, to find the error source. If you are not able to find the error yourself, send the network dumps to us for review.
Regards Nils
Did somebody have similar problem ? Which version of ATA software do you use ?
Regards Andrzej
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
On Tue, 18 Nov 2003, Nils Ohlmeier wrote:
Hi,
On Tuesday 18 November 2003 22:54, radan wrote:
I don't know that is a ser problem but I cannot make a call from ATA-186 ( with analog phone) to PSTN phone via my gateway. I receive 400 Bad Request - Invalid IP address If I call to IP everything is ok.
I don't have this proble when I call from softphone like kphone to PSTN phone.
please make network dumps, e.g. with ngrep, to find the error source. If you are not able to find the error yourself, send the network dumps to us for review.
I know probably what is wrong but i cannot solve it yet If I make a call from Messenger i have only one INVITE directly from SER to gateway.
If I make call form ATA I have two invites One from ATA to ser and second from ser to gateway
in ser.cfg i send special prefixes directly to GW
if (uri=~"sip:58[1-2]([0-9]){3}(@(a.gda.pl|192.68.19.200.200)?)" && !(src_ip==192.68.252.248/32)) { addRecordRoute(); rewriteFromRoute(); # strip(2); setflag(1); if (!t_relay_to_udp("192.68.252.248", "5060")) { sl_reply_error();
Below ngrep for ATA - doesn't work SER - 192.68.200.200 ATA - 192.68.0.83 GW - 192.68.252.248
U 192.68.0.83:5060 -> 192.68.200.200:5060 INVITE sip:581077@192.68.200.200;user=phone SIP/2.0..Via: SIP/2.0/UDP 192.68.0.83:5060..From: sip:3100@192.68.251.240;user=phone;tag=32426929..To: sip:581077@192.68.200.200;user=phone..Call-ID: 2776449328@192.68.0.83..CSeq: 1 INVITE..Contact: sip:3100@192.68.0.83:5060;user=phone;transport=udp..User-Agent: Cisco ATA 186 v2.16.1 ata18x (030709a).. Expires: 300..Content-Length: 247..Content-Type: application/sdp....v=0..o=3100 124553 124553 IN IP4 192.68.0.83..s= ATA186 Call..c=IN IP4 192.68.0.83..t=0 0..m=audio 16384 RTP/AVP 0 4 8 101..a=rtpmap:0 PCMU/8000/1..a=rtpmap:4 G723/8000/1..a=rtpmap:8 PCMA/8000/1..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-15.. # U 192.68.200.200:5060 -> 192.68.252.248:5060 INVITE sip:581077@192.68.200.200;user=phone SIP/2.0.. Record-Route: sip:581077@192.68.200.200;branch=0.. Via: SIP/2.0/UDP 192.68.200.200;branch=z9hG4bK7682.86ed6384.0.. Via: SIP/2.0/UDP 192.68.0.83:5060.. From: sip:3100@192.68.251.240;user=phone;tag=32426929.. To: sip:581077@192.68.200.200;user=phone..Call-ID: 2776449328@192.68.0.83.. CSeq: 1 INVITE.. Contact: sip:3100@192.68.0.83:5060;user=phone;transport=udp.. User-Agent: Cisco ATA 186 v2.16.1 ata18x (030709a).. Expires: 300..Content-Length: 247.. Content-Type: application/sdp.... v=0..o=3100 124553 124553 IN IP4 192.68.0.83.. s=ATA186 Call.. c=IN IP4 192.68.0.83.. t=0 0.. m=audio 16384 RTP/AVP 0 4 8 101.. a=rtpmap:0 PCMU/8000/1.. a=rtpmap:4 G723/8000/1.. a=rtpmap:8 PCMA/8000/1..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-15.. # U 192.68.252.248:5060 -> 192.68.200.200:5060 SIP/2.0 400 Bad Request - 'Invalid IP Address'.. Via: SIP/2.0/UDP 192.68.200.200;branch=z9hG4bK7682.86ed6384.0,SIP/2.0/UDP 192.68.0.83:5060.. From: sip:3100@192.68.200.200;user=phone;tag=32426929.. To: sip:581077@192.68.200.200;user=phone.. Date: Tue, 18 Nov 2003 22:30:41 GMT..Call-ID: 2776449328@192.68.0.83.. Server: Cisco-SIPGateway/IOS-12.x.. CS
And working version from Messenger
U 192.68.200.200:5060 -> 192.68.252.248:5060 INVITE sip:581077@a.gda.pl SIP/2.0.. Record-Route: sip:581077@192.68.200.200;branch=0.. Via: SIP/2.0/UDP 192.68.200.200;branch=z9hG4bK496b.d55143d5.0.. Via: SIP/2.0/UDP 192.68.0.85:16739.. From: "anji" sip:anji@a.gda.pl;tag=13eb9483-1a0e-11d8-8b8e-00a0240234c9.. To: sip:581077@a.gda.pl.. Call-ID: 13eb9484-1a0e-11d8-8b8e-00a0240234c9@192.68.0.85.. CSeq: 1 INVITE.. Contact : sip:192.68.0.85:16739.. User-Agent: Windows RTC/1.0..Content-Type: application/sdp.. Content-Length: 263.... v=0.. o=user 00 IN IP4 192.68.0.85.. s=session..c=IN IP4 192.68.0.85.. b=CT:1000.. t=0 0.. m=audio 11248 RTP/AVP 97 0 8 4 101.. a=rtpmap:97 red/8000.. a=rtpmap:0 PCMU/8000.. a=rtpmap:8 PCMA/8000.. a=rtpmap:4 G723/8000.. a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-16. . # U 192.68.252.248:5060 -> 192.68.200.200:5060 SIP/2.0 100 Trying..Via: SIP/2.0/UDP 192.68.200.200;branch=z9hG4bK496b.d55143d5.0,SIP/2.0/UDP 192.68.0.85:16739..From: "anji" sip:anji@a.gda.pl;tag=13eb9483-1a0e-11d8-8b8e-00a0240234c9.. To: sip:581077@a.gda.pl;tag=B0746E68-1ECE.. Date: Tue, 18Nov 2003 23:16:55 GMT..Call-ID: 13eb9484-1a0e-11d8-8b8e-00a0240234c9@192.68.0.85.. Server: Cisco-SIPGateway/IOS-12.x..CSeq: 1 INVITE..Allow-Events: telephone-event..Content-Length: 0....
Regards Andrzej
Hello all,
I am having a bit of a problem with getting RTP Proxy to work the way I need it to with PSTN gateway calling.
When I call from the PSTN gateway to the softphone it uses the rtp ptoxy both ways, from ser to the gateway and from ser to the softphone. When I call from the softphone to the PSTN how ever it only proxys from the gateway to ser and not from ser to the softphone.
I have tried all sorts of things to force_rtp_proxy for both ends of the call but so far it's a no go.
Any help would be great.
One thing I did notice is that when I call from the PSTN to the softphone it matches a transaction and the rtp proxy works for both ends, but when calling from the softphone to the PSTN is says failed to match transaction and the rtp proxy only works for one end of the call.
Thanks in advance,
Stephen
# main routing logic
route{ # initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (msg:len >= max_len ) { sl_send_reply("513", "Message too big"); break; };
# !! Nathelper # Special handling for NATed clients; first, NAT test is # executed: it looks for via!=received and RFC1918 addresses # in Contact (may fail if line-folding is used); also, # the received test should, if completed, should check all # vias for rpesence of received #if (nat_uac_test("3")) { # Allow RR-ed requests, as these may indicate that # a NAT-enabled proxy takes care of it; unless it is # a REGISTER
if (method == "REGISTER" || ! search("^Record-Route:")) { log("LOG: Someone trying to register from private IP, rewriting\n");
# This will work only for user agents that support symmetric # communication. We tested quite many of them and majority is # smart enough to be symmetric. In some phones it takes a configuration # option. With Cisco 7960, it is called NAT_Enable=Yes, with kphone it is # called "symmetric media" and "symmetric signalling".
fix_nated_contact(); # Rewrite contact with source IP of signalling force_rport(); # Add rport parameter to topmost Via setflag(6); # Mark as NATed }; #};
if (method == "INVITE") { fix_nated_sdp("1"); # Add direction=active to SDP log("Arse: forcing rtpproxy in invite"); force_rtp_proxy(); log("Arse: fix_nated_sdp being run"); }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol #if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take the # path determined by record-routing if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); route(1); break; };
if (!uri==myself) { # mark routing logic in request append_hf("P-hint: outbound\r\n"); route(1); break; };
# if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri=~"202.180.83.12") { rewritehostport("sipsrv2.tranzpeer.net:5060"); }; if (uri=~"sipsrv2.tranzpeer.net") {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication if (!www_authorize("sipsrv2.tranzpeer.net", "subscriber")) { www_challenge("sipsrv2.tranzpeer.net", "0"); break; };
save("location"); break; };
lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; };
# native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { forward(202.180.125.200,5060); # sl_send_reply("404", "Not Found"); break; }; }; append_hf("P-hint: usrloc applied\r\n"); route(1); }
route[1] { # !! Nathelper if (uri=~"[@:](192.168.|10.|172.(1[6-9]|2[0-9]|3[0-1]).)" && !search("^Route:")){ sl_send_reply("479", "We don't forward to private IP addresses"); break; };
# if client or server know to be behind a NAT, enable relay if (isflagset(6)) { log("Arse: force_rtp_proxy\n"); force_rtp_proxy(); };
# NAT processing of replies; apply to all transactions (for example, # re-INVITEs from public to private UA are hard to identify as # NATed at the moment of request processing); look at replies t_on_reply("1");
# send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; }
# !! Nathelper onreply_route[1] { # NATed transaction ? if (isflagset(6) && status =~ "(183)|2[0-9][0-9]") { fix_nated_contact(); force_rtp_proxy(); # otherwise, is it a transaction behind a NAT and we did not # know at time of request processing ? (RFC1918 contacts) } else if (nat_uac_test("1")) { fix_nated_contact(); }; }
----------------------------------------------------------------------------------------------- This message and any attachments contain privileged and confidential information. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify the sender immediately via email and then destroy this message and any attachments.
At 11:33 PM 11/18/2003, Stephen Miles wrote:
Hello all,
I am having a bit of a problem with getting RTP Proxy to work the way I need it to with PSTN gateway calling.
When I call from the PSTN gateway to the softphone it uses the rtp ptoxy both ways, from ser to the gateway and from ser to the softphone. When I call from the softphone to the PSTN how ever it only proxys from the gateway to ser and not from ser to the softphone.
I have tried all sorts of things to force_rtp_proxy for both ends of the call but so far it's a no go.
Any help would be great.
One thing I did notice is that when I call from the PSTN to the softphone it matches a transaction and the rtp proxy works for both ends, but when calling from the softphone to the PSTN is says failed to match transaction and the rtp proxy only works for one end of the call.
Can you send the network dumps and the logs in question too -- that may be the reason. If a reply is constructed in a way that mismatches with original request, no changes to rtprpoxy will be applied.
Also, make sure that you are using latest CVS version from HEAD, some of the features in the script are based on it.
-jiri
Thanks in advance,
Stephen
# main routing logic
route{ # initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (msg:len >= max_len ) { sl_send_reply("513", "Message too big"); break; };
# !! Nathelper # Special handling for NATed clients; first, NAT test is # executed: it looks for via!=received and RFC1918 addresses # in Contact (may fail if line-folding is used); also, # the received test should, if completed, should check all # vias for rpesence of received #if (nat_uac_test("3")) { # Allow RR-ed requests, as these may indicate that # a NAT-enabled proxy takes care of it; unless it is # a REGISTER if (method == "REGISTER" || ! search("^Record-Route:")) { log("LOG: Someone trying to register from private IP, rewriting\n"); # This will work only for user agents that support symmetric # communication. We tested quite many of them and majority is # smart enough to be symmetric. In some phones it takes a configuration # option. With Cisco 7960, it is called NAT_Enable=Yes, with kphone it is # called "symmetric media" and "symmetric signalling". fix_nated_contact(); # Rewrite contact with source IP of signalling force_rport(); # Add rport parameter to topmost Via setflag(6); # Mark as NATed }; #}; if (method == "INVITE") { fix_nated_sdp("1"); # Add direction=active to SDP log("Arse: forcing rtpproxy in invite"); force_rtp_proxy(); log("Arse: fix_nated_sdp being run"); }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol #if (!method=="REGISTER") record_route(); # subsequent messages withing a dialog should take the # path determined by record-routing if (loose_route()) { # mark routing logic in request append_hf("P-hint: rr-enforced\r\n"); route(1); break; }; if (!uri==myself) { # mark routing logic in request append_hf("P-hint: outbound\r\n"); route(1); break; }; # if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri=~"202.180.83.12") { rewritehostport("sipsrv2.tranzpeer.net:5060"); }; if (uri=~"sipsrv2.tranzpeer.net") { if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication if (!www_authorize("sipsrv2.tranzpeer.net", "subscriber")) { www_challenge("sipsrv2.tranzpeer.net", "0"); break; };
save("location"); break; }; lookup("aliases"); if (!uri==myself) { append_hf("P-hint: outbound alias\r\n"); route(1); break; }; # native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { forward(202.180.125.200,5060);
# sl_send_reply("404", "Not Found"); break; }; }; append_hf("P-hint: usrloc applied\r\n"); route(1); }
route[1] { # !! Nathelper if (uri=~"[@:](192.168.|10.|172.(1[6-9]|2[0-9]|3[0-1]).)" && !search("^Route:")){ sl_send_reply("479", "We don't forward to private IP addresses"); break; };
# if client or server know to be behind a NAT, enable relay if (isflagset(6)) { log("Arse: force_rtp_proxy\n"); force_rtp_proxy(); }; # NAT processing of replies; apply to all transactions (for example, # re-INVITEs from public to private UA are hard to identify as # NATed at the moment of request processing); look at replies t_on_reply("1"); # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); };
}
# !! Nathelper onreply_route[1] { # NATed transaction ? if (isflagset(6) && status =~ "(183)|2[0-9][0-9]") { fix_nated_contact(); force_rtp_proxy(); # otherwise, is it a transaction behind a NAT and we did not # know at time of request processing ? (RFC1918 contacts) } else if (nat_uac_test("1")) { fix_nated_contact(); }; }
This message and any attachments contain privileged and confidential information. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify the sender immediately via email and then destroy this message and any attachments.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/