SANGOMA

Dahdi / Asterisk / Wanpipe

  1. Requirements
  2. Download Asterisk/Dahdi/Libpri
  3. Installing Asterisk/Dahdi/Libpri
  4. Driver Installation
  5. Configuration/Operation
  6. Dahdi Documentation (voip-info)

 


Requirements

For most distributions such as : CentOS, Fedora, RedHat, SuSE, Debian .... default packages are enough.  Therefore, there is no need for downloading any extra packages.

For detailed information of package requirements click here.

 


Downloading Asterisk/Dahdi/LibPRI

Go to http://www.asterisk.org/downloads and download Asterisk/Dahdi/LibPRI (Look for Asterisk downloads  on right-hand side) .
You can use wget command to download sources (tar ball) on your local directory.

For example:


#> wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
#> wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
#> wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.1-current.tar.gz

Installing Asterisk/Dahdi/Libpri

  1. Dahdi Installation
     
    Download Dahdi into arbitrary directory (/usr/src) and  untar it.
    #>tar xvfz dahdi-linux-<version>
    #>tar xvfz dahdi-tools-<version>
    #>ln -s dahdi-linux-<version> dahdi
    #>cd dahdi-linux-<version>
    #>make
    #>make install
    #>cd ..
    #>
    cd dahdi-tools-<version>
    #>./configure
    #>make
    #>make install

  2. LibPRI Installation
    Download libpri into arbitrary directory (/usr/src) and untar it.
    #>tar xvfz libpri-<version>
    #>cd libpri-<version>
    #>make
    #>make install

  3. Asterisk Installation

    If you are upgrading Asterisk make sure that old asterisk modules are removed from /usr/lib/asterisk/modules

    #> cd /usr/lib/asterisk
    #> mv modules modules.old

    Download Asterisk into arbirary directory  (/usr/src/) and untar it.
    Untar Asterisk and proceed with installation
    #>tar xvfz asterisk-<version>.tgz
    #>cd asterisk-<version>
    #>./configure     
    #>make
    #>make install
    #>make samples (in case of very first install)

Please note: <version> refers to the specific release of your program. For instance, dahdi-linux-2.0.0.tar.gz, once untarred will create the folder dahdi-linux-2.0.0.
  
Once Dahdi, Libpri and Asterisk are downloaded and untarred, you may proceed with WANPIPE® installation.
 
After completing the WANPIPE® TDM installation, you may proceed to configuring the full Asterisk suite.

 


Wanpipe TDM/Dahdi Installation (Linux)

  1. Download the the latest stable release  -> http://wiki.sangoma.com/wanpipe-linux-drivers#stable
  2. Untar wanpipe release in arbitrary directory (/usr/src/ is recommended).
    #>tar xvfz wanpipe-<version>.tgz
    #>cd wanpipe-<version>
    After untarring WANPIPE®, the wanpipe<version>/ directory will be created.  
  3. Run ./Setup install from the newly created wanpipe-<version> directory
       
             #>./Setup dahdi
        or

             #>./Setup dahdi --64bit_4GB 
                 (in case X86_64bit & 4GB memory or more)
     
    Proceed with installation Select "Y" for each option.

    Setup will try to auto-detect dahdi sources in /usr/src directory ?
    [By default Setup will look in /usr/src]  
    ---
  4. Proceed with Defaults for the rest of the compilation.   
    --
  5. Last step in installation will ask you to configure wanpipe cards for Dahdi
    -> Proceed with YES this is your initial installation
    -> Note wancfg_dahdi configurator will overwrite your
         system.conf and chan_dahdi.conf files and
         save the originals as system.conf.bak and chan_dahdi.conf.bak

    If any errors are encountered during the compilation of the utilities, click here for assistance.

 
Confirm Successful Wanpipe/Dahdi Installation

  1. Confirm successful Wanpipe/Dahdi installation run:
    #>wanrouter hwprobe

    This command will load the wanpipe and Dahdi modules and will print out list of all Sangoma hardware installed on the system. 

 


 

Configuration/Operation

  1. Create Wanpipe/DAHDI Configuraiton Files -> run:
    #> wancfg_dahdi
    ---
        (Note -> this step was offered at the end of the ./Setup zaptel,
         if you already configured the card proceed to the next step)

          - Creates Dahdi configuration files
          - Creates wanpipe configuration files in /etc/wanpipe
          - Creates dahdi config file in /etc/dahdi/system.conf 
          - Creates Asterisk dahdi config file in /etc/asterisk/chan_dahdi.conf
    ---
  2. Start Wanpipe Ports
    #> wanrouter start
          - Starts all wanpipe ports
          - Check /var/log/messages for info or errors
    ---
  3. Configure DAHDI module
    #> dahdi_cfg
          - configures DAHDI kernel modules from /etc/dahdi/system.conf ( Previously - ztcfg )         
    ---
  4. Start Asterisk
    #> safe_asterisk 



Requirements

Wanpipe requires a list of packages on your system prior to installed. The Setup script will check for those packages prior to installation.
Confirm that you have all the packages installed:


Wanpipe Driver Minimum Requirements

C developement tools ...(gcc)
C++ developement tools
Make utility
Ncurses library
Perl developement tools
AWK
FLEX
Patch
libtermcap-devel
bison


Note: The following assumes your linux distribution uses "yum" or "apt" package managers, adjust to your distros package manager (for example Suse uses "yast").

Mandatory packages - required for wanpipe drivers/modules:

  1. Kernel headers (or source) in /lib/modules/$(uname -r)/build
    use "yum install kernel-devel" or apt-get kernel-devel" to install.
  2. C Development tools (gcc )
    use "yum install gcc" or "apt-get install gcc" to install.
  3. Bash v2
  4. AWK
  5. Patch
    use "yum install patch" or "apt-get install patch" to install.
  6. Perl Development tools.
    use "yum install perl" or "apt-get install perl" to install.
  7. Bison
    use "yum install bison".

Optional packages - required if you want to install Wanpipe utilities:
Note: Wanpipe utilities are required to create configuration files for Sangoma cards.

  1.  C++ Development tools
    use "yum install gcc-c++" or "apt-get install gcc-c++" to install.
  2. ncurses & ncurses-devel library
    use "yum install ncurses" or "apt-get install ncurses" to install.
    use "yum install ncurses-devel"  or  "apt-get install ncurses-devel" to install
  3. flex package
    use "yum install flex" or "apt-get install flex" to install.
  4. libtermcap-devel
    use "yum install libtermcap-devel" or "apt-get install libtermcap-devel" to install.

 

 

Comments

From Uxorious - 8/5/09 11:28 PM

If the wanpipe setup asks you to specify the path to dahdi, make sure you specify the root folder you extracted/compiled dahdi-linux-* in.

If you for example specify the include directory, everything will seem to build correctly, but wanpipe will be unable to run. You will most likely see this during the setup configuation ... like this:

FATAL: Error inserting wanpipe (/lib/modules/2.6.26-2-amd64/kernel/drivers/net/wan/wanpipe.ko): Unknown symbol in module, or unknown parameter (see dmesg)

dmesg shows:
[694347.384377] WANPIPE(tm) Hardware Support Module  3.5.4.18.0 (c) 1994-2009 Sangoma Technologies Inc
[694347.384377] usbcore: registered new interface driver sdlausb
[694347.386855] dahdi: Telephony Interface Registered on major 196
[694347.386855] dahdi: Version: 2.2.0.2
[694347.391490] WANPIPE(tm) Interface Support Module 3.5.4.18.0 (c) 1994-2009 Sangoma Technologies Inc
[694347.395490] wanpipe: no symbol version for dahdi_alarm_notify
[694347.395490] wanpipe: Unknown symbol dahdi_alarm_notify
[694347.395490] wanpipe: no symbol version for dahdi_hdlc_getbuf
[694347.395490] wanpipe: Unknown symbol dahdi_hdlc_getbuf
[694347.395490] wanpipe: no symbol version for dahdi_transmit
[694347.395490] wanpipe: Unknown symbol dahdi_transmit
[694347.395490] wanpipe: no symbol version for dahdi_register
[694347.395490] wanpipe: Unknown symbol dahdi_register
[694347.395490] wanpipe: no symbol version for dahdi_qevent_lock
[694347.395490] wanpipe: Unknown symbol dahdi_qevent_lock
[694347.395490] wanpipe: no symbol version for dahdi_hooksig
[694347.395490] wanpipe: Unknown symbol dahdi_hooksig
[694347.395490] wanpipe: no symbol version for dahdi_receive
[694347.395490] wanpipe: Unknown symbol dahdi_receive
[694347.395490] wanpipe: no symbol version for dahdi_ec_span
[694347.395490] wanpipe: Unknown symbol dahdi_ec_span
[694347.395490] wanpipe: no symbol version for dahdi_unregister
[694347.395490] wanpipe: Unknown symbol dahdi_unregister
[694347.395490] wanpipe: no symbol version for dahdi_ec_chunk
[694347.395490] wanpipe: Unknown symbol dahdi_ec_chunk
[694347.395490] wanpipe: no symbol version for dahdi_rbsbits
[694347.395490] wanpipe: Unknown symbol dahdi_rbsbits
[694347.429238] usbcore: deregistering interface driver sdlausb

From karsten - 5/30/09 10:50 AM

wanpipe 3.4.1 and wanpipe 3.5.2 needs automake1.9 and libtool

on Ubuntu 8.04 LTS you need:

apt-get install build-essential linux-headers-`uname -r` udev libnewt-dev libssl-dev libncurses5-dev libcurl3-dev udev lksctp-tools libsctp-dev bison flex automake1.9 libtool

From gogots - 5/29/09 2:32 PM

any word on how to fix "make dep modules" as i am trying to install wanpipe for asterisk 1.5 and getting stuck here.

From jbj1 - 11/19/09 3:42 AM

Just to add a bit more color to what uxorious wrote, if you are trying to install the drivers on an ubuntu 9.10 (Karmic Koala) box using the already-packaged dahdi kernel drivers you are in for a challenge. The debian/ubuntu folks did a neat thing by offering the dahdi modules under the dkms system. With dkms you don't need to distribute a new binary package for each kernel build you roll out. Instead the dkms-ified package relies on you to install the kernel headers and dkms will automatically build and install the modules for you on-demand. Neat huh? It is. It works great for stuff like the kernel drivers that go along with proprietary graphics devices. To put it more explicity, it works great for kernel modules that are not used by other kernel modules. In the case of our nice Sangoma hardware though, we have a bit of a problem because your Sangoma driver relies on the dahdi modules (it imports symbols that the dahdi modules export). 

In order for kernel module B to import symbols from kernel module A the build process for kernel module B needs to be able to find the symbols within the all-important Module.symvers  file. This file lists the checksums for each symbol that the kernel and kernel modules export. When you install the headers for your kernel, you end up with this file in /lib/modules/`uname -r`/build/Module.symvers. Unfortunately that file contains the symbols just for the kernel/module that were built for your kernel. If you build any modules subsequently (like, for example, dahdi by installing the dahdi-dkms package) the symbols for such module(s) are /not/ appended on. So, as was reported in the other comment, what will happen when you run ./Setup dahdi is the modules will build (actually, there are warnings that show up in setup_drv_log.txt but IMO these should probably be errors not warnings eh?) but when the time comes to load your new kernel modules you'll get a failure because you don't have the "version" (checksums) for the symbols you need from dahdi modules. Bogus!

So what to do? Well, if you follow the instructions Sangoma supplies which tell you to download the dahdi source and do "make install" then everything works because when you do the make install the Module.symvers that wanpipe-X.X.X needs will still be in the source dir and it will pick it up. If you are like me though you would /never/ consider simply running a "make install" on your system because you'll never be able to uninstall/upgrade later. The alternative is to hack dkms. Cool! Fortunately dkms is a shell script so this is pretty easy. Inside /usr/sbin/dkms you'll find a function called "build_module". Just go in there and comment out the line that says "clean_build". Now invoke dkms to build your module: dkms build -m dahdi -v 2.2.0.2 -k `uname -r` (you may have to delete the existing /var/lib/dkms/dahdi/2.2.0.2/`uname -r` if dkms has already built for your kernel because it will not overwrite). After dkms finishes building now we'll have the Module.symvers. The final step now is: cat /var/lib/dkms/dahdi/2.2.0.2/build/Module.symvers >>/lib/modules/`uname -r`/build/Module.symvers. 

Now you may run ./Setup dahdi and it will successfully build your modules. "But wait!" you say? If I won't run "make install" on my system then how am I ok to run ./Setup dahdi? Well, I'm not. I used the checkinstall program to create a debian package on the fly from the files that ./Setup.dahdi installs. In order to do this you'll need a lengthy exclude list to keep the Setup from clobbering some files that it shouldn't. That list is long and I won't post it here, I'll leave it as an exercise for the reader.

Incidentally, really dkms needs to actually solve this problem. A solution has actually been proposed a while back by mandriva apparently, but no one has acted on it. Maybe if I get ambitious I'll come up with a patch.... 

 

 

 

 

From rymes - 10/21/08 12:38 AM

I just built RPMs for AsteriskNOW 1.5b, which is now based on CentOS and uses DAHDI. If you prefer using RPMs to building from source, you can find instructions for building RPMs at http://wiki.sangoma.com/wanpipe-linux-setup-rpm

 Look at the end where I made a note about needing to install a few missing packages.

From mdoran - 1/17/09 2:12 PM


[root@localhost wanpipe-3.3.15]# ./Setup buildrpm --protocol=TDM
Enabling the AFT TE1 Support

Looking for zaptel/dahdi directory in /usr/src ...
-------------------------------------------
1 : /usr/src/dahdi-linux-2.1.0.3
------------------------------------------
------------------------------------------
m : Enter zaptel path manually

(ctrl-c to Exit)
Please select working zaptel directory [1-1][m]: 1

Enabling the TDM Voice Asterisk Support

Dahdi HW HDLC Support Detected: Enabling DCHAN Feature
Native Dahdi HW HDLC Support Detected - No patch required
Dahdi source unmodified

Checking for UDEV Zaptel compatibility...OK
  UDEV permissions not found/or not used

Error: Linux source dir /lib/modules/2.6.18-92.1.13.el5/build not found!

I see the file /lib/modules/2.6.18-92.1.13.el5/build in the directory.  I have to pleed ignorance here as I am relatively new to linux.

 

From mdoran - 1/17/09 1:26 PM

ERROR: The /lib/modules/2.6.18-92.1.13.el5/kernel contains a fresh, unconfigured kernel!

       If you already have a working kernel image, a
       simple kernel configuration can solve this problem
             In linux source dirctory run:

                make dep modules

       Then retry the Setup script !!

       If you are still expriencing problems please contact
       Sangoma Tech Support

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 11/9/09 11:53 AM