WELCOME [ Log In · Register ]        SITE [ Search · Page Index · Recent Changes ]    RSS

SMG SS7 FreeSWITCH Install

 

  1. Downloading SMG-SS7
  2. Downloading the SS7boxd Binary
  3. Creating the Configuration Files
  4. Installing SMG-SS7
  5. Installing FreeSWITCH
  6. Configuring FreeSWITCH

 

NOTE:  SMG-SS7 Requires SCTP and the SCTP headers to be installed.  On CentOS you can install this package using "yum install lksctp-tools-devel"

 


Downloading SMG-SS7

SMG-SS7 has a type version as well as a package version.  The type version indicates the major and minor revision of ss7boxd and sangoma_isupd.  i.e. 2.1, 2.2, 2.3, etc  The main method of versioning in SMG-SS7 is the date code that the suite was packaged.  i.e. smgss7-ITU-2.5.XXX.tgz

The SMG-SS7 packages also come in the 2 variants of SS7: ITU and ANSI.  Please make sure to download the correct variant for your install.

  1. Download the latest date coded SMG-SS7 package from Sangoma's FTP server to /usr/src/ (Sangoma recommended location):
    Latest ---->  2.6 release:  ftp://ftp.sangoma.com/linux/smg/2.6/ 
  2. Un-archive the tar-ball
    # tar xfz smgss7-itu-<ver>.XXX<tab>
  3. Change directory to the newly created directory
    # cd smgss7-<ver>

 


 

Downloading the SS7boxd Binary

The ss7boxd binary is the only file that is licensed and therefore it must be downloaded separately from the rest of the SMG-SS7 package

  1. Open a new web browser and go to www.sangomapbx.com/ss7box/
  2. Enter the "eth0" MAC address from the SMG-SS7 server
  3. Enter the "Self Point Code" of your server in the correct version (ITU or ANSI)
  4. Enter the "user key" provided to you when you bought your SMG-SS7 license.
  5. Press the "Submit" key to continue
  6. A page will appear showing the status of the ss7boxd build...the build can take several minutes
  7. Once the build has been completed hight light and save all the text on thes page to a safe location as the page shows you the user key, the MAC address this build is for, the SPC this build is for, the auth key (used in the next step), and lastly a link to download the actual file
  8. Use "wget" and the link from the web build to save the "ss7boxd-<user key>" file to /usr/src/smgss7<verison> directory
  9. Copy the "ss7boxd-<user key>" file to "ss7boxd"

 


 

Creating the Configuration files

The configuration files for SMG-SS7 are created using a 2-step process.  First, you fill in important information into an easy to read Google Docs Spreadsheet.  The spreadsheet is then exported as a CSV file to the target machine where it is the input to a script that creates the final configuration files used by the various components of SMG-SS7.

NOTE: YOU WILL NEED A GOOGLE DOCS ACCOUNT TO SAVE YOUR CONFIGURATION FOR FUTURE USE BUT NOT VIEW AND USE ONE TIME

  1. Open the template spreadsheet
    2.6 release - smgss7 cfg file - smgcfg-template-v08
  2. Create a personal copy of the spreadsheet
    • Click File, Create A Copy, and name it accordingly.
  3. Fill in the correct information for your system
    Ports Section
    • The "wanpipeX" value is a sequential number from 1 that is unique
    • Run "wanrouter hwprobe" to see the "pci_slot", and "pci_bus" value for your cards
    • The "fe_line" value is the port number on the card
    • The "tdmv_span" value is a sequential number from 1 that is unique to only 1 port voice port.  If the port only has signaling channels (no voice CICs) leave the value blank
    • The "ss7boost trk" is formula cell...please do not modify it
    • The "use" is always "ss7"...at this time non SMG-SS7 ports need to be configured manually after wards
      -
    ss7box Section

    • The SPC is the "self point code" of the system...it is the unique point code for your system.
    • The "authcode" is the authorization code you get from building the ss7boxd binary
    • The "mtp2" section is a list of mtp2 links mapping them to a physical port
      • "mtp2-index" -> sequential unique index value from 0
      • "linkset" -> the linkset value, starting from 0.  A linkset is a set of links to an single APC
      • "link" -> a unique value, starting from 0, for each link in the link set
      • "wanpipeX" -> the wanpipeX number from the ports section identifying the card and port that has the mtp2 link
      • "slot" -> the time slot of the E1/T1 that carries the mtp2 traffic
      • "clear chan" -> this option tells ss7boxd that this is a 56kbps channel over a 64kbps time slot
    • The "mtp3" section is a list of mtp3 links mapping them to mtp2 links
      • "mtp3-index" -> sequential unique index value from 0
      • "APC" -> this is the point code of the switch on the other end of the mtp2 link
      • "slt_size" -> this value does not need to changed
      • "prio" -> this value does not need to be changed
      • "ni" -> this value does not need to be changed
    • The "path" section is list mtp3 link indexes and a possible alternative mtp3 link index to the same APC
      • "path" -> sequential unique index value from 0
      • "LS-A" -> this is the mtp3-index value that this path can reach
      • "LS-B" -> this is an alternative mtp3-index value that goes to the same APC (normally this is already defined in the mtp3 section...so leave this as "na")
    • The "outbound route" section is a list of paths that can be used to reach all known SS7 switches (STPs and SSPs)
      • "outbound rte" -> sequential unique index value from 0
      • "DPC" -> this is the point code that this route can reach
      • "rtg protocol" -> this value can only be "mtp3" at this time.
      • "prim. path" -> this is the primary path index to use to reach this point code
      • "alt. path" -> this is an alternate path index that can be used to reach this point code (this is only filled in for SSPs as STPs would use the LS-B value to list an alternate)
      • "crosslink" -> this value does not need to be changed
    • The "inbound route" section is a list of all CICs and the location of the ISUP daemon and MSUs should be routed to
      • "inbound rte" -> sequential unique index value from 0
      • "DPC" -> this is the SPC...on inbound messages the DPC field of the MSU is the SPC of the system
      • "OPC" -> this is the point code of the SSP that these CICs are connected to
      • "CIC start" -> this is the lowest numbered CIC that is connected between the DPC and OPC
      • "CIC end" -> this is the highest numbered CIC that is connected between the DPC and OPC
      • "lcl addr" -> this is the ip address that ss7boxd will be listening to for messages from sangona_isupd that meet the DPC, OPC, and CIC requirements listed
      • "lcl port" -> this is the port number that ss7boxd will be listening to for messages from sangoma_isupd that meet the DPC, OPC, and CIC requirements listed
      • "rmt addr" -> this is the ip address that ss7boxd will send MSUs that meet the DPC, OPC, and CIC requirements listed
      • "rmt port" -> this is the port address that ss7boxd will send MSUs that meet the DPC, OPC, and CIC requirements listed
      -
    ISUP Section

    • The "tg" section is a list of all Trunk groups that this sangoma_isupd will handle
      • "t/g" -> sequential unique index value from 0
      • "DPC" -> point code for the SSP that this trunk group be connected to
      • "prio" -> this value does not need to be changed
      • "ni" -> this value does not need to be changed
      • "hunt" -> cic hunt direction...up=ascending, down=descending
      • "overlap" -> allow outbound overlap dialing or append "F" to dialed number on IAM
      • "NADI prefix" -> NADI value is sent from dial plan or use default clg NADI for all outbound calls
      • "def clg NADI" -> default clg NADI when NADI prefix = n
      • "inb TMR 3.1" -> allow incoming calls to request 3.1k audio
      • "inb TMR sp" -> allowing incoming calls to request Speech
      • "def outb CPC" -> set the default outgoing CPC value
      • "send IAM c/e" -> send IAM to dialplan via RDNIS string <EXPERIMENTAL>
      -
    • the "trunks" section is a list of all trunks that this sangoma_isupd will handle
      • "cic-tg" -> sequential unique index value from 0
      • "ss7boost trk" -> the ss7boost trunk value from the ports section that these cics are using
      • "chan" -> the time slots on the trunk that will be used for voice.  NOTE: to enter 1-31 prefix with ' character, to leave gaps use .
      • "CIC base" -> the CIC number for the first channel
      • "t/g" -> the tg index value that these CICs belong to
  4. Export the spreadsheet as a CSV file and copy the file to /usr/src/smgss7<version> directory
    • Click "File"->"Export"->"CSV Sheet Only", this will open a new browser window showing the CSV version of the spreadsheet
    • Start a new SSH connection to the SMG-SS7 server
    • Change directory to your smgss7 directory
      • cd /usr/src/smgss7<tab>
    • Start a new file called config-ss7.csv
      • vi config-ss7.csv
    • Copy and paste the text from the browser window to the config-ss7.csv file
    • Save and exit the file
  5. Parse the CSV file using smgcfg04.py script to create the final configuration files.
    # ./smgcfg04.py -f config-ss7.csv

 


 

Installing SMG-SS7

Stage 1 installs the Sangoma driver, creates various folders, and copies the configuration files from the install directory to their finally location

  1. Start the installation
    # ./smginstall freeswitch
  2. The installer will try to stop Asterisk/Freeswitch/Callweaver, existing SMG-SS7, and any existing Wanpipes and ask the user to confirm success
  3. The installer will then install the Sangoma driver
  4. Once the install is finished you will be returned to the Linux command prompt

 

 

 



 

FreeSwitch & OpenZap installation (Linux)

 Installing FreeSwitch requires the following:

On Centos 5.X:

#> yum install subversion autoconf bison flex make gcc gcc-c++ libtool automake ncurses-devel
#> yum install lksctp-tools-devel 
    (sctp tools are very important otherwise openzap will not build properly)
 

On debian or ubuntu:

  •  Install tools needed before packaging:
    #> apt-get install devscripts pbuilder gcc make bison automake autoconf flex libtool
  • Let freeswitch handlerequired dependencies from the source with pbuilder
  • Install sctp devel tools
    #> apt-get install sctp-devel

Check out the latest development version from the freeswitch repository:

To get the source of the latest development source, do the following:

  • Decide where you will place the sources (we use /usr/src/freeswitch)
  • Go to the parent directory of where you want to place the sources: cd /usr/src
  • Download the latest nightly snapshot .tar.gz and untar it:
  • # wget http://files.freeswitch.org/freeswitch-snapshot.tar.gz

 

Now lets proceed to building freeswitch.

 Install FreeSwitch/OpenZAP via Source without packaging

  • Change into the freeswitch build directory
  • #> cd freeswitch
    #> ./bootstrap.sh
  • Configure the buildsystem
    #> ./configure  
  • Select the modules to be build.
    The most important is to uncomment the openzap line
    ----> (#../../libs/openzap/mod_openzap)
    #> vi modules.conf
  • Build
    #> make all install
    #> make samples
    #> make sounds-install (to install the default sound files)
    #> make moh-install (to install default music on hold files)

 


 

FreeSwitch OpenZap Configuration

 

openzap.conf file maps the physical wanpipe channels to freeswitch/openzap b-channels.
As you can see from this example the SS7 timeslot is located on span=1 chan=16.
Therefore that timeslot is omitted out of the b-channel definition.

/usr/local/freeswitch/conf/openzap.conf

---cut---

[span wanpipe boostss7]
trunk_type => ss7
b-channel => 1:1-15
b-channel => 1:17-31
b-channel => 2:1-31
b-channel => 3:1-31
b-channel => 4:1-31
b-channel => 5:1-31
b-channel => 6:1-31
b-channel => 7:1-31
b-channel => 8:1-31

---cut---

 

/usr/local/freeswitch/conf/autoload_configs/openzap.conf.xml

 

openzap.conf.xml file configures FreeSwitch to Openzap mapping.
The boostss7 span name is mapped into freeswitch as a span.
In this minimal example, the span is given a context "default" where
all incoming calls will be routed to.


---cut---

 <configuration name="openzap.conf" description="OpenZAP Configuration">

   <settings>
     <param name="debug" value="0"/>
   </settings>

   <boost_spans>
    <span name="boostss7">
      <!--<param name="hold-music" value="$${moh_uri}"/>-->
      <!--<param name="enable-analog-option" value="call-swap"/>-->
      <!--<param name="enable-analog-option" value="3-way"/>-->
      <param name="dialplan" value="XML"/>
      <param name="context" value="default"/>
      <!-- regex to stop dialing when it matches -->
      <!--<param name="dial-regex" value="5555"/>-->
      <!-- regex to stop dialing when it does not match -->
      <!--<param name="fail-dial-regex" value="^5"/>-->
    </span>
  </boost_spans>
 </configuration>

---cut---

 


 

Some Dialplan Examples


Dial string is "openzap/<span_name>/a/<destination_number>@<group_number>"
For example: Following Dialplan calls Sangoma's Toll Free Number when 333 is dialed from SIP phone.

<extension name="outgoing">
        <condition field="destination_number" expression="^(333)$">
            <action application="bridge" data="openzap/
boostss7/a/1800388247@g1"/>
        </condition>
 </extension>

  <extension name="sipuas">
      <condition field="destination_number" expression="^1*">
          <action application="bridge" data="sofia/external/1111@localhost:5062"/>
      </condition>
    </extension>

 <extension name="playback">
      <condition field="destination_number" expression="^2*">
        <action application="answer"/>
        <action application="playback" data="tone_stream://path=${base_dir}/conf/tetris.ttml;loops=10"/>
      </condition>
    </extension>

Note: Group Number is defined in the google doc and also in the /etc/ss7box/sangoma_isup.conf. Below is an example from the google doc. Now you will see the ISUP/ss7boost shows the group to be 0 just add 1 and this is the OZ group number. eg if 2 below it will be g3 in FS. 

groupnum.png


 

To start freeswitch


Background Mode (Production)

#> /usr/local/freeswitch/bin/freeswitch -nc

run : ps fax to see if freeswitch is up.

Wait few seconds then run the freeswitch cli:

 #> /usr/local/freeswitch/bin/fs_cli

Console Mode

#> /usr/local/freeswitch/bin/freeswitch -nonat