Hi All,
Has anyone tried nathelper but not using rtpproxy, my server is on a location with limited bandwidth so i'd like to be able to just have the sip messages to the server but not the media. Do i need all phones configured to use STUN if the SIP server is configured that way?
Thank You in Advanced
Regards, Nhadie
If you can't handle media streams due to bandwith limitations you can tell your users to use STUN but be aware that some NAT topologies can't be solved with this solution.
Samuel.
2007/7/31, Nhadie Ramos nhadie@tbgi.net.ph:
Hi All,
Has anyone tried nathelper but not using rtpproxy, my server is on a location with limited bandwidth so i'd like to be able to just have the sip messages to the server but not the media. Do i need all phones configured to use STUN if the SIP server is configured that way?
Thank You in Advanced
Regards, Nhadie
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi there Nhadie,
if you use STUN or any other way of detecting the public IP (eg. ICE) and u do it properly, u can configure OpenSER without rtpproxy. Just make sure u have proper connection IP in your SDP (if your devices are on PUBLIC IP make sure that is public as well).
From the configuration point of view, u need to remove the lines with
force_rtpproxy() and unforce_rtpproxy() and u will have no media proxy support then.
Let me know if u need any additional info.
Cheers, DanB
On 7/31/07, Nhadie Ramos nhadie@tbgi.net.ph wrote:
Hi All,
Has anyone tried nathelper but not using rtpproxy, my server is on a location with limited bandwidth so i'd like to be able to just have the sip messages to the server but not the media. Do i need all phones configured to use STUN if the SIP server is configured that way?
Thank You in Advanced
Regards, Nhadie
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Dan, My pstn gateway is on public IP, my SIP server is also on public IP. most clients are behind NAT, using DSL routers, STUNS are configured on the PAP2's
This is a part of the config, what can i change to not use rtpproxy, i read somewhere to use fix_nated_sdp("3"), i tried that but callers cannot hear the other side
if (nat_uac_test("19")) { if (method=="REGISTER" || !search("^Record-Route:")) { log("LOG: Someone trying to register from private IP, rewriting\n"); fix_nated_contact(); if (method == "INVITE") { fix_nated_sdp("1"); }; force_rport(); setflag(6); }; };
if ((uri=~"^(sip:)?00*@([a-z]+.)?mydomain.com") || (uri=~"^(sip:)?00*@202.202.202.202")) { if (isflagset(8)) {xlog("L_INFO", "Calls to PSTN\n");}; if (isflagset(6)) {route(1);}; strip(2); if (isflagset(8)) {xlog("L_INFO", "Retail Server\n");}; prefix("12345#"); rewritehostport("203.203.203.203:5060"); consume_credentials(); t_relay_to_udp("203.203.203.203", "5060"); break; }
route[1] { xlog("L_INFO", "User-Agent behind NAT\n"); force_rtp_proxy(); if (method=="INVITE") { t_on_reply("1"); }; append_hf("P-Behind-NAT: Yes\r\n"); break; }
onreply_route[1] { if (status =~ "(180)|(183)|2[0-9][0-9]") { fix_nated_contact(); if (!(search("^Content-Length:\ 0"))) { force_rtp_proxy(); }; }; }
Regards, Nhadie
Dan-Cristian Bogos wrote:
Hi there Nhadie,
if you use STUN or any other way of detecting the public IP (eg. ICE) and u do it properly, u can configure OpenSER without rtpproxy. Just make sure u have proper connection IP in your SDP (if your devices are on PUBLIC IP make sure that is public as well).
From the configuration point of view, u need to remove the lines with
force_rtpproxy() and unforce_rtpproxy() and u will have no media proxy support then.
Let me know if u need any additional info.
Cheers, DanB
On 7/31/07, Nhadie Ramos nhadie@tbgi.net.ph wrote:
Hi All,
Has anyone tried nathelper but not using rtpproxy, my server is on a location with limited bandwidth so i'd like to be able to just have the sip messages to the server but not the media. Do i need all phones configured to use STUN if the SIP server is configured that way?
Thank You in Advanced
Regards, Nhadie
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
In normal cases, as mentioned earlier, removing force_rtp_proxy(); should do the trick. Otherwise, can u post somewhere your INVITES coming in and out from the server?
DanB
On 7/31/07, Nhadie Ramos nhadie@tbgi.net.ph wrote:
Hi Dan, My pstn gateway is on public IP, my SIP server is also on public IP. most clients are behind NAT, using DSL routers, STUNS are configured on the PAP2's
This is a part of the config, what can i change to not use rtpproxy, i read somewhere to use fix_nated_sdp("3"), i tried that but callers cannot hear the other side
if (nat_uac_test("19")) { if (method=="REGISTER" || !search("^Record-Route:")) { log("LOG: Someone trying to register from
private IP, rewriting\n"); fix_nated_contact(); if (method == "INVITE") { fix_nated_sdp("1"); }; force_rport(); setflag(6); }; };
if ((uri=~"^(sip:)?00*@([a-z]+.)?mydomain.com") || (uri=~"^(sip:)?00*@202.202.202.202")) { if (isflagset(8)) {xlog("L_INFO", "Calls to PSTN\n");}; if (isflagset(6)) {route(1);}; strip(2); if (isflagset(8)) {xlog("L_INFO", "Retail Server\n");}; prefix("12345#"); rewritehostport("203.203.203.203:5060"); consume_credentials(); t_relay_to_udp("203.203.203.203", "5060"); break; }
route[1] { xlog("L_INFO", "User-Agent behind NAT\n"); force_rtp_proxy(); if (method=="INVITE") { t_on_reply("1"); }; append_hf("P-Behind-NAT: Yes\r\n"); break; }
onreply_route[1] { if (status =~ "(180)|(183)|2[0-9][0-9]") { fix_nated_contact(); if (!(search("^Content-Length:\ 0"))) { force_rtp_proxy(); }; }; }
Regards, Nhadie
Dan-Cristian Bogos wrote:
Hi there Nhadie,
if you use STUN or any other way of detecting the public IP (eg. ICE) and u do it properly, u can configure OpenSER without rtpproxy. Just make sure u have proper connection IP in your SDP (if your devices are on PUBLIC IP make sure that is public as well).
From the configuration point of view, u need to remove the lines with
force_rtpproxy() and unforce_rtpproxy() and u will have no media proxy support then.
Let me know if u need any additional info.
Cheers, DanB
On 7/31/07, Nhadie Ramos nhadie@tbgi.net.ph wrote:
Hi All,
Has anyone tried nathelper but not using rtpproxy, my server is on a location with limited bandwidth so i'd like to be able to just have the sip messages to the server but not the media. Do i need all phones configured to use STUN if the SIP server is configured that way?
Thank You in Advanced
Regards, Nhadie
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
El Tuesday 31 July 2007 09:42:31 Nhadie Ramos escribió:
Has anyone tried nathelper but not using rtpproxy, my server is on a location with limited bandwidth so i'd like to be able to just have the sip messages to the server but not the media. Do i need all phones configured to use STUN if the SIP server is configured that way?
Note that STUN will not work behind Symetric NAT that is, unfortunatelly, a very common NAT type in commercial ADSL routers installed by telcos.
Hi Dan,
Actually, that's all the part where an INVITE is processed except for the the part where a local user is called.
Hi Inaki,
How about those Linksys DSL router? Does STUN work on them? What other tool can I use besides STUN?
Also, does anyone have a sample STUN config on a PAP2 maybe i'm doing it wrong. Do I have to enable NAT Mapping? Do I handle VIA Hdrs? etc. etc. Those are parameters i see on enabling the STUN.
TIA
Regards, Nhadie
Iñaki Baz Castillo wrote:
El Tuesday 31 July 2007 09:42:31 Nhadie Ramos escribió:
Has anyone tried nathelper but not using rtpproxy, my server is on a location with limited bandwidth so i'd like to be able to just have the sip messages to the server but not the media. Do i need all phones configured to use STUN if the SIP server is configured that way?
Note that STUN will not work behind Symetric NAT that is, unfortunatelly, a very common NAT type in commercial ADSL routers installed by telcos.
El Tuesday 31 July 2007 11:59:42 Nhadie Ramos escribió:
Hi Inaki,
How about those Linksys DSL router? Does STUN work on them?
I don't know Linksys DSL routers. I jsut can tell you that other SIP NAT oslution is using routers with ALG, that is, the router modify the SIP headers (Contact header, RTP media contact...) but in MANY cases they wrong terribly bad. For example, my home router (Zyxel P660) has ALG enabled by default and it works BAD BAD BAD, it writes things as: Via: SIP/2.0/UDP xx.xx.xx.xx:2867760;branch=z9hG4bK54e0ac3f;rport Look at the port 2867760 !!!!!!!!!!!!! XD
So the solution in this router (thanks to JesusR) is dissabling ALG via telnet: ip nat service sip active 0
What other tool can I use besides STUN?
Note that the target of STUN is to appear as if the device has public IP. So if a device is using STUN the OpenSer will not know that it's behind NAT (this is great in fact). So dont worry so much about STUN. The only problem is cases where the router has symetric NAT that is not valid for using with STUN. In this case you need ALG (but they are mos terrible) or server side NAT helping (rtp proxy and so).
Also, does anyone have a sample STUN config on a PAP2 maybe i'm doing it wrong. Do I have to enable NAT Mapping? Do I handle VIA Hdrs? etc. etc. Those are parameters i see on enabling the STUN.
The only thing you must configure is: STUN Enable: yes STUN server: any STUN server (as stun.ekiga.net)
No more is needed to change (depending in your OpenSer configuratio, of course, but for example I need no changes).