Skip to main content

Example Offsite phones

About

Below are steps to get remote Exts 20xx able to call one another and call on-site telephones.

Click here to expand Table of Contents

In the default directory, register the phones as normal:

freeswitch/conf/directory/default/2001.xml

  <include>
<user id="2001" mailbox="2001">
<params>
<param name="password" value="1234"/>
<param name="vm-password" value="2001"/>
</params>
<variables>
<variable name="accountcode" value="2001"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="your caller name"/>
<variable name="effective_caller_id_number" value="2001"/>
</variables>
</user>
</include>

Next, create a new profile. The example is a doublenat profile set to port 5090:

freeswitch/conf/sip_profiles/doublenat.xml

     <profile name="doublenat">
<gateways>
<X-PRE-PROCESS cmd="include" data="doublenat/*.xml"/>
</gateways>
<settings>
<param name="debug" value="0"/>
<param name="sip-trace" value="no"/>
<param name="rfc2833-pt" value="101"/>
<param name="sip-port" value="5090"/>
<param name="dialplan" value="XML"/>
<param name="context" value="public"/>
<param name="dtmf-duration" value="100"/>
<param name="codec-prefs" value="$${outbound_codec_prefs}"/>
<param name="use-rtp-timer" value="true"/>
<param name="hold-music" value="$${hold_music}"/>
<param name="rtp-timer-name" value="soft"/>
<param name="manage-presence" value="false"/>
<param name="aggressive-nat-detection" value="true"/>
<param name="apply-nat-acl" value="rfc1918"/>
<param name="inbound-codec-negotiation" value="generous"/>
<param name="nonce-ttl" value="60"/>
<param name="auth-calls" value="false"/>
<param name="rtp-timeout-sec" value="1800"/>
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_sip_ip}"/>
<param name="rtp-timeout-sec" value="300"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
</settings>
</profile>

Finally, inside the //freeswitch/conf/dialplan/public.xml, you can put the following. You can add other features the same as the default.xml but this will get the phones going.

freeswitch/conf/dialplan/public.xml

      <extension name="public_extensions"> 
<condition field="destination_number" expression="^(20[01][0-9])$">
<action application="bridge" data="sofia/doublenat/$1%$${domain} "/>
</condition>
</extension>

See Also