Hi, I have Kamailio as SIP server and RTP server. Client is PJSIP.
I read that STUN is for non-symmetric NAT, and RTP server is for symmetric NAT.
Supposed A calls B.
If A, B both use symmetric NAT and STUN, they cannot hear each other If A or B use non-symmetric NAT and NOT using STUN, they cannot hear each other.
Why is that?
I read http://tools.ietf.org/id/draft-takeda-symmetric-nat-traversal-00.txt for Prediction Failure, is that related to this problem ?
Hello,
Look on Wikipedia and read the articles for SIP, RTP, NAT and STUN.
The answer to your question can be found in the above articles.
David
On 13-02-27 10:26 PM, Khoa Pham wrote:
Hi, I have Kamailio as SIP server and RTP server. Client is PJSIP.
I read that STUN is for non-symmetric NAT, and RTP server is for symmetric NAT.
Supposed A calls B.
If A, B both use symmetric NAT and STUN, they cannot hear each other If A or B use non-symmetric NAT and NOT using STUN, they cannot hear each other.
Why is that?
I read http://tools.ietf.org/id/draft-takeda-symmetric-nat-traversal-00.txt for Prediction Failure, is that related to this problem ?
-- Khoa Pham HCMC University of Science Faculty of Information Technology
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi David, I already read all of these. But the problem seems contradict with what I read
On Thu, Feb 28, 2013 at 9:56 PM, David kamailio.org@spam.lublink.netwrote:
Hello,
Look on Wikipedia and read the articles for SIP, RTP, NAT and STUN.
The answer to your question can be found in the above articles.
David
On 13-02-27 10:26 PM, Khoa Pham wrote:
Hi, I have Kamailio as SIP server and RTP server. Client is PJSIP.
I read that STUN is for non-symmetric NAT, and RTP server is for symmetric NAT.
Supposed A calls B.
If A, B both use symmetric NAT and STUN, they cannot hear each other If A or B use non-symmetric NAT and NOT using STUN, they cannot hear each other.
Why is that?
I read http://tools.ietf.org/id/draft-takeda-symmetric-nat-traversal-00.txt for Prediction Failure, is that related to this problem ?
-- Khoa Pham HCMC University of Science Faculty of Information Technology
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
stun works pretty well for non-symmetric nat. If there is symmetric nat, then you need a rtp relay (e.g., rtpproxy) or turn server.
Cheers, Daniel
On 2/28/13 5:48 PM, Khoa Pham wrote:
Hi David, I already read all of these. But the problem seems contradict with what I read
On Thu, Feb 28, 2013 at 9:56 PM, David <kamailio.org@spam.lublink.net mailto:kamailio.org@spam.lublink.net> wrote:
Hello, Look on Wikipedia and read the articles for SIP, RTP, NAT and STUN. The answer to your question can be found in the above articles. David On 13-02-27 10:26 PM, Khoa Pham wrote:
Hi, I have Kamailio as SIP server and RTP server. Client is PJSIP. I read that STUN is for non-symmetric NAT, and RTP server is for symmetric NAT. Supposed A calls B. If A, B both use symmetric NAT and STUN, they cannot hear each other If A or B use non-symmetric NAT and NOT using STUN, they cannot hear each other. Why is that? I read http://tools.ietf.org/id/draft-takeda-symmetric-nat-traversal-00.txt for Prediction Failure, is that related to this problem ? -- Khoa Pham HCMC University of Science Faculty of Information Technology _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Khoa Pham HCMC University of Science Faculty of Information Technology
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
@Daniel, how can the SIP proxy determine whether to use rtpproxy or not ?
On Sun, Mar 3, 2013 at 11:58 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
stun works pretty well for non-symmetric nat. If there is symmetric nat, then you need a rtp relay (e.g., rtpproxy) or turn server.
Cheers, Daniel
On 2/28/13 5:48 PM, Khoa Pham wrote:
Hi David, I already read all of these. But the problem seems contradict with what I read
On Thu, Feb 28, 2013 at 9:56 PM, David kamailio.org@spam.lublink.netwrote:
Hello,
Look on Wikipedia and read the articles for SIP, RTP, NAT and STUN.
The answer to your question can be found in the above articles.
David
On 13-02-27 10:26 PM, Khoa Pham wrote:
Hi, I have Kamailio as SIP server and RTP server. Client is PJSIP.
I read that STUN is for non-symmetric NAT, and RTP server is for symmetric NAT.
Supposed A calls B.
If A, B both use symmetric NAT and STUN, they cannot hear each other If A or B use non-symmetric NAT and NOT using STUN, they cannot hear each other.
Why is that?
I read http://tools.ietf.org/id/draft-takeda-symmetric-nat-traversal-00.txt for Prediction Failure, is that related to this problem ?
-- Khoa Pham HCMC University of Science Faculty of Information Technology
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Khoa Pham HCMC University of Science Faculty of Information Technology
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, April 16-17, 2013, Berlin
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 03/04/2013 02:44 AM, Khoa Pham wrote:
@Daniel, how can the SIP proxy determine whether to use rtpproxy or not ?
You have to set your own criteria for that. If you only want to use rtpproxy in NAT scenarios, you can attempt to detect NAT on the far end using some combination of flags passed to nat_uac_test().
Otherwise, you can just engage it in all cases, or using some other criteria (e.g. source or destination network).
-- Alex
@Alex: thanks for reply
In this IPv4 world, most devices are in NAT, and it only matters if they are symmetric NAT or not.
So if 1 client is behind symmetric NAT, I want to use rtpproxy, otherwise, I do not. According to what I read from kamailio cfg, Kamailio only knows if client is NATed or not, it doesnot know the NAT type
On Mon, Mar 4, 2013 at 2:46 PM, Alex Balashov abalashov@evaristesys.comwrote:
On 03/04/2013 02:44 AM, Khoa Pham wrote:
@Daniel, how can the SIP proxy determine whether to use rtpproxy or
not ?
You have to set your own criteria for that. If you only want to use rtpproxy in NAT scenarios, you can attempt to detect NAT on the far end using some combination of flags passed to nat_uac_test().
Otherwise, you can just engage it in all cases, or using some other criteria (e.g. source or destination network).
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
______________________________**_________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 03/04/2013 02:55 AM, Khoa Pham wrote:
@Alex: thanks for reply
In this IPv4 world, most devices are in NAT, and it only matters if they are symmetric NAT or not.
So if 1 client is behind symmetric NAT, I want to use rtpproxy, otherwise, I do not. According to what I read from kamailio cfg, Kamailio only knows if client is NATed or not, it doesnot know the NAT type
That's correct.
The only way you can infer whether a client is symmetric is through its insertion of the 'rport' parameter into the Via header. However, symmetric clients are not required to insert it; it is only so that a client can request symmetric behaviour from a server. AS RFC 3581 says:
A client, compliant to this specification (clients include UACs and proxies), MAY include an "rport" parameter in the top Via header field value of requests it generates.
Certainly, there's nothing saying it must do so.
However, almost all UAs out there are symmetric these days. It's got to be over 95%+. Have you run into one that isn't?
-- Alex
So RTP proxy servers are used most of the time in Internet to communicate between 2 UA's? (in this case why bother to check all those lines in kamailio cfg?)
Mitan Lopez mitan23@aol.com
-----Original Message----- From: Alex Balashov abalashov@evaristesys.com To: sr-users sr-users@lists.sip-router.org Sent: Mon, Mar 4, 2013 11:30 am Subject: Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN
On 03/04/2013 02:55 AM, Khoa Pham wrote:
@Alex: thanks for reply
In this IPv4 world, most devices are in NAT, and it only matters if they are symmetric NAT or not.
So if 1 client is behind symmetric NAT, I want to use rtpproxy, otherwise, I do not. According to what I read from kamailio cfg, Kamailio only knows if client is NATed or not, it doesnot know the NAT type
That's correct.
The only way you can infer whether a client is symmetric is through its insertion of the 'rport' parameter into the Via header. However, symmetric clients are not required to insert it; it is only so that a client can request symmetric behaviour from a server. AS RFC 3581 says:
A client, compliant to this specification (clients include UACs and proxies), MAY include an "rport" parameter in the top Via header field value of requests it generates.
Certainly, there's nothing saying it must do so.
However, almost all UAs out there are symmetric these days. It's got to be over 95%+. Have you run into one that isn't?
-- Alex
@Mitan,
"most of the time" is not really correct. It depends on our decisions. Here I want to support peer 2 peer call when both UA does not in symmetric NAT, to reduce task for the rtpproxy :)
On Mon, Mar 4, 2013 at 5:43 PM, Mitan Lopez mitan23@aol.com wrote:
So RTP proxy servers are used most of the time in Internet to communicate between 2 UA's? (in this case why bother to check all those lines in kamailio cfg?)
Mitan Lopez mitan23@aol.com
-----Original Message----- From: Alex Balashov abalashov@evaristesys.com To: sr-users sr-users@lists.sip-router.org Sent: Mon, Mar 4, 2013 11:30 am Subject: Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN
On 03/04/2013 02:55 AM, Khoa Pham wrote:
@Alex: thanks for reply
In this IPv4 world, most devices are in NAT, and it only matters if they are symmetric NAT or not.
So if 1 client is behind symmetric NAT, I want to use rtpproxy, otherwise, I do not. According to what I read from kamailio cfg, Kamailio only knows if client is NATed or not, it doesnot know the NAT type
That's correct.
The only way you can infer whether a client is symmetric is through its insertion of the 'rport' parameter into the Via header. However, symmetric clients are not required to insert it; it is only so that a client can request symmetric behaviour from a server. AS RFC 3581 says:
A client, compliant to this specification (clients include UACs and proxies), MAY include an "rport" parameter in the top Via header field value of requests it generates.
Certainly, there's nothing saying it must do so.
However, almost all UAs out there are symmetric these days. It's got to be over 95%+. Have you run into one that isn't?
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I understand, but some times 2 UAs have audio one side voice is clear but in other side voice is just like train sound (or wind sound) is this from NAT too?
Mitan Lopez mitan23@aol.com
-----Original Message----- From: Khoa Pham onmyway133@gmail.com To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Sent: Mon, Mar 4, 2013 2:26 pm Subject: Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN
@Mitan,
"most of the time" is not really correct. It depends on our decisions. Here I want to support peer 2 peer call when both UA does not in symmetric NAT, to reduce task for the rtpproxy :)
On Mon, Mar 4, 2013 at 5:43 PM, Mitan Lopez mitan23@aol.com wrote:
So RTP proxy servers are used most of the time in Internet to communicate between 2 UA's? (in this case why bother to check all those lines in kamailio cfg?)
Mitan Lopez mitan23@aol.com
-----Original Message----- From: Alex Balashov abalashov@evaristesys.com To: sr-users sr-users@lists.sip-router.org Sent: Mon, Mar 4, 2013 11:30 am Subject: Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN
On 03/04/2013 02:55 AM, Khoa Pham wrote:
@Alex: thanks for reply
In this IPv4 world, most devices are in NAT, and it only matters if they are symmetric NAT or not.
So if 1 client is behind symmetric NAT, I want to use rtpproxy, otherwise, I do not. According to what I read from kamailio cfg, Kamailio only knows if client is NATed or not, it doesnot know the NAT type
That's correct.
The only way you can infer whether a client is symmetric is through its insertion of the 'rport' parameter into the Via header. However, symmetric clients are not required to insert it; it is only so that a client can request symmetric behaviour from a server. AS RFC 3581 says:
A client, compliant to this specification (clients include UACs and proxies), MAY include an "rport" parameter in the top Via header field value of requests it generates.
Certainly, there's nothing saying it must do so.
However, almost all UAs out there are symmetric these days. It's got to be over 95%+. Have you run into one that isn't?
-- Alex
On 03/04/2013 06:53 AM, Mitan Lopez wrote:
I understand, but some times 2 UAs have audio one side voice is clear but in other side voice is just like train sound (or wind sound) is this from NAT too?
No. NAT does not introduce any acoustic anomalies; it would simply prevent the reachability of audio altogether. What you describe sounds like a bad DSP or gateway similar.
... unless the handset you are using generates this kind of noise when it is not receiving incoming RTP.
-- Alex
then what would be this bad DSP or RTP packages dropping reason for that makes such noises? (for example if I speak louder that train soud gets louder or when I speak low the win/train sound gets lower as well)
Mitan Lopez mitan23@aol.com
-----Original Message----- From: Alex Balashov abalashov@evaristesys.com To: sr-users sr-users@lists.sip-router.org Sent: Mon, Mar 4, 2013 3:25 pm Subject: Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN
On 03/04/2013 06:53 AM, Mitan Lopez wrote:
I understand, but some times 2 UAs have audio one side voice is clear but in other side voice is just like train sound (or wind sound) is this from NAT too?
No. NAT does not introduce any acoustic anomalies; it would simply prevent the reachability of audio altogether. What you describe sounds like a bad DSP or gateway similar.
... unless the handset you are using generates this kind of noise when it is not receiving incoming RTP.
-- Alex
Hi all,
When using STUN, I can detect my NAT type. The SDP contain x-NAT field (0: unknown, 1: full cone, ..., 6: symmetric) which tells Kamailio the NAT type of clients. Why doesn't Kamailio use that ?
On Mon, Mar 4, 2013 at 7:11 PM, Mitan Lopez mitan23@aol.com wrote:
then what would be this bad DSP or RTP packages dropping reason for that makes such noises? (for example if I speak louder that train soud gets louder or when I speak low the win/train sound gets lower as well)
Mitan Lopez mitan23@aol.com
-----Original Message----- From: Alex Balashov abalashov@evaristesys.com To: sr-users sr-users@lists.sip-router.org Sent: Mon, Mar 4, 2013 3:25 pm Subject: Re: [SR-Users] Cannot hear voice with symmetric NAT and STUN
On 03/04/2013 06:53 AM, Mitan Lopez wrote:
I understand, but some times 2 UAs have audio one side voice is clear but in other side voice is just like train sound (or wind sound) is this from NAT too?
No. NAT does not introduce any acoustic anomalies; it would simply prevent the reachability of audio altogether. What you describe sounds like a bad DSP or gateway similar.
... unless the handset you are using generates this kind of noise when it is not receiving incoming RTP.
-- Alex
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi guys!
good question from 2013 :) Maybe someone has experience and can confirm this?
My main question: is it possible to determine when it's required to use RTP proxy ? In other words can we know that the client is behind symmetric NAT device or we just use rtpproxy as a silver bullet?
Thanks! Arsen.
Khoa Pham wrote
Hi all,
When using STUN, I can detect my NAT type. The SDP contain x-NAT field (0: unknown, 1: full cone, ..., 6: symmetric) which tells Kamailio the NAT type of clients. Why doesn't Kamailio use that ?
-- Khoa Pham HCMC University of Science Faculty of Information Technology
----- Arsen Semionov Eurolan VoIP Solutions Tel: +442035198881 -- View this message in context: http://sip-router.1086192.n5.nabble.com/Cannot-hear-voice-with-symmetric-NAT... Sent from the Users mailing list archive at Nabble.com.
On Wed, Feb 08, 2017 at 01:12:05AM -0700, Arsen Semionov wrote:
good question from 2013 :) Maybe someone has experience and can confirm this?
The answer to the 2013 question is: if you can depend on this (I have never seen it) you can script kamailio to make use of it.
My main question: is it possible to determine when it's required to use RTP proxy ? In other words can we know that the client is behind symmetric NAT device or we just use rtpproxy as a silver bullet?
The "default" config has rtpproxy on detected NAT as an example. But personally I go for the always proxy option, it never failed so far (except for misconfigured client side firewalls that wouldn't have permitted p2p rtp anyway but now can easily fixed by permitting the traffic from the rtp range of udp ports from the rtpengine/proxy servers).
NAT detect example below (so take a look at nat_uac_test to see what kind of tests there are):
route[NATDETECT] { #!ifdef WITH_NAT force_rport(); if (nat_uac_test("19")) { if (is_method("REGISTER")) { fix_nated_register(); } else { if(is_first_hop()) set_contact_alias(); } setflag(FLT_NATS); } #!endif return; }
route[NATMANAGE] { #!ifdef WITH_NAT if (is_request()) { if(has_totag()) { if(check_route_param("nat=yes")) { setbflag(FLB_NATB); } } } if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return;
rtpproxy_manage("co");
Hi Daniel,
I am not sure that nat_uac_test can determine type of NAT device. and why you need all these checks if you always use rtpproxy? (another q from 2013 :)
The idea is to reduce using of rtpproxy for better scalability and voice quality. If we can beat all types of NAT with a near-end NAT traversal, except symmetric NAT why do we always use proxy option in case if NAT is detected.
On Wed, Feb 8, 2017 at 12:01 PM, Daniel Tryba d.tryba@pocos.nl wrote:
On Wed, Feb 08, 2017 at 01:12:05AM -0700, Arsen Semionov wrote:
good question from 2013 :) Maybe someone has experience and can confirm this?
The answer to the 2013 question is: if you can depend on this (I have never seen it) you can script kamailio to make use of it.
My main question: is it possible to determine when it's required to use
RTP
proxy ? In other words can we know that the client is behind symmetric
NAT
device or we just use rtpproxy as a silver bullet?
The "default" config has rtpproxy on detected NAT as an example. But personally I go for the always proxy option, it never failed so far (except for misconfigured client side firewalls that wouldn't have permitted p2p rtp anyway but now can easily fixed by permitting the traffic from the rtp range of udp ports from the rtpengine/proxy servers).
NAT detect example below (so take a look at nat_uac_test to see what kind of tests there are):
route[NATDETECT] { #!ifdef WITH_NAT force_rport(); if (nat_uac_test("19")) { if (is_method("REGISTER")) { fix_nated_register(); } else { if(is_first_hop()) set_contact_alias(); } setflag(FLT_NATS); } #!endif return; }
route[NATMANAGE] { #!ifdef WITH_NAT if (is_request()) { if(has_totag()) { if(check_route_param("nat=yes")) { setbflag(FLB_NATB); } } } if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) return;
rtpproxy_manage("co");
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Wed, Feb 08, 2017 at 12:28:36PM +0200, Arsen wrote:
I am not sure that nat_uac_test can determine type of NAT device. and why you need all these checks if you always use rtpproxy? (another q from 2013 :)
The answer is: you don't have to.
The idea is to reduce using of rtpproxy for better scalability and voice quality. If we can beat all types of NAT with a near-end NAT traversal, except symmetric NAT why do we always use proxy option in case if NAT is detected.
Near End NAT traversal relies on support and configuration of clients, something I have no control over. It simply fails to often, either due to misconfiguration, simple lack of support, a buggy implementation or something else not in my control.
Far End NAT just works (tm). Can't speak for rtpproxy, but rtpengine scales just fine. Only positive I can think of is that you might keep some audio outside of your network.
On 03/04/2013 05:43 AM, Mitan Lopez wrote:
So RTP proxy servers are used most of the time in Internet to communicate between 2 UA's? (in this case why bother to check all those lines in kamailio cfg?)
Between two UAs that either (1) do not have network and transport-layer reachability to each other, such that an intermediate RTP relay is needed, because they cannot send RTP to each other directly through UDP or (2) between which topology hiding is desired.
Otherwise, no.