[Serusers] mediaproxy: Can I tell if two UAs are behind the same firewall?

Alexander Philipp Lintenhofer lintenhofer at aon.at
Tue Feb 15 23:26:28 CET 2005


Hi,

Simply use following shellscript "requestBehindSameNAT.sh":
##################################
#!/bin/bash
# Prüft anhand der Request-URI und der Contact-Adresse,
# ob Quelle und Ziel gleich sind -> NAT-Box

DESTIP=`echo $SIP_RURI | sed 's/[^0-9\.\:]//g' | cut -d":" -f2`

[ $DESTIP = $SIP_SRCIP ] && exit 0
exit 1
##################################
... and call it in ser.cfg:
if (!exec_msg("/usr/local/share/requestBehindSameNAT.sh"))
{
     use_media_proxy();
     t_on_reply("1");
}

regards,
Philipp




More information about the sr-users mailing list