CHAT NOW

Configuring Freeswitch for Spintel.

Key to the information which appears in the example:

xxxxxx: Your sip number

Password: Your sip-number password

1000: Freeswitch extension number that connects to the softphone / ip-phone, in order to receive incoming calls and make outgoing calls.

1. Create a file /etc/freeswitch/sip_profiles/external/spintel.xml

  
  <include>
      <gateway name="spintel">
          <param name="username" value="xxxxxx"/>
          <param name="password" value="Password"/>
          <param name="realm" value="voip.syd.spintel.net.au"/>
          <param name="from-user" value="xxxxxx"/>
          <param name="from-domain" value="voip.syd.spintel.net.au"/>
          <param name="proxy" value="voip.syd.spintel.net.au"/>
          <param name="expire-seconds" value="300"/>
          <param name="register" value="true"/>
          <param name="register-transport" value="udp"/>
          <param name="context" value="spintel"/>
      gateway>
  include>
  

xxx: Your PBX extension (xxx)

Password: Your PBX extension (xxx)

1000: Freeswitch extension number that connects to the softphone / ip-phone, in order to receive incoming calls and make outgoing calls.

1. Create a file /etc/freeswitch/sip_profiles/external/spintel.xml


<include>
    <gateway name="spintel">
        <param name="username" value="xxx"/>
        <param name="password" value="Password"/>
        <param name="realm" value="yyyyyy-pbx.cust.spintel.net.au"/>
        <param name="from-user" value="xxx"/>
        <param name="from-domain" value="yyyyyy-pbx.cust.spintel.net.au"/>
        <param name="proxy" value="yyyyyy-pbx.cust.spintel.net.au"/>
        <param name="expire-seconds" value="300"/>
        <param name="register" value="true"/>
        <param name="register-transport" value="udp"/>
        <param name="context" value="spintel"/>
    gateway>
include>

2. Create a configuration file Dialplan /etc/freeswitch/dialplan/spintel.xml

  
  xml version="1.0" encoding="UTF-8"?>
  <include>
      <context name="spintel">
          <extension name="unloop">
              <condition field="$${unroll_loops}" expression="^true$" />
              <condition field="${sip_looped_call}" expression="^true$">
                  <action application="deflect" data="${destination_number}" />
              condition>
          extension>
          <extension name="in-spintel">
              <condition field="destination_number" expression="^(111111)$">
                  <action application="bridge" data="user/1000@$${domain}"/>
                  <action application="hangup"/>
              condition>
          extension>
          <extension name="out-spintel">
              <condition field="destination_number" expression="^(\d{10,15})$">
                  <action application="bridge" data="sofia/gateway/spintel/$1"/>
                  <action application="hangup"/>
              condition>
          extension>
          <extension name="local">
              <condition field="destination_number" expression="^\d{4}$">
                  <action application="answer" />
                  <action application="sleep" data="1000" />
                  <action application="bridge" data="user/${destination_number}@$${domain}" />
                  <action application="hangup" />
              condition>
          extension>
      context>
  include>
  

3. Create a Freeswitch extension number that connects to the softphone / ip-phone in order to receive incoming calls and make outgoing calls. Edit the file /etc/freeswitch/directory/default/1000.xml

  
  <include>
      <user id="1000">
          <params>
              <param name="password" value="your_hard_pasword"/>
              <param name="vm-password" value="1000"/>
          params>
          <variables>
              <variable name="toll_allow" value="domestic,international,local"/>
              <variable name="accountcode" value="1000"/>
              <variable name="user_context" value="spintel"/>
              <variable name="effective_caller_id_name" value="Extension 1000"/>
              <variable name="effective_caller_id_number" value="1000"/>
              <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
              <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
              <variable name="callgroup" value="techsupport"/>
          variables>
      user>
  include>
  

To reload xml execute console command fs_cli reloadxml

Configuration is complete.