Wanpipe

From FreeSWITCH Wiki

Jump to: navigation, search

(work in progress)

Contents

Prerequisites

libpri

cd /usr/src
svn checkout http://svn.digium.com/svn/libpri/branches/1.2 libpri
cd libpri
make install

linux kernel source

Building the Drivers

Download the latest driver from Sangoma:

READ the REAMDE files that come with it.

bash ./Setup install

Quick walkthrough (as of 2007-03-13):

  • Would you like to install WAN Router now? (y/n) yes
  • Would you like update/upgrade wanpipe drivers? (y/n) yes
  • Please specify absolute path name of your linux directory: enter path to your linux source
  • Proceed to build WANPIPE kernel modules ? (y/n) yes
  • For Compilation Mode, selection the default, option 1
  • Visually Confirm that driver compilation was successful! (y/n) yes ( hopefully ;-) )
  • Would you like to install WANPIPE start-up scripts? (y/n) yes
  • Please specify a desired location for WANPIPE configuration files: accept the default, /etc/wanpipe
  • Please specify a desired location for WANPIPE interface files: accept the default, /etc/wanpipe/interfaces
  • Please specify a location for WANPIPE binary, firmware files: accept the default, /etc/wanpipe/firmware

Generate configuration file

Make sure that if you have previously installed wanpipe on the system with Asterisk, your wanpipeX.conf files will need to be changed. It is sugggested that you delete them, and create new ones, with the wancfg utility.

The Wiki states that wancfg does not currently support TDM API, you can download pre-generated files from bottom of their Wiki Page:

Preparing FreeSwitch

Then symlink libsangoma into freeswitch:

cd freeswitch.trunk/libs
ln -s /etc/wanpipe/api/libsangoma .
cd ..
./configure --prefix=/opt/freeswitch.trunk --with-libpri=/usr/src/libpri

You must also install libpri into /usr/src/libpri ( this is not done or checked for by the build process at this time, and must be done manually ).


If you attempt to build before doing all of these steps, you will need to re-run the top level configure, after doing a make clean, otherwise required components will not be correctly installed!

Testing

Check that wanrouter is able to see your devices:

# wanrouter hwprobe verbose

(output from an A200)

-----------------------------------------
| Wanpipe Hardware Probe Info (verbose) |
-----------------------------------------
1 . AFT-A200-SH : SLOT=2 : BUS=3 : IRQ=3 : CPU=A : PORT=PRI : HWEC=0 : V=05
+01:FXO
+02:FXO
+03:EMPTY
+04:EMPTY
...
+23:EMPTY
+24:EMPTY

Card Cnt: S508=0  S514X=0  S518=0  A101-2=0  A104=0  A300=0  A200=1  A108=0 

Troubleshooting

Problem: My freeswitch compile dies with two include files, wanrouter.h and wanpipe_cfg.h, conflicting with each other

Solution: The Sangoma configuration utility likely did not update the right kernel header files. Ensure that you do not have multiple versions of kernel header files in /usr/src, then re-run Sangoma's Setup script. This problem has been reported to Sangoma.

Ubuntu: dpkg --purge

(/work in progress)

References

Personal tools