<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to configure Freeswitch with Dynamic IP WAN]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I want to share my configuration of Freeswitch with Dynamic IP WAN.<br />
I obviously have to thank Mcrane not only for his great job porting FS to pfSense but also for<br />
the huge amount of time spent with me, my configuration and my poor knowdlege about FS (that<br />
caused a lot of headhaches to him).</p>
<p dir="auto">When you have a DHCP or PPPOE connection the annoying issue is your are left without PBX when the<br />
internet connection is down. It happens very often to me, I'm in countryside and the quality of<br />
DSL is terrible. I have PPPoA half-bridge so when the connection goes down my WAN IP di 0.0.0.0.</p>
<p dir="auto">With this setup you will always be able to use internal extensions, I also have a Sipura-3102<br />
with PSTN configured as gateway so I can always call outside also when WAN is down.</p>
<p dir="auto">You'll be able to register local extensions to lan profile and external extensions to internal<br />
profiles and they can call each others.</p>
<p dir="auto">Optionally you can also enable SSLv23 for encrypted calls (but I'm not sure this way only SIP<br />
messaging or voice data too is encrypted).</p>
<p dir="auto"><strong>1) CONFIGURE DYNAMIC DNS</strong></p>
<p dir="auto">Register to a dynamic dns and get an hostname, I'll use a dummy "dsl.homeip.net" for this guide.<br />
I'm using DynDns, if you choose another provider be sure it supports "Wildcards".<br />
Configure the ddns name in Services-&gt;Dynamic DNS and be sure to enable "Wildcards".</p>
<p dir="auto"><strong>2) CONFIGURE DNS FORWARDER</strong></p>
<p dir="auto">I will use as example for this guide the pfSense LAN IP 192.168.0.1.<br />
Check "Enable DNS forwarder".<br />
Your phones must use ONLY your pfSense LAN IP address as DNS server, check it!<br />
Below "You may enter records that override the results from the forwarders below." add an<br />
hostname this way, BE SURE to replace with your correct ddns and LAN IP:</p>
<p dir="auto">Host:  dsl</p>
<p dir="auto">Domain: homeip.net</p>
<p dir="auto">IP Address: 192.168.0.1</p>
<p dir="auto">Save configuration and check with your PC (with pfSense configured as primary DNS), ping to<br />
dsl.homeip.net must resolve to LAN IP, ping to fs.dsl.homeip.net must resolve to your WAN IP.</p>
<p dir="auto"><strong>3) CONFIGURE INTERNAL PROFILE</strong></p>
<p dir="auto">Extensions from outside that register to WAN IP must use TCP protocol.<br />
Always use your ddns, "dsl.homeip.net", for registration domain/SIP host.</p>
<p dir="auto">Go to Services-&gt;Freeswitch-&gt;Profiles and click edit for internal.xml.</p>
<p dir="auto">Uncomment and/or set with this values:</p>
<p dir="auto">&lt;param name="manage-presence" value="passive"&gt;<br />
    &lt;param name="dbname" value="share_presence"&gt;<br />
    &lt;param name="presence-hosts" value="$${domain}"&gt;<br />
    &lt;param name="bind-params" value="transport=tcp"&gt;<br />
    &lt;param name="rtp-ip" value="$${local_ip_v4}"&gt;<br />
    &lt;param name="sip-ip" value="$${local_ip_v4}"&gt;<br />
    &lt;param name="ext-rtp-ip" value="auto"&gt;<br />
    &lt;param name="ext-sip-ip" value="auto"&gt;<br />
    &lt;param name="force-register-domain" value="$${domain}"&gt;</p>
<p dir="auto"><strong>4) CONFIGURE LAN PROFILE</strong></p>
<p dir="auto">Extensions from inside that register to LAN IP must use UDP protocol.<br />
Always use your ddns, "dsl.homeip.net", for registration domain/SIP host.</p>
<p dir="auto">Go to Services-&gt;Freeswitch-&gt;Profiles and click edit for lan.xml.</p>
<p dir="auto">Be sure to change 192.168.0.1 with you LAN IP!</p>
<p dir="auto">Uncomment and/or set with this values:</p>
<p dir="auto">&lt;param name="manage-presence" value="true"&gt;<br />
    &lt;param name="dbname" value="share_presence"&gt;<br />
    &lt;param name="presence-hosts" value="$${domain}"&gt;<br />
    &lt;param name="bind-params" value="transport=udp"&gt;<br />
    &lt;param name="rtp-ip" value="192.168.0.1"&gt;<br />
    &lt;param name="sip-ip" value="192.168.0.1"&gt;<br />
    &lt;param name="ext-rtp-ip" value="192.168.0.1"&gt;<br />
    &lt;param name="ext-sip-ip" value="192.168.0.1"&gt;<br />
    &lt;param name="force-register-domain" value="$${domain}"&gt;</p>
<p dir="auto"><strong>5) CONFIGURE VARS</strong></p>
<p dir="auto">Go to Services-&gt;Freeswitch-&gt;Vars.</p>
<p dir="auto">Be sure to prepend "fs." or anything else you like to ddns name in external_rtp_* set values!<br />
It's needed because pfsense locally will resolve you registered ddns to LAN IP address.</p>
<p dir="auto">Uncomment and/or set with this values:</p>
<p dir="auto">&lt;x-pre-process cmd="set" data="domain=dsl.homeip.net"&gt;&lt;x-pre-process cmd="set" data="bind_server_ip=auto"&gt;&lt;x-pre-process cmd="set" data="external_rtp_ip=host:fs.dsl.homeip.net"&gt;&lt;x-pre-process cmd="set" data="external_sip_ip=host:fs.dsl.homeip.net"&gt;<strong>6) TLS ENCRYPTION</strong></p>
<p dir="auto">ONLY IF you want TLS/SSLv23 encryption also set in vars.xml:</p>
<p dir="auto">&lt;x-pre-process cmd="set" data="sip_tls_version=sslv23"&gt;&lt;x-pre-process cmd="set" data="internal_ssl_enable=true"&gt;Then go to SSH console and input the commands (respond Y to questions and change to your ddns</p>
<p dir="auto">name "dsl.homeip.net"):</p>
<p dir="auto">cd /usr/local/freeswitch/bin/<br />
./gentls_cert setup<br />
./gentls_cert create -cn dsl.homeip.net -alt DNS:dsl.homeip.net</p>
<p dir="auto">Your master certificate is in /usr/local/freeswitch/conf/ssl/CA/ with name cafile.pem<br />
Install in your SIP phones or if you use a Windows softphone, download it and rename to</p>
<p dir="auto">"cafile.crt". Double click to add it to certificate store, default options when asked.<br />
I verified it works with Windows Vista and Eyebeam Softphone.<br />
(If you use Eyebeam, it can't receive encrypted calls, under Security tab check only preference<br />
for encryption calls)</p>
<p dir="auto"><strong>7) RESTART FS</strong></p>
<p dir="auto">Don't only issue a reloadxml, restart the FS serice.</p>
<p dir="auto">Maybe something is missing (my setup is working and I'm not 100% sure that's all what you need from default config), let me know and I'll update the thread.</p>
<p dir="auto">Cheers,<br />
Mannix&lt;/x-pre-process&gt;&lt;/x-pre-process&gt;&lt;/x-pre-process&gt;&lt;/x-pre-process&gt;&lt;/x-pre-process&gt;&lt;/x-pre-process&gt;</p>
]]></description><link>https://forum.netgate.com/topic/17101/how-to-configure-freeswitch-with-dynamic-ip-wan</link><generator>RSS for Node</generator><lastBuildDate>Sat, 08 Aug 2026 18:49:02 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/17101.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 Aug 2009 15:09:51 GMT</pubDate><ttl>60</ttl></channel></rss>