[SR-Users] fix_nated_sdp()

Bernhard Suttner bernhard.suttner at winet.ch
Tue Jan 25 17:53:54 CET 2011


Hi,

someone has an idea?

Thanks in advance!

Best regards,
Bernhard

-----Ursprüngliche Nachricht-----
Von: sr-users-bounces at lists.sip-router.org [mailto:sr-users-bounces at lists.sip-router.org] Im Auftrag von Bernhard Suttner
Gesendet: Montag, 24. Januar 2011 20:38
An: sr-users at 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 at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




More information about the sr-users mailing list