I do something similar like below. Shouldn't this be done by freeswitch itself? After an ip change, i do notice that external_rtp_ip is correctly got from stun, but external_sip_ip is still set to its old value at load time.
#!/usr/bin/perl
$ip = `/usr/bin/snmpget -c m00se -v1 192.168.1.1 IP-MIB::ipAdEntAddr.5 | /usr/bin/awk '{print \$4}'`;
$ip =~ s/\n//g;
chomp($ip);
print "<include>\n\t<X-PRE-PROCESS cmd=\"set\" data=\"external_ip=$ip\"/>\n</include>\n";
I do something like this in mine before.
/b
_________________________________________________________________________
On Feb 8, 2012, at 1:12 PM, Brian West wrote:
> You'll need to understand how FreeSWITCH works. that external_sip_ip variable is probably fake and in vars.xml and is setup to stun: something... You can't really depend on that in your case so you'll need to get creative to set your variables properly that get used down in the sofia configs to bind to the proper IP's. This exercise is sadly left up to you to do.
>
> I use a script to write out some XML that gets included but if your IP changes you need to restart the sofia profiles.
>
> /b
>
> On Feb 8, 2012, at 12:35 PM, Anurag Srivastava wrote:
>
>> Hi,
>> Could anybody help with this.
>
> --
> Brian West
> FreeSWITCH Solutions, LLC
> Phone: +1 (918) 420-9266
> Fax: +1 (918) 420-9267
> brian@freeswitch.org
> http://www.freeswitch.org
>
--
Brian West
FreeSWITCH Solutions, LLC
Phone: +1 (918) 420-9266
Fax: +1 (918) 420-9267
brian@freeswitch.org
http://www.freeswitch.org
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org