Re: [Freeswitch-users] external_sip_ip not refreshed after ip address change.
I have a question about nat behavior in freeswitch. Basically my external calls to freeswitch are getting disconnected after 30 seconds of two way audio when my external ip address changes. I have dhcp from my ISP and am using external_sip_ip and external_rtp_ip as stun:<stun_server>. When my IP changes I see that external_sip_ip does not get refreshed but external_rtp_ip does. I am not allowed to enable upnp/nat-pmp on my router. Apparently it is a known issue that external_sip_ip is read just at load time and not refreshed even if it is specified in stun format Is there a fix to this problem? There is always the option of restarting profile when ddclient notes an ip change. Is there something inbuilt into FS. It is already finding that ip address has changed as reflected in external_rtp_ip which does use stun and gets the right ip address.
Can somebody help me with this? I have a question about nat behavior in freeswitch. Basically my external
calls to freeswitch are getting disconnected after 30 seconds of two way audio when my external ip address changes. I have dhcp from my ISP and am using external_sip_ip and external_rtp_ip as stun:<stun_server>. When my IP changes I see that external_sip_ip does not get refreshed but external_rtp_ip does. I am not allowed to enable upnp/nat-pmp on my router. Apparently it is a known issue that external_sip_ip is read just at load time and not refreshed even if it is specified in stun format Is there a fix to this problem?
There is always the option of restarting profile when ddclient notes an ip change. Is there something inbuilt into FS. It is already finding that ip address has changed as reflected in external_rtp_ip which does use stun and gets the right ip address.
-- Regards Anurag
<param name="auto-restart" value="true"/> <-- try this in the main sofia.conf.xml /b On Feb 6, 2012, at 12:48 PM, Anurag Srivastava wrote:
Can somebody help me with this?
I have a question about nat behavior in freeswitch. Basically my external
calls to freeswitch are getting disconnected after 30 seconds of two way audio when my external ip address changes. I have dhcp from my ISP and am using external_sip_ip and external_rtp_ip as stun:<stun_server>. When my IP changes I see that external_sip_ip does not get refreshed but external_rtp_ip does. I am not allowed to enable upnp/nat-pmp on my router. Apparently it is a known issue that external_sip_ip is read just at load time and not refreshed even if it is specified in stun format Is there a fix to this problem?
There is always the option of restarting profile when ddclient notes an ip change. Is there something inbuilt into FS. It is already finding that ip address has changed as reflected in external_rtp_ip which does use stun and gets the right ip address.
-- Regards Anurag _________________________________________________________________________ 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
-- Brian West FreeSWITCH Solutions, LLC Phone: +1 (918) 420-9266 Fax: +1 (918) 420-9267 brian@freeswitch.org http://www.freeswitch.org
Hi Brian, Thanks for your help. From what I see the parameter auto-restart=true will only restart profiles if the local interface ip address on the machine changes. Will it also restart if my public ip address changes? My machine is behind a NAT with port forwarding. I am trying to restart profiles if my public ip address changes. Thanks Can somebody help me with this?
I have a question about nat behavior in freeswitch. Basically my external
calls to freeswitch are getting disconnected after 30 seconds of two way audio when my external ip address changes. I have dhcp from my ISP and am using external_sip_ip and external_rtp_ip as stun:<stun_server>. When my IP changes I see that external_sip_ip does not get refreshed but external_rtp_ip does. I am not allowed to enable upnp/nat-pmp on my router. Apparently it is a known issue that external_sip_ip is read just at load time and not refreshed even if it is specified in stun format Is there a fix to this problem?
There is always the option of restarting profile when ddclient notes an ip change. Is there something inbuilt into FS. It is already finding that ip address has changed as reflected in external_rtp_ip which does use stun and gets the right ip address.
-- Regards Anurag
-- Regards Anurag
On Mon, Feb 6, 2012 at 1:17 PM, Anurag Srivastava <asrivas@gmail.com> wrote:
Hi Brian, Thanks for your help. From what I see the parameter auto-restart=true will only restart profiles if the local interface ip address on the machine changes. Will it also restart if my public ip address changes? My machine is behind a NAT with port forwarding. I am trying to restart profiles if my public ip address changes. Thanks
Are you starting fs with the -nonat flag? -MC
I am not running freeswitch with nonat. Just to reiterate my original problem, external_sip_ip is reloaded only once at startup even though stun is specified which is the cause of hte problem. external_rtp_ip is updated correctly with stun. Hi Brian,
Thanks for your help. From what I see the parameter auto-restart=true will only restart profiles if the local interface ip address on the machine changes. Will it also restart if my public ip address changes? My machine is behind a NAT with port forwarding. I am trying to restart profiles if my public ip address changes. Thanks
Can somebody help me with this?
I have a question about nat behavior in freeswitch. Basically my external
calls to freeswitch are getting disconnected after 30 seconds of two way audio when my external ip address changes. I have dhcp from my ISP and am using external_sip_ip and external_rtp_ip as stun:<stun_server>. When my IP changes I see that external_sip_ip does not get refreshed but external_rtp_ip does. I am not allowed to enable upnp/nat-pmp on my router. Apparently it is a known issue that external_sip_ip is read just at load time and not refreshed even if it is specified in stun format Is there a fix to this problem?
There is always the option of restarting profile when ddclient notes an ip change. Is there something inbuilt into FS. It is already finding that ip address has changed as reflected in external_rtp_ip which does use stun and gets the right ip address.
-- Regards Anurag
-- Regards Anurag
-- Regards Anurag
Hi, Could anybody help with this. I am not running freeswitch with nonat. Just to reiterate my original
problem, external_sip_ip is reloaded only once at startup even though stun is specified which is the cause of hte problem. external_rtp_ip is updated correctly with stun.
Hi Brian,
Thanks for your help. From what I see the parameter auto-restart=true will only restart profiles if the local interface ip address on the machine changes. Will it also restart if my public ip address changes? My machine is behind a NAT with port forwarding. I am trying to restart profiles if my public ip address changes. Thanks
Can somebody help me with this?
I have a question about nat behavior in freeswitch. Basically my
external calls to freeswitch are getting disconnected after 30 seconds of two way audio when my external ip address changes. I have dhcp from my ISP and am using external_sip_ip and external_rtp_ip as stun:<stun_server>. When my IP changes I see that external_sip_ip does not get refreshed but external_rtp_ip does. I am not allowed to enable upnp/nat-pmp on my router. Apparently it is a known issue that external_sip_ip is read just at load time and not refreshed even if it is specified in stun format Is there a fix to this problem?
There is always the option of restarting profile when ddclient notes an ip change. Is there something inbuilt into FS. It is already finding that ip address has changed as reflected in external_rtp_ip which does use stun and gets the right ip address.
-- Regards Anurag
-- Regards Anurag
-- Regards Anurag
-- Regards Anurag
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
#!/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
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. while [ 1 ]; do if ip=`wget -q -O - myip.dnsomatic.com`; then if [ "$ip" == "`cat $CACHE_DIR/last_ip_freeswitch`" ]; then : # do nothing else $log_info "ip address has changed" $log_info "executing freeswitch profile restarts" # reload freeswitch external profiles /usr/local/freeswitch/bin/fs_cli -x 'sofia profile remote_extensions rescan' 2>&1 | $log_info /usr/local/freeswitch/bin/fs_cli -x 'sofia profile remote_extensions restart' 2>&1 | $log_info /usr/local/freeswitch/bin/fs_cli -x 'sofia profile external rescan' 2>&1 | $log_info /usr/local/freeswitch/bin/fs_cli -x 'sofia profile external restart' 2>&1 | $log_info echo $ip > $CACHE_DIR/last_ip_freeswitch fi On Wed, Feb 8, 2012 at 12:30 PM, Brian West <brian@freeswitch.org> wrote:
#!/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
-- Regards Anurag
participants (3)
-
Anurag Srivastava
-
Brian West
-
Michael Collins