Linux FreeTDM API Installation

Introduction

This page describes how to install FreeTDM in Linux. You have two options. Install as standalone or as a part of FreeSWITCH. Most users really want to install it with FreeSWITCH unless they're creating custom applications in C.

If you want to install FreeTDM with FreeSWITCH, then just skip the "FreeTDM standalone" section. When you're done, be sure to get back to the main FreeTDM web page to learn how to configure FreeTDM.

 

FreeTDM Linux Prerequisites

  • Recommended Linux distribution is CentOS, but is not strictly required.

  • GNU autotools: libtool, autoconf, automake, configure, gmake.

On Centos 5.X:

#> yum install autoconf bison flex make gcc gcc-c++ libtool automake ncurses-devel libtermcap-devel

On Debian or Ubuntu:

Install tools needed before packaging: 
#> apt-get install devscripts pbuilder gcc make bison automake autoconf flex libtool ncurses-dev
 Let FreeTDM handle required dependencies from the source with pbuilder

Wanpipe Quick Install

  1. Please download LATEST Wanpipe Release:  
    https://ftp.sangoma.com/linux/current_wanpipe/wanpipe-latest.tgz

  2. Untar wanpipe release in arbitrary directory (/usr/src/ is recommended).
    #> tar xvfz wanpipe-latest.tgzAfter untarring wanpipe-latest.tgz, the wanpipe-<version> directory will be created.   
    #> cd wanpipe-<version> 

  3. Run make from the newly created wanpipe-<version> directory
       #> make freetdm         (To compile Wanpipe drivers and utils)    
       #> make install              (To install Wanpipe drivers and utils)   

 

Confirm successful Wanpipe Installation

  1. To confirm successful Wanpipe installation run:
    #> wanrouter hwprobe
    This command will load the wanpipe modules and will print out list of all Sangoma hardware installed on the system.  

 

FreeTDM with FreeSWITCH

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 build freeswitch.

Install FreeSWITCH/FreeTDM from source

  • Change into the freeswitch build directory

#> cd freeswitch

  • Configure the buildsystem

#> ./bootstrap.sh

#> ./configure 

OR to install in /opt/freeswitch 

#> ./configure --prefix=/opt/freeswitch 

  • Select the modules to be build. 

#> vi modules.conf
Uncomment the freetdm line :
Change  --->  (#../../libs/freetdm/mod_freetdm)
To  --->  (../../libs/freetdm/mod_freetdm)

  • 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)

  • Configure freeswitch for freetdm 
    In order to automatically load freetdm in freeswitch at runtime we need to enable it in modules.conf.xml

#> vi /usr/local/freeswitch/conf/conf/autoload_configs/modules.conf.xml

 

Uncomment the mod_freetdm line :
Change  --->  <!-- <load module="mod_freetdm"/>
To  --->  <load module="mod_freetdm"/>

For more information on downloading Freeswitch, go to : 
http://wiki.freeswitch.org/wiki/Download_FreeSWITCH

For more information on installing Freeswitch, goto: 
http://wiki.freeswitch.org/wiki/Installation_Guide

 

 

Proceed to the Configuration Page

FreeTDM standalone

You will need to download a full Freeswitch distribution in order to get the FreeTDM source.

#>git clone git://git.freeswitch.org/freeswitch.git freeswitch

For more information on downloading Freeswitch, go to: 
http://wiki.freeswitch.org/wiki/Download_FreeSWITCH  

Now lets proceed to build FreeTDM.

Install FreeTDM from source
 

  • Change into the FreeTDM directory

#> cd freeswitch/libs/freetdm

  • Configure the buildsystem

#> ./bootstrap.sh

#> ./configure --prefix=/usr/local/freetdm

  • Build

#> make

#> make install

At this point the library and modules are installed. If you are using FreeTDM as an API, you have 2 options to configure the library, either you proceed to the Freetdm Configuration Page and use the API ftdm_global_configuration() which parses this file and creates the needed span and channels data structures out of it, or you create the structures manually using API's such as ftdm_span_create(). If you decide to use the pure API approach, have a look at sample/boost/ftdmstart.c for a sample program making use of such APIs.

For further documentation of the API you can take a look at the doxygen documentation at http://docs.sangoma.com/doxygen/freetdm or better yet, take a look at the comments in src/include/freetdm.h

 

Return to Documentation Home I Return to Sangoma Support