Offsite Phones

http://wiki.freeswitch.org/wiki/Example_Offsite_phones

1) create an offsite phone 2014
freeswitch/conf/directory/default/2014.xml

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

2) create a profile for offsite users

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>

2) external world call offsite phone 2014

dialplan/public.xml:

<extension name="remote_extension_2014"> 
        <condition field="destination_number" expression="^2014$">
                <action application="bridge" 
                     data="sofia/doublenat/$1%$${domain}"/> 
        </condition>
 </extension>

3) internal main site user can also call phone 2014

in dialplan/default.xml

<extension name="remote_extension_2014">
<condition field="destination_number" expression="^2014$">
<action application="transfer" data="$1 XML public"/>
</condition>
</extension>

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License