Hi,
I have a question about the fix_nated_sdp() function. Different devices (phones, pbxes, gateways) are using Kamailio as SBC. The SBC does t_relay() the message to a pool of FreeSWITCH Servers.
The scenario does work quite well but:
if a call is initiated from one of the freeswitch server, pass it through kamailio to the PBX and the PBX does have a forwarding back to kamailio and in the end to freeswitch I have no audio because the PBX is behind a NAT and uses private ip addresses in all the SDP of 200 OK and 183 Session Progress. Therefore FreeSWITCH could not do the (very cool) RTP Auto-Adjustment (check if IP in incoming packet is different to the IP in the SDP) to detect the real IP address.
Therefore I have to use fix_nated_sdp(). I am not sure, what this function could break therefore I want to be very sure and use it only, if really necessary. Test which User-Agent or Server the peer (in this example the PBX) has, is not really possible because some devices does not send this header.
What do you think about the follwoing pseudo code:
if (method==INVITE && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
and within the onreply route:
if (status=~(180|183|200) && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
Somebody has a better idea to handle this? What could go wrong?
Thanks in advance.
Best regards, Bernhard Suttner
Hi,
someone has an idea?
Thanks in advance!
Best regards, Bernhard
-----Ursprüngliche Nachricht----- Von: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] Im Auftrag von Bernhard Suttner Gesendet: Montag, 24. Januar 2011 20:38 An: sr-users@lists.sip-router.org Betreff: [SR-Users] fix_nated_sdp()
Hi,
I have a question about the fix_nated_sdp() function. Different devices (phones, pbxes, gateways) are using Kamailio as SBC. The SBC does t_relay() the message to a pool of FreeSWITCH Servers.
The scenario does work quite well but:
if a call is initiated from one of the freeswitch server, pass it through kamailio to the PBX and the PBX does have a forwarding back to kamailio and in the end to freeswitch I have no audio because the PBX is behind a NAT and uses private ip addresses in all the SDP of 200 OK and 183 Session Progress. Therefore FreeSWITCH could not do the (very cool) RTP Auto-Adjustment (check if IP in incoming packet is different to the IP in the SDP) to detect the real IP address.
Therefore I have to use fix_nated_sdp(). I am not sure, what this function could break therefore I want to be very sure and use it only, if really necessary. Test which User-Agent or Server the peer (in this example the PBX) has, is not really possible because some devices does not send this header.
What do you think about the follwoing pseudo code:
if (method==INVITE && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
and within the onreply route:
if (status=~(180|183|200) && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
Somebody has a better idea to handle this? What could go wrong?
Thanks in advance.
Best regards, Bernhard Suttner
_______________________________________________ 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 Bernhard,
have you checked the SDP which is going to and from the Freeswitch-Server? Is it modified?
If yes: You may want to check your NAT-Firewall. A working (but not nice) solution might be to relay the RTP through an proxy in this case... If No: Verify the result of "nat_uac_test": Why is it returning "false"?
Carsten
2011/1/25 Bernhard Suttner bernhard.suttner@winet.ch:
Hi,
someone has an idea?
Thanks in advance!
Best regards, Bernhard
-----Ursprüngliche Nachricht----- Von: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] Im Auftrag von Bernhard Suttner Gesendet: Montag, 24. Januar 2011 20:38 An: sr-users@lists.sip-router.org Betreff: [SR-Users] fix_nated_sdp()
Hi,
I have a question about the fix_nated_sdp() function. Different devices (phones, pbxes, gateways) are using Kamailio as SBC. The SBC does t_relay() the message to a pool of FreeSWITCH Servers.
The scenario does work quite well but:
if a call is initiated from one of the freeswitch server, pass it through kamailio to the PBX and the PBX does have a forwarding back to kamailio and in the end to freeswitch I have no audio because the PBX is behind a NAT and uses private ip addresses in all the SDP of 200 OK and 183 Session Progress. Therefore FreeSWITCH could not do the (very cool) RTP Auto-Adjustment (check if IP in incoming packet is different to the IP in the SDP) to detect the real IP address.
Therefore I have to use fix_nated_sdp(). I am not sure, what this function could break therefore I want to be very sure and use it only, if really necessary. Test which User-Agent or Server the peer (in this example the PBX) has, is not really possible because some devices does not send this header.
What do you think about the follwoing pseudo code:
if (method==INVITE && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
and within the onreply route:
if (status=~(180|183|200) && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
Somebody has a better idea to handle this? What could go wrong?
Thanks in advance.
Best regards, Bernhard Suttner
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
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,
thanks for your answer.
The question was about, if the fix_nated_sdp() (in the example below) could maybe break something. I am sure, that the fix_nated_sdp() would work in "some" cases but I am not sure, if the function could break something:
if (method==INVITE && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
and within the onreply route:
if (status=~(180|183|200) && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
Or is there a better solution to fix these damend NAT scenarios?
Best regards, Bernhard
-----Ursprüngliche Nachricht----- Von: kaiserbock2@googlemail.com [mailto:kaiserbock2@googlemail.com] Im Auftrag von Carsten Bock Gesendet: Dienstag, 25. Januar 2011 18:56 An: Bernhard Suttner Cc: sr-users@lists.sip-router.org Betreff: Re: [SR-Users] fix_nated_sdp()
Hi Bernhard,
have you checked the SDP which is going to and from the Freeswitch-Server? Is it modified?
If yes: You may want to check your NAT-Firewall. A working (but not nice) solution might be to relay the RTP through an proxy in this case... If No: Verify the result of "nat_uac_test": Why is it returning "false"?
Carsten
2011/1/25 Bernhard Suttner bernhard.suttner@winet.ch:
Hi,
someone has an idea?
Thanks in advance!
Best regards, Bernhard
-----Ursprüngliche Nachricht----- Von: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] Im Auftrag von Bernhard Suttner Gesendet: Montag, 24. Januar 2011 20:38 An: sr-users@lists.sip-router.org Betreff: [SR-Users] fix_nated_sdp()
Hi,
I have a question about the fix_nated_sdp() function. Different devices (phones, pbxes, gateways) are using Kamailio as SBC. The SBC does t_relay() the message to a pool of FreeSWITCH Servers.
The scenario does work quite well but:
if a call is initiated from one of the freeswitch server, pass it through kamailio to the PBX and the PBX does have a forwarding back to kamailio and in the end to freeswitch I have no audio because the PBX is behind a NAT and uses private ip addresses in all the SDP of 200 OK and 183 Session Progress. Therefore FreeSWITCH could not do the (very cool) RTP Auto-Adjustment (check if IP in incoming packet is different to the IP in the SDP) to detect the real IP address.
Therefore I have to use fix_nated_sdp(). I am not sure, what this function could break therefore I want to be very sure and use it only, if really necessary. Test which User-Agent or Server the peer (in this example the PBX) has, is not really possible because some devices does not send this header.
What do you think about the follwoing pseudo code:
if (method==INVITE && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
and within the onreply route:
if (status=~(180|183|200) && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
Somebody has a better idea to handle this? What could go wrong?
Thanks in advance.
Best regards, Bernhard Suttner
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
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
You need to experiment with nathelper module and while doing that, you need to inspect the SIP messages in order to understand how it works. Only when you fully understand your scenarios, you will be able to properly configure, debg and setup kamailio.
Best thing to do here is to use rtpproxy and relay media if needed.
Another option would be to let the SDP untouched and let freeswitch do it's magic (if it can). Not sure if this will work in all scenarios.
Calling fix_nated_sdp() on the SBC will definitely not work (you are just messing with the IP on the SDP and you don't know if the real RTP port on the NATed side will match the advertised port in your "fixed" SDP).
Regards, Ovidiu Sas
On Tue, Jan 25, 2011 at 1:23 PM, Bernhard Suttner bernhard.suttner@winet.ch wrote:
Hi,
thanks for your answer.
The question was about, if the fix_nated_sdp() (in the example below) could maybe break something. I am sure, that the fix_nated_sdp() would work in "some" cases but I am not sure, if the function could break something:
if (method==INVITE && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
and within the onreply route:
if (status=~(180|183|200) && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
Or is there a better solution to fix these damend NAT scenarios?
Best regards, Bernhard
-----Ursprüngliche Nachricht----- Von: kaiserbock2@googlemail.com [mailto:kaiserbock2@googlemail.com] Im Auftrag von Carsten Bock Gesendet: Dienstag, 25. Januar 2011 18:56 An: Bernhard Suttner Cc: sr-users@lists.sip-router.org Betreff: Re: [SR-Users] fix_nated_sdp()
Hi Bernhard,
have you checked the SDP which is going to and from the Freeswitch-Server? Is it modified?
If yes: You may want to check your NAT-Firewall. A working (but not nice) solution might be to relay the RTP through an proxy in this case... If No: Verify the result of "nat_uac_test": Why is it returning "false"?
Carsten
2011/1/25 Bernhard Suttner bernhard.suttner@winet.ch:
Hi,
someone has an idea?
Thanks in advance!
Best regards, Bernhard
-----Ursprüngliche Nachricht----- Von: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] Im Auftrag von Bernhard Suttner Gesendet: Montag, 24. Januar 2011 20:38 An: sr-users@lists.sip-router.org Betreff: [SR-Users] fix_nated_sdp()
Hi,
I have a question about the fix_nated_sdp() function. Different devices (phones, pbxes, gateways) are using Kamailio as SBC. The SBC does t_relay() the message to a pool of FreeSWITCH Servers.
The scenario does work quite well but:
if a call is initiated from one of the freeswitch server, pass it through kamailio to the PBX and the PBX does have a forwarding back to kamailio and in the end to freeswitch I have no audio because the PBX is behind a NAT and uses private ip addresses in all the SDP of 200 OK and 183 Session Progress. Therefore FreeSWITCH could not do the (very cool) RTP Auto-Adjustment (check if IP in incoming packet is different to the IP in the SDP) to detect the real IP address.
Therefore I have to use fix_nated_sdp(). I am not sure, what this function could break therefore I want to be very sure and use it only, if really necessary. Test which User-Agent or Server the peer (in this example the PBX) has, is not really possible because some devices does not send this header.
What do you think about the follwoing pseudo code:
if (method==INVITE && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
and within the onreply route:
if (status=~(180|183|200) && has_sdp() && nat_uac_test(8)) fix_nated_sdp(3)
Somebody has a better idea to handle this? What could go wrong?
Thanks in advance.
Best regards, Bernhard Suttner
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
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
-- Carsten Bock Schomburgstr. 80 22767 Hamburg Germany
Mobile +49 179 2021244 Home +49 40 34927217 Büro (Verl) +49 5246 801427 Fax +49 40 34927218 mailto:carsten@bock.info
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