Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Is a helper user space library (.so/.dll)

  • implementsvoice processing:callerid, dtmf

  • Implements PRI decoding

 

Installation

Table of Contents

...

Wanpipe TDM Voice API Solution 

  1. Wanpipe Release -> Download Here
    -> TDM API Driver
    -> LibSangoma User Library -> user space API.

...

Wanpipe Package Installation

  1. Untar LATEST release  

    Code Block
    tar xvfz wanpipe-<version>.tgz

  2. Change directory into wanpipe source directory

    Code Block
    cd wanpipe-<version>/

     

  3. Compile and install wanpipe driver

    Code Block
    make
    make install

      

  4. To confirm successful installation run:

    Code Block
    wanrouter hwprobe

...

  1. Code Block
    wanrouter start

    ->This command will load and configure wanpipe drivers
    -> For full wanrouter usage click here  

  2. Full driver log and events are located in /var/log/messages
    ->

    Code Block
    tail -f /var/log/messages
      
  3. At this point TDM driver is configured and ready to tx/rx voice & dchan data.  One must make sure that ports are in connected state before trying to tx/rx data using the API programs.
    -> wanrouter status                           #check status of all ports
    -> wanpipemon -i w1g1 -c Ta            #check T1/E1 alarms of each port  

  4. Once all ports are connected the ifconfig command can be used to confirm that card running.
    -> ifconfig 
        The rx/tx data packets should be incrementing
        The MTU value indicates the hardware chunk size
        Any rx or tx errors indicate that something is wrong with the data flow.
           -> overruns   : indicate dma problems  or mis-configured system.

...

  1. cd /etc/wanpipe/api/libsangoma

  2. ./configure

  3. make

  4. make install

  5. Add library path /usr/local/lib into /etc/ld.so.conf

  6. Run ldconfig to accept /etc/ld.so.conf changes.

Wanpipe LibSangoma with LibPRI Installation (Optional must be done manually)

  1. Download  libpri from www.asterisk.org and save it into /usr/src directory.

  2. Untar libpri tgz file in /usr/src directory

  3. Change directory into libpri and run: make; make install

  4. cd /etc/wanpipe/api/libsangoma

  5. ./configure  --with-libpri=/usr/src/<libpri directory>

  6. make

  7. make install

  8. Add library path /usr/local/lib into /etc/ld.so.conf

  9. Run ldconfig to accept /etc/ld.so.conf changes.

...

Sample API configuration Files

...

  • SPAN Mode
    Single device per T1/E1 span.
    Data from a single span is passed up to a user as a single chunk of data.
    User has the responsibility to multiplex and de-multiplex data per channel.
    Better performance on higher densities.
    Harder to develop on.

  • CHAN mode
    Device per T1/E1 channel
    Highly efficient interrupt logic to minimize number of interrupts.
    High kernel context switching due to large number of devices.
    Easer to develop on. Easily fits into a multi-thread applications.
    Default behavior for Zaptel/DAHDI, FreeSWITCH, SMG

 

FAQ

Libsangoma EC Control

 

How to turn on/off Echo Canceller by calling libsangoma API

In libsangoma, the API can be called in this way (functions defined in libsangoma.h, and can be called from customer's source code directly to libsangoma):

...

/*!
  \fn int sangoma_tdm_disable_hwec(sng_fd_t fd, wanpipe_api_t *tdm_api)
  \brief Disable HWEC on this channel
  \param fd device file descriptor
  \param tdm_api tdm api command structure
  \return non-zero: error, 0: ok
  
  Supported only on cards that have HWEC
*/
int _LIBSNG_CALL sangoma_tdm_disable_hwec(sng_fd_t fd, wanpipe_api_t *tdm_api);

Example

The example to use the above APIs:

...