Hello to all Im trying to register SIP clients (Cisco IP phone and Planet VIP )that are located behind an ADSL line ( and behind NAT), and the first time they register, they receive the OK from OpenSER, but when I reboot the phone, they cant connect again. They receive "401 Unauthorized" from OpenSER. OpenSER isnt returning "401 Unauthorized" in any part of openser.cfg
Im not using firewall. Can the problem be in the type of NAT?
Can someone help me?
Thanks Joao Pereira
Hi,
I am trying to deploy a openser solution supporting NAT traversal. So far I have dome some testing with rtpproxy and have yet to look into the media proxy solution. I have IP Phones that support both audio and video calls and as a requirement the setup should be able to do NAT traversal for both audio and video streams.
Initially two phones connect with only audio streams active. Any side can activate a video request in which case a reinvite is sent to the other side indicating video codecs in the SDP. In case, any one or both sides are nated the server should rewrite SDP port to route traffic through itself. I tried to use a config with nathelper and rtpproxy, Initially audio ports and IP in the SDP are rewritten correctly but when one phone sends a reinvite for video the video port in the 200OK reply message is not rewritten and is sent as received. This results in the video being sent to an incorrect port on the server (running rtpporxy) and therefore no video is relayed.
I see the following error message on my openser log when the 200ok is processed
8(16501) force_rtp_proxy2: incorrect port in reply from rtp proxy
While on the rtpproxy I see the following error message:
received command "L bf73ff3d2a9d46ac82d3d3e06ddad3cc@192.168.1.3 12.33.44.55 36060 630e4f5ec9a842b2ad8c8427c551df66;2 67a41f2f40a84712a591616e973e8f71" lookup request failed: session bf73ff3d2a9d46ac82d3d3e06ddad3cc@192.168.1.3, tags 630e4f5ec9a842b2ad8c8427c551df66;2/67a41f2f40a84712a591616e973e8f71 not found sending reply "0
From what I understand, for some reason, rtpproxy was not able to rewrite
the video port in the 200 OK SDP.
Iam also attaching my cfg for reference.
Looking forward to any pointers.
Regards, Danish ps: I am using cvs (development head) for both openser and rtpproxy
ser.cfg -------------
debug=2 fork=yes log_stderror=yes
port=5065 children=4 check_via=no dns=no rev_dns=no fifo="/tmp/ser_fifo"
loadmodule "/usr/local/lib/openser/modules/sl.so" loadmodule "/usr/local/lib/openser/modules/tm.so" loadmodule "/usr/local/lib/openser/modules/rr.so" loadmodule "/usr/local/lib/openser/modules/maxfwd.so" loadmodule "/usr/local/lib/openser/modules/usrloc.so" loadmodule "/usr/local/lib/openser/modules/textops.so" loadmodule "/usr/local/lib/openser/modules/registrar.so" loadmodule "/usr/local/lib/openser/modules/uri.so" loadmodule "/usr/local/lib/openser/modules/nathelper.so" loadmodule "/usr/local/lib/openser/modules/xlog.so"
modparam("nathelper", "natping_interval", 30) modparam("nathelper", "ping_nated_only", 1) #modparam("nathelper", "rtpproxy_sock", "unix:/var/run/rtpproxy.sock")
modparam("usrloc", "db_mode", 0)
modparam("registrar", "nat_flag", 6)
modparam("rr", "enable_full_lr", 1)
route {
# ----------------------------------------------------------------- # Sanity Check Section # ----------------------------------------------------------------- if (!mf_process_maxfwd_header("10")) { sl_send_reply("483", "Too Many Hops"); return; };
if (msg:len > max_len) { sl_send_reply("513", "Message Overflow"); return; };
# ----------------------------------------------------------------- # Record Route Section # ----------------------------------------------------------------- if (!method=="REGISTER") { record_route(); };
if (method=="BYE" || method=="CANCEL") { unforce_rtp_proxy(); }
# ----------------------------------------------------------------- # Loose Route Section # ----------------------------------------------------------------- if (loose_route()) {
if (has_totag() && (method=="INVITE" || method=="ACK")) { if (nat_uac_test("19")) { setflag(6); force_rport(); fix_nated_contact(); }; force_rtp_proxy("l"); }; route(1); return; };
# ----------------------------------------------------------------- # Call Type Processing Section # ----------------------------------------------------------------- if (!uri==myself) { log("LOG: uri!=myself\n"); route(4); route(1); return; };
if (method=="CANCEL") { route(1); return; } else if (method=="INVITE") { route(3); return; } else if (method=="REGISTER") { route(2); return; };
lookup("aliases"); if (!uri==myself) { route(4); route(1); return; };
if (!lookup("location")) { sl_send_reply("404", "User Not Found"); return; };
route(1); }
route[1] {
# ----------------------------------------------------------------- # Default Message Handler # -----------------------------------------------------------------
t_on_reply("1");
xlog("L_NOTICE","Danish Route[1]: Relaying message [$rm]\n"); if (!t_relay()) { if (method=="INVITE" && isflagset(6)) { unforce_rtp_proxy(); }; sl_reply_error(); }; }
route[2] {
# ----------------------------------------------------------------- # REGISTER Message Handler # ---------------------------------------------------------------- if (!search("^Contact:[ ]**") && nat_uac_test("19")) { xlog("L_NOTICE","Danish: Inroute[2] Found Nated contact\n"); setflag(6); fix_nated_register(); force_rport(); };
sl_send_reply("100", "Trying"); if (!save("location")) { sl_reply_error(); }; }
route[3] {
# ----------------------------------------------------------------- # INVITE Message Handler # -----------------------------------------------------------------
if (nat_uac_test("19")) { setflag(6); }
lookup("aliases"); if (!uri==myself) { route(4); route(1); return; };
if (!lookup("location")) { sl_send_reply("404", "User Not Found"); return; };
route(4); route(1); }
route[4] {
# ----------------------------------------------------------------- # NAT Traversal Section # -----------------------------------------------------------------
if (isflagset(6)) { force_rport(); fix_nated_contact(); force_rtp_proxy(); } }
onreply_route[1] {
if (isflagset(6) && status=~"(180)|(183)|2[0-9][0-9]") {
if (!search("^Content-Length:[ ]*0")) { force_rtp_proxy(); }; };
if (nat_uac_test("1")) {
fix_nated_contact(); }; }
Hi,
most probably the reason is your are not performing properly from script the NAT traversal for sequential request (especially for INVITE).
to be sure that;s the case you may try using rtpproxy for all cases (nated or not) to see if this solves your problem.
regards, bogdan
danish.samad@vocalseeds.com wrote:
Hi,
I am trying to deploy a openser solution supporting NAT traversal. So far I have dome some testing with rtpproxy and have yet to look into the media proxy solution. I have IP Phones that support both audio and video calls and as a requirement the setup should be able to do NAT traversal for both audio and video streams.
Initially two phones connect with only audio streams active. Any side can activate a video request in which case a reinvite is sent to the other side indicating video codecs in the SDP. In case, any one or both sides are nated the server should rewrite SDP port to route traffic through itself. I tried to use a config with nathelper and rtpproxy, Initially audio ports and IP in the SDP are rewritten correctly but when one phone sends a reinvite for video the video port in the 200OK reply message is not rewritten and is sent as received. This results in the video being sent to an incorrect port on the server (running rtpporxy) and therefore no video is relayed.
I did that with a If (loose_route()) if method==INVITE #this is an reinvite unforce_rtpproxy() ... re-aquire rtpproxy ressources.
Then you will get new ports from rtpproxy and everything is working fine :-) At least it did for me.
I guess it's a bug in the rtpproxy, if a ressource is again requested with additional ressources as video.
Br Walter
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Bogdan-Andrei Iancu Sent: Wednesday, May 10, 2006 1:22 PM To: danish.samad@vocalseeds.com Cc: users@openser.org Subject: Re: [Users] rtpproxy + video issues
Hi,
most probably the reason is your are not performing properly from script the NAT traversal for sequential request (especially for INVITE).
to be sure that;s the case you may try using rtpproxy for all cases (nated or not) to see if this solves your problem.
regards, bogdan
danish.samad@vocalseeds.com wrote:
Hi,
I am trying to deploy a openser solution supporting NAT traversal. So far I have dome some testing with rtpproxy and have yet to look into the media proxy solution. I have IP Phones that support both audio and video calls and as a requirement the setup should be able to do NAT traversal for both audio and video streams.
Initially two phones connect with only audio streams active. Any side can activate a video request in which case a reinvite is sent to the other side indicating video codecs in the SDP. In case, any one or both sides are nated the server should rewrite SDP port to route traffic through itself. I tried to use a config with nathelper and rtpproxy, Initially audio ports and IP in the SDP are rewritten correctly but when one phone sends a reinvite for video the video port in the 200OK reply message is not rewritten and is sent as received. This results in the video being sent to an incorrect port on the server (running rtpporxy) and therefore no video is relayed.
_______________________________________________ Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
The bug is in the nathelper, the nathelper add a ";" with an increment id after the from tag (exemple 12344;1 for the audio stream and 12345;2 for the video stream) before sending the request to the rtpproxy. The bug is that he is not doing this with the To tag. So I see that when the reinvite is emitted by the receiver of the call the rtpproxy can't locate correctly audio or video stream and send a 0 port as reply.
I have attached a log where you can see that.
The solutions is to made a little change in the nathelper to also add the ";1" ... for the To tag. It's working for me, I use it with openwengo.
Laurent
all logs
received command "U 3420006225 at 192.168.1.33 83.76.253.30 10600 3835457540;1" new session 3420006225 at 192.168.1.33, tag 3835457540;1 requested, type strong new session on a port 35006 created, tag 3835457540;1 pre-filling caller's address with 83.76.253.30:10600 sending reply "35006 62.2.xxxxxxxx "
received command "U 3420006225 at 192.168.1.33 83.76.253.30 10700 3835457540;2" new session 3420006225 at 192.168.1.33, tag 3835457540;2 requested, type strong new session on a port 35008 created, tag 3835457540;2 pre-filling caller's address with 83.76.253.30:10700 sending reply "35008 62.2.xxxxxxx "
received command "L 3420006225 at 192.168.1.33 62.2.yyyyyy 13908 3835457540;1 as6e4b6526" lookup on ports 35006/35010, session timer restarted pre-filling callee's address with 62.2.195.189:13908 sending reply "35010 62.2.xxxxxxxx "
caller's address filled in: 83.76.253.30:55351 (RTP) callee's address filled in: 193.zzzzzzzzz:19320 (RTP) guessing RTCP port for callee to be 19321 received command "U 3420006225 at 192.168.1.33 193.zzzzzzzz 19320 as6e4b6526;1 3835457540" adding strong flag to existing session, new=1/0/0 lookup on ports 35008/0, session timer restarted pre-filling callee's address with 193.zzzzzzzzz:19320 ---------- >>>>>>>>>> >>>> sending reply "0 62.2.xxxxxx "
received command "L 3420006225 at 192.168.1.33 192.168.1.33 10600 as6e4b6526;1 3835457540" lookup on ports 35012/0, session timer restarted pre-filling caller's address with 192.168.1.33:10600 sending reply "35012 62.2.xxxxxxx "
received command "D 3420006225 at 192.168.1.33 3835457540 as6e4b6526" forcefully deleting session 2 on ports 35012/0 RTP stats: 308 in from callee, 0 in from caller, 308 relayed, 0 dropped RTCP stats: 3 in from callee, 0 in from caller, 3 relayed, 0 dropped session on ports 35012/0 is cleaned up forcefully deleting session 1 on ports 35006/35010 RTP stats: 267 in from callee, 687 in from caller, 954 relayed, 0 dropped
RTCP stats: 1 in from callee, 0 in from caller, 1 relayed, 0 dropped
session on ports 35006/35010 is cleaned up
sending reply "0
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Walter Schober Sent: mercredi, 10. mai 2006 17:52 To: 'Bogdan-Andrei Iancu'; danish.samad@vocalseeds.com Cc: users@openser.org Subject: RE: [Users] rtpproxy + video issues
I did that with a If (loose_route()) if method==INVITE #this is an reinvite unforce_rtpproxy() ... re-aquire rtpproxy ressources.
Then you will get new ports from rtpproxy and everything is working fine :-) At least it did for me.
I guess it's a bug in the rtpproxy, if a ressource is again requested with additional ressources as video.
Br Walter
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Bogdan-Andrei Iancu Sent: Wednesday, May 10, 2006 1:22 PM To: danish.samad@vocalseeds.com Cc: users@openser.org Subject: Re: [Users] rtpproxy + video issues
Hi,
most probably the reason is your are not performing properly from script the NAT traversal for sequential request (especially for INVITE).
to be sure that;s the case you may try using rtpproxy for all cases (nated or not) to see if this solves your problem.
regards, bogdan
danish.samad@vocalseeds.com wrote:
Hi,
I am trying to deploy a openser solution supporting NAT traversal. So far I have dome some testing with rtpproxy and have yet to look into the media proxy solution. I have IP Phones that support both audio and video calls and as a requirement the setup should be able to do NAT traversal for both audio and video streams.
Initially two phones connect with only audio streams active. Any side can activate a video request in which case a reinvite is sent to the other side indicating video codecs in the SDP. In case, any one or both sides are nated the server should rewrite SDP port to route traffic through itself. I tried to use a config with nathelper and rtpproxy, Initially audio ports and IP in the SDP are rewritten correctly but when one phone sends a reinvite for video the video port in the 200OK reply message is not rewritten and is sent as received. This results in the video being sent to an incorrect port on the server (running rtpporxy) and therefore no video is relayed.
_______________________________________________ Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Laurent,
do you have a patch for nathelper to fix this?
thanks and regards, bogdan
Laurent Schweizer wrote:
The bug is in the nathelper, the nathelper add a ";" with an increment id after the from tag (exemple 12344;1 for the audio stream and 12345;2 for the video stream) before sending the request to the rtpproxy. The bug is that he is not doing this with the To tag. So I see that when the reinvite is emitted by the receiver of the call the rtpproxy can't locate correctly audio or video stream and send a 0 port as reply.
I have attached a log where you can see that.
The solutions is to made a little change in the nathelper to also add the ";1" ... for the To tag. It's working for me, I use it with openwengo.
Laurent
all logs
received command "U 3420006225 at 192.168.1.33 83.76.253.30 10600 3835457540;1" new session 3420006225 at 192.168.1.33, tag 3835457540;1 requested, type strong new session on a port 35006 created, tag 3835457540;1 pre-filling caller's address with 83.76.253.30:10600 sending reply "35006 62.2.xxxxxxxx "
received command "U 3420006225 at 192.168.1.33 83.76.253.30 10700 3835457540;2" new session 3420006225 at 192.168.1.33, tag 3835457540;2 requested, type strong new session on a port 35008 created, tag 3835457540;2 pre-filling caller's address with 83.76.253.30:10700 sending reply "35008 62.2.xxxxxxx "
received command "L 3420006225 at 192.168.1.33 62.2.yyyyyy 13908 3835457540;1 as6e4b6526" lookup on ports 35006/35010, session timer restarted pre-filling callee's address with 62.2.195.189:13908 sending reply "35010 62.2.xxxxxxxx "
caller's address filled in: 83.76.253.30:55351 (RTP) callee's address filled in: 193.zzzzzzzzz:19320 (RTP) guessing RTCP port for callee to be 19321 received command "U 3420006225 at 192.168.1.33 193.zzzzzzzz 19320 as6e4b6526;1 3835457540" adding strong flag to existing session, new=1/0/0 lookup on ports 35008/0, session timer restarted pre-filling callee's address with 193.zzzzzzzzz:19320 ---------- >>>>>>>>>> >>>> sending reply "0 62.2.xxxxxx "
received command "L 3420006225 at 192.168.1.33 192.168.1.33 10600 as6e4b6526;1 3835457540" lookup on ports 35012/0, session timer restarted pre-filling caller's address with 192.168.1.33:10600 sending reply "35012 62.2.xxxxxxx "
received command "D 3420006225 at 192.168.1.33 3835457540 as6e4b6526" forcefully deleting session 2 on ports 35012/0 RTP stats: 308 in from callee, 0 in from caller, 308 relayed, 0 dropped RTCP stats: 3 in from callee, 0 in from caller, 3 relayed, 0 dropped session on ports 35012/0 is cleaned up forcefully deleting session 1 on ports 35006/35010 RTP stats: 267 in from callee, 687 in from caller, 954 relayed, 0 dropped
RTCP stats: 1 in from callee, 0 in from caller, 1 relayed, 0 dropped
session on ports 35006/35010 is cleaned up
sending reply "0
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Walter Schober Sent: mercredi, 10. mai 2006 17:52 To: 'Bogdan-Andrei Iancu'; danish.samad@vocalseeds.com Cc: users@openser.org Subject: RE: [Users] rtpproxy + video issues
I did that with a If (loose_route()) if method==INVITE #this is an reinvite unforce_rtpproxy() ... re-aquire rtpproxy ressources.
Then you will get new ports from rtpproxy and everything is working fine :-) At least it did for me.
I guess it's a bug in the rtpproxy, if a ressource is again requested with additional ressources as video.
Br Walter
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Bogdan-Andrei Iancu Sent: Wednesday, May 10, 2006 1:22 PM To: danish.samad@vocalseeds.com Cc: users@openser.org Subject: Re: [Users] rtpproxy + video issues
Hi,
most probably the reason is your are not performing properly from script the NAT traversal for sequential request (especially for INVITE).
to be sure that;s the case you may try using rtpproxy for all cases (nated or not) to see if this solves your problem.
regards, bogdan
danish.samad@vocalseeds.com wrote:
Hi,
I am trying to deploy a openser solution supporting NAT traversal. So far I have dome some testing with rtpproxy and have yet to look into the media proxy solution. I have IP Phones that support both audio and video calls and as a requirement the setup should be able to do NAT traversal for both audio and video streams.
Initially two phones connect with only audio streams active. Any side can activate a video request in which case a reinvite is sent to the other side indicating video codecs in the SDP. In case, any one or both sides are nated the server should rewrite SDP port to route traffic through itself. I tried to use a config with nathelper and rtpproxy, Initially audio ports and IP in the SDP are rewritten correctly but when one phone sends a reinvite for video the video port in the 200OK reply message is not rewritten and is sent as received. This results in the video being sent to an incorrect port on the server (running rtpporxy) and therefore no video is relayed.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Laurent,
I noticed this issue as well. I have started trying to fix the issue by adding some code in rtpproxy (right after the to_tag is matched in handle_command). Looking at your mail I think your solution, by changing nathelper, seems more feasible. Can you send us a patch, so I can test it out on my end as well. If it works I think it should be appended in the development head as well.
Regards, Danish On Wed, 2006-05-10 at 23:32 +0200, Laurent Schweizer wrote:
The bug is in the nathelper, the nathelper add a ";" with an increment id after the from tag (exemple 12344;1 for the audio stream and 12345;2 for the video stream) before sending the request to the rtpproxy. The bug is that he is not doing this with the To tag. So I see that when the reinvite is emitted by the receiver of the call the rtpproxy can't locate correctly audio or video stream and send a 0 port as reply.
I have attached a log where you can see that.
The solutions is to made a little change in the nathelper to also add the ";1" ... for the To tag. It's working for me, I use it with openwengo.
Laurent
all logs
received command "U 3420006225 at 192.168.1.33 83.76.253.30 10600 3835457540;1" new session 3420006225 at 192.168.1.33, tag 3835457540;1 requested, type strong new session on a port 35006 created, tag 3835457540;1 pre-filling caller's address with 83.76.253.30:10600 sending reply "35006 62.2.xxxxxxxx "
received command "U 3420006225 at 192.168.1.33 83.76.253.30 10700 3835457540;2" new session 3420006225 at 192.168.1.33, tag 3835457540;2 requested, type strong new session on a port 35008 created, tag 3835457540;2 pre-filling caller's address with 83.76.253.30:10700 sending reply "35008 62.2.xxxxxxx "
received command "L 3420006225 at 192.168.1.33 62.2.yyyyyy 13908 3835457540;1 as6e4b6526" lookup on ports 35006/35010, session timer restarted pre-filling callee's address with 62.2.195.189:13908 sending reply "35010 62.2.xxxxxxxx "
caller's address filled in: 83.76.253.30:55351 (RTP) callee's address filled in: 193.zzzzzzzzz:19320 (RTP) guessing RTCP port for callee to be 19321 received command "U 3420006225 at 192.168.1.33 193.zzzzzzzz 19320 as6e4b6526;1 3835457540" adding strong flag to existing session, new=1/0/0 lookup on ports 35008/0, session timer restarted pre-filling callee's address with 193.zzzzzzzzz:19320 ---------- >>>>>>>>>> >>>> sending reply "0 62.2.xxxxxx "
received command "L 3420006225 at 192.168.1.33 192.168.1.33 10600 as6e4b6526;1 3835457540" lookup on ports 35012/0, session timer restarted pre-filling caller's address with 192.168.1.33:10600 sending reply "35012 62.2.xxxxxxx "
received command "D 3420006225 at 192.168.1.33 3835457540 as6e4b6526" forcefully deleting session 2 on ports 35012/0 RTP stats: 308 in from callee, 0 in from caller, 308 relayed, 0 dropped RTCP stats: 3 in from callee, 0 in from caller, 3 relayed, 0 dropped session on ports 35012/0 is cleaned up forcefully deleting session 1 on ports 35006/35010 RTP stats: 267 in from callee, 687 in from caller, 954 relayed, 0 dropped
RTCP stats: 1 in from callee, 0 in from caller, 1 relayed, 0 dropped
session on ports 35006/35010 is cleaned up
sending reply "0
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Walter Schober Sent: mercredi, 10. mai 2006 17:52 To: 'Bogdan-Andrei Iancu'; danish.samad@vocalseeds.com Cc: users@openser.org Subject: RE: [Users] rtpproxy + video issues
I did that with a If (loose_route()) if method==INVITE #this is an reinvite unforce_rtpproxy() ... re-aquire rtpproxy ressources.
Then you will get new ports from rtpproxy and everything is working fine :-) At least it did for me.
I guess it's a bug in the rtpproxy, if a ressource is again requested with additional ressources as video.
Br Walter
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Bogdan-Andrei Iancu Sent: Wednesday, May 10, 2006 1:22 PM To: danish.samad@vocalseeds.com Cc: users@openser.org Subject: Re: [Users] rtpproxy + video issues
Hi,
most probably the reason is your are not performing properly from script the NAT traversal for sequential request (especially for INVITE).
to be sure that;s the case you may try using rtpproxy for all cases (nated or not) to see if this solves your problem.
regards, bogdan
danish.samad@vocalseeds.com wrote:
Hi,
I am trying to deploy a openser solution supporting NAT traversal. So far I have dome some testing with rtpproxy and have yet to look into the media proxy solution. I have IP Phones that support both audio and video calls and as a requirement the setup should be able to do NAT traversal for both audio and video streams.
Initially two phones connect with only audio streams active. Any side can activate a video request in which case a reinvite is sent to the other side indicating video codecs in the SDP. In case, any one or both sides are nated the server should rewrite SDP port to route traffic through itself. I tried to use a config with nathelper and rtpproxy, Initially audio ports and IP in the SDP are rewritten correctly but when one phone sends a reinvite for video the video port in the 200OK reply message is not rewritten and is sent as received. This results in the video being sent to an incorrect port on the server (running rtpporxy) and therefore no video is relayed.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello,
This is the diff of my nathelper.c
Laurent
-----Original Message----- From: Danish Samad [mailto:danish.samad@vocalseeds.com] Sent: jeudi, 11. mai 2006 19:10 To: Laurent Schweizer Cc: 'Walter Schober'; 'Bogdan-Andrei Iancu'; users@openser.org Subject: RE: [Users] rtpproxy + video issues
Hi Laurent,
I noticed this issue as well. I have started trying to fix the issue by adding some code in rtpproxy (right after the to_tag is matched in handle_command). Looking at your mail I think your solution, by changing nathelper, seems more feasible. Can you send us a patch, so I can test it out on my end as well. If it works I think it should be appended in the development head as well.
Regards, Danish On Wed, 2006-05-10 at 23:32 +0200, Laurent Schweizer wrote:
The bug is in the nathelper, the nathelper add a ";" with an increment id after the from tag (exemple 12344;1 for the audio stream and 12345;2 for
the
video stream) before sending the request to the rtpproxy. The bug is that
he
is not doing this with the To tag. So I see that when the reinvite is emitted by the receiver of the call the rtpproxy can't locate correctly audio or video stream and send a 0 port as reply.
I have attached a log where you can see that.
The solutions is to made a little change in the nathelper to also add the ";1" ... for the To tag. It's working for me, I use it with openwengo.
Laurent
all logs
received command "U 3420006225 at 192.168.1.33 83.76.253.30 10600 3835457540;1" new session 3420006225 at 192.168.1.33, tag 3835457540;1 requested, type strong new session on a port 35006 created, tag 3835457540;1 pre-filling caller's address with 83.76.253.30:10600 sending reply "35006 62.2.xxxxxxxx "
received command "U 3420006225 at 192.168.1.33 83.76.253.30 10700 3835457540;2" new session 3420006225 at 192.168.1.33, tag 3835457540;2 requested, type strong new session on a port 35008 created, tag 3835457540;2 pre-filling caller's address with 83.76.253.30:10700 sending reply "35008 62.2.xxxxxxx "
received command "L 3420006225 at 192.168.1.33 62.2.yyyyyy 13908 3835457540;1 as6e4b6526" lookup on ports 35006/35010, session timer restarted pre-filling callee's address with 62.2.195.189:13908 sending reply "35010 62.2.xxxxxxxx "
caller's address filled in: 83.76.253.30:55351 (RTP) callee's address filled in: 193.zzzzzzzzz:19320 (RTP) guessing RTCP port for callee to be 19321 received command "U 3420006225 at 192.168.1.33 193.zzzzzzzz 19320 as6e4b6526;1 3835457540" adding strong flag to existing session, new=1/0/0 lookup on ports 35008/0, session timer restarted pre-filling callee's address with 193.zzzzzzzzz:19320 ---------- >>>>>>>>>> >>>> sending reply "0 62.2.xxxxxx "
received command "L 3420006225 at 192.168.1.33 192.168.1.33 10600 as6e4b6526;1 3835457540" lookup on ports 35012/0, session timer restarted pre-filling caller's address with 192.168.1.33:10600 sending reply "35012 62.2.xxxxxxx "
received command "D 3420006225 at 192.168.1.33 3835457540 as6e4b6526" forcefully deleting session 2 on ports 35012/0 RTP stats: 308 in from callee, 0 in from caller, 308 relayed, 0 dropped RTCP stats: 3 in from callee, 0 in from caller, 3 relayed, 0 dropped session on ports 35012/0 is cleaned up forcefully deleting session 1 on ports 35006/35010 RTP stats: 267 in from callee, 687 in from caller, 954 relayed, 0 dropped
RTCP stats: 1 in from callee, 0 in from caller, 1 relayed, 0 dropped
session on ports 35006/35010 is cleaned up
sending reply "0
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On
Behalf
Of Walter Schober Sent: mercredi, 10. mai 2006 17:52 To: 'Bogdan-Andrei Iancu'; danish.samad@vocalseeds.com Cc: users@openser.org Subject: RE: [Users] rtpproxy + video issues
I did that with a If (loose_route()) if method==INVITE #this is an reinvite unforce_rtpproxy() ... re-aquire rtpproxy ressources.
Then you will get new ports from rtpproxy and everything is working fine
:-)
At least it did for me.
I guess it's a bug in the rtpproxy, if a ressource is again requested with additional ressources as video.
Br Walter
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On
Behalf
Of Bogdan-Andrei Iancu Sent: Wednesday, May 10, 2006 1:22 PM To: danish.samad@vocalseeds.com Cc: users@openser.org Subject: Re: [Users] rtpproxy + video issues
Hi,
most probably the reason is your are not performing properly from script the NAT traversal for sequential request (especially for INVITE).
to be sure that;s the case you may try using rtpproxy for all cases (nated or not) to see if this solves your problem.
regards, bogdan
danish.samad@vocalseeds.com wrote:
Hi,
I am trying to deploy a openser solution supporting NAT traversal. So
far
I have dome some testing with rtpproxy and have yet to look into the media proxy solution. I have IP Phones that support both audio and video calls and as a requirement the setup should be able to do NAT traversal for both audio and video streams.
Initially two phones connect with only audio streams active. Any side
can
activate a video request in which case a reinvite is sent to the other side indicating video codecs in the SDP. In case, any one or both sides are nated the server should rewrite SDP port to route traffic through itself. I tried to use a config with nathelper and rtpproxy, Initially audio ports and IP in the SDP are rewritten correctly but when one phone sends a reinvite for video the video port in the 200OK reply message is not rewritten and is sent as received. This results in the video being sent to an incorrect port on the server (running rtpporxy) and therefore no video is relayed.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Laurent,
I made some small optimizations on your patch - it's committed on the CVS - I will really appreciate if you could run some tests to see if I didn't brake something. If ok, I will backport the fix to stable also.
thanks and regards, bogdan
Bogdan-Andrei Iancu wrote:
Hi Laurent,
I will take a look on it and if everything ok I will take care to include it on the CVS.
Thanks and regards, Bogdan
Laurent Schweizer wrote:
Hello,
This is the diff of my nathelper.c
Laurent
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello!
Tested it with 2006-05-15 devel snapshot. Works fine now.
Br Walter
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Bogdan-Andrei Iancu Sent: Monday, May 15, 2006 12:54 PM To: Laurent Schweizer Cc: users@openser.org Subject: Re: [Users] rtpproxy + video issues
Hi Laurent,
I made some small optimizations on your patch - it's committed on the CVS - I will really appreciate if you could run some tests to see if I didn't brake something. If ok, I will backport the fix to stable also.
thanks and regards, bogdan
Bogdan-Andrei Iancu wrote:
Hi Laurent,
I will take a look on it and if everything ok I will take care to include it on the CVS.
Thanks and regards, Bogdan
Laurent Schweizer wrote:
Hello,
This is the diff of my nathelper.c
Laurent
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Joao Pereira wrote:
Hello to all Im trying to register SIP clients (Cisco IP phone and Planet VIP )that are located behind an ADSL line ( and behind NAT), and the first time they register, they receive the OK from OpenSER, but when I reboot the phone, they cant connect again. They receive "401 Unauthorized" from OpenSER. OpenSER isnt returning "401 Unauthorized" in any part of openser.cfg
It is sent in proxy_authenticate. maybe the client does not send correct password? verify the REGISTER messages.
regards klaus
Im not using firewall. Can the problem be in the type of NAT?
Can someone help me?
Thanks Joao Pereira
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users