[Freeswitch-users] How do I set my FS internal ip address to a "static" value.

Brian West brian at freeswitch.org
Mon Feb 2 07:41:39 PST 2009


you need to add this setting to sofia.conf.xml

<param name="auto-restart" value="false"/>


You'll also need to edit the sofia profiles and input the exact IP you  
wish it to bind to.  The params are sip-ip and rtp-ip.

/b

On Feb 1, 2009, at 3:24 PM, clif at eugeneweb.com wrote:

> Hi Gang,
>
> I've been struggleing with this also. Actually I can get it to bind  
> to my
> address, the problem is it randomly drops my calls. :-(
>
> I have a FS running on a box with a static IP and I can start a call  
> between
> two extensions and it will go for hours. Then I add anther interface  
> say eth0:0
> with a new static IP and reconfigure my phones and FS to use that,  
> and the
> calls drop after about 15-20 mins. Though it's pretty random.
>
> Here is my setup. I have Debian Linux 2.6.23.1 kernel, and  
> freeswitch-1.0.1.
> Here is my /etc/network/interfaces:
>
> # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
>
> # The loopback interface
> auto lo
> iface lo inet loopback
>
> # The first network card - this entry was created during the Debian
> installation
> auto eth0 eth0:0
> iface eth0 inet dhcp
> iface eth0:0 inet static
> 	address 192.168.0.249
> 	netmask	255.255.255.0
> 	gateway	192.168.0.254
>
> The only change I made to the FS config is in Vars.xml. I added this  
> line close
> to the top:
>
> <X-PRE-PROCESS cmd="set" data="local_ip_v4=192.168.0.249"/>
>
> Here is the console log of the call being dropped:
>
> freeswitch at archive> sofia status
> API CALL [sofia(status)] output:
>                      Name	   Type	                              Data
> State
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>                  external	profile sip:mod_sofia at 67.171.158.226:5080
> RUNNING (0)
>                  internal	profile	  sip:mod_sofia at 192.168.0.249:5060
> RUNNING (2)
>                       nat	profile sip:mod_sofia at 67.171.158.226:5070
> RUNNING (0)
>                   default	  alias	                          internal
> ALIASED
>                  outbound	  alias	                          external
> ALIASED
>             192.168.0.249	  alias	                          internal
> ALIASED
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> 3 profiles 3 aliases
>
> freeswitch at archive> 2009-02-01 13:23:19 [NOTICE] sofia_glue.c:2634
> sofia_glue_restart_all_profiles() Reload XML [Success]
> 2009-02-01 13:23:19 [INFO] mod_enum.c:817 event_handler() ENUM  
> Reloaded
> 2009-02-01 13:23:19 [NOTICE] mod_sofia.c:568 sofia_read_frame() Hangup
> sofia/internal/ 
> 1003 at 192.168.0.53:5060;user=phone;transport=udp;fs_nat=yes
> [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]
> 2009-02-01 13:23:19 [NOTICE] switch_ivr_bridge.c:820
> switch_ivr_multi_threaded_bridge() Hangup sofia/internal/1001 at 192.168.0.249
> [CS_EXECUTE] [NORMAL_CLEARING]
> 2009-02-01 13:23:19 [NOTICE] switch_core_session.c:807
> switch_core_session_thread() Session 6
> (sofia/internal/ 
> 1003 at 192.168.0.53:5060;user=phone;transport=udp;fs_nat=yes)
> Ended
> 2009-02-01 13:23:19 [NOTICE] switch_core_session.c:809
> switch_core_session_thread() Close Channel
> sofia/internal/ 
> 1003 at 192.168.0.53:5060;user=phone;transport=udp;fs_nat=yes
> [CS_HANGUP]
> 2009-02-01 13:23:19 [NOTICE] switch_core_session.c:807
> switch_core_session_thread() Session 5 (sofia/internal/1001 at 192.168.0.249 
> )
> Ended
> 2009-02-01 13:23:19 [NOTICE] switch_core_session.c:809
> switch_core_session_thread() Close Channel sofia/internal/1001 at 192.168.0.249
> [CS_HANGUP]
> 2009-02-01 13:23:19 [NOTICE] sofia.c:645 sofia_profile_thread_run()  
> waiting for
> worker thread
> 2009-02-01 13:23:19 [NOTICE] sofia.c:645 sofia_profile_thread_run()  
> waiting for
> worker thread
> 2009-02-01 13:23:19 [NOTICE] sofia.c:1865 config_sofia() Adding Alias
> [192.168.0.249] for profile [internal]
> 2009-02-01 13:23:19 [NOTICE] sofia.c:1865 config_sofia() Adding  
> Alias [default]
> for profile [internal]
> 2009-02-01 13:23:19 [NOTICE] sofia.c:1875 config_sofia() Started  
> Profile
> internal [sofia_reg_internal]
> 2009-02-01 13:23:20 [NOTICE] sofia.c:1865 config_sofia() Adding Alias
> [outbound] for profile [external]
> 2009-02-01 13:23:20 [NOTICE] sofia.c:1875 config_sofia() Started  
> Profile
> external [sofia_reg_external]
> 2009-02-01 13:23:20 [NOTICE] sofia.c:645 sofia_profile_thread_run()  
> waiting for
> worker thread
> 2009-02-01 13:23:20 [NOTICE] sofia.c:1875 config_sofia() Started  
> Profile nat
> [sofia_reg_nat]
> sofia status
> API CALL [sofia(status)] output:
>                      Name	   Type	                              Data
> State
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>                  external	profile sip:mod_sofia at 67.171.158.226:5080
> RUNNING (0)
>                  internal	profile	  sip:mod_sofia at 192.168.0.249:5060
> RUNNING (0)
>                  outbound	  alias	                          external
> ALIASED
>             192.168.0.249	  alias	                          internal
> ALIASED
>                       nat	profile sip:mod_sofia at 67.171.158.226:5070
> RUNNING (0)
>                   default	  alias	                          internal
> ALIASED
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> 3 profiles 3 aliases
>
> There is an older thread that says one should set
> <X-PRE-PROCESS cmd="set" data="bind_server_ip=192.168.0.249"/>
> but in this (later) thread is says only Jingleling usese that  
> variable.
> ie. see:
> http://www.mail-archive.com/freeswitch-users@lists.freeswitch.org/msg00695.html
> http://www.mail-archive.com/freeswitch-users@lists.freeswitch.org/msg07345.html
>
> So what do you think causes this? What is the correct way? ;-)
>
>
> 	Thanks,
> 	Clif
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list