Advanced Driver information

    IMPORTANT: 

    Elastix ISO already comes pre-installed with Sangoma Wanpipe Driver RPMS. There is no need to install Wanpipe RPMS.

    Please visit Elastix Website to Configure your Sangoma card via the WebGUI Hardware Configurator 

    All RPMs compiled for Elastix are dependent on the Kernel Version, the dahdi/zaptel version and the asterisk version that come with default Elastix.  

    If you change any of these versions you must Install Wanpipe from Source

    Source Installation  (when an RPM is not available)

    You must install the Wanpipe driver from source if your Elastix system does not have the correct RPM requirements (kernel, dahdi, asterisk versions) as listed above.  The instructions below describe how to install the Wanpipe driver from source, which entail:

    -> Downloading the source for dahdi/zaptel currently installed on your system
    -> compiling the source Wanpipe driver against the dahdi/zaptel sources

    Requirements

    Please run the follow commands to install the required packages needed for compiling wanpipe drivers from sourc

    yum -y install kernel-devel-$(uname -r) libtool* gcc patch perl bison gcc-c++ ncurses-devel flex libtermcap-devel autoconf* automake*

    Dahdi/Zaptel Download and Compile

    1. Retrieve the version of dahdi currently installed on your system
      Type the following command on your Linux CLI:
      -
      rpm -qa | grep dahdi
       
      The following is an example output of the above command (the output on your system might display varying results):
      -
      rpm -qa | grep dahdi
      dahdi-2.3.0.1-3
      dahdi-modules-2.3.0.1-3_2.6.18_128.1.10.el5

      -
      The dahdi version is 2.3.0.1 in the above example, it is not 2.3.0.1-3 because the "-3" is an Elastix version and we are just concerned about the dahdi version.- 
      - 
    2. Download the sources for the dahdi version found on your system
      -> Go to the following website and search for the source RPM of your dahdi version:
      -> http://repo.elastix.org/elastix/
      ->  Search for 'SRPMS', the location where the sources for your elastix version exist

      -> Our search results using the above example would find dahdi-2.3.0.1-3.src.rpm

      -> Download the appropriate rpm in /usr/src/
      -> Ex: wget http://repo.elastix.org/elastix/index.php?dir=2.0/updates/SRPMS/&file=dahdi-2.3.0.1-3.src.rpm  *NOTE: the dahdi version will vary
      - 
    3.  Create the proper directories for the RPM to install to
      cd /usr/src/
      mkdir redhat
      cd redhat
      mkdir SOURCES

      * If you try to install the source RPM without creating the above locations, the rpm will fail to install
      - 
    4. Install the dahdi source RPM
      cd /usr/src/
      rpm -i <dahdi source.src.rpm>

      -
    5. Build the dahdi sources
      cd /usr/src/redhat/SPECS
      rpmbuild -bp dahdi.spec
      rpmbuild -bb dahdi.spec

      -> The dahdi sources are now located in /usr/src/redhat/BUILD

      *Note: you must have rpmbuild package in order to perform this step.  To obtain it, type: yum install rpm-build
      - 
    6. Compile and install the dahdi sources
      cd /usr/src/redhat/BUILD/<dahdi-version>
      make
      make install
      make config

    Wanpipe Driver Download and Install

    1. Download the lastest Wanpipe Driver: Wanpipe Driver
    2. Untar wanpipe release in arbitrary directory (/usr/src/ is recommended).
      tar xvfz wanpipe-<version>.tgz
      cd wanpipe-<version>


      Verify asterisk and zaptel/dahdi are shutdown by using the commands:
      asterisk -rx "core stop now"
      service dahdi stop

      ------------
    3. Install the Wanpipe Driver:
      /Setup install   

      Proceed with installation Select "Y" for each option.f

      Setup will ask you which compilation method you would like to choose to install the driver:
      For all PRI/BRI/ANALOG cards, choose Option 2

                     Setup will try to auto-detect dahdi sources in /usr/src directory
                     [By default Setup will look in /usr/src]  

      *Note: if you are running a production environment with BRI and Wanpipe using the deprecated
      smg daemon and wish to continue using it, you must choose Option 6/7
      ---
    4. Proceed with Defaults for the rest of the compilation.   
      --
    5. Last step in installation will ask you to configure the Sangoma card(s) for Dahdi/Zaptel/
      If any errors are encountered during the compilation of the utilities, click here for assistance.

    Confirm Successful Wanpipe/Dahdi Installation

    wanrouter hwprobe


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

    Configure Sangoma Cards


    1. Run the configuration script:
      wancfg_dahdi

      The above script creates configuration files for:
      -> Dahdi/Zaptel
      -> Wanpipe in /etc/wanpipe


       
      *Note: BRI is now integrated into Dahdi (Wanpipe 3.5.21 and newer)
      *** If you upgrade to Wanpipe 3.5.21 and UP and want to continue to
      use the deprecated BRI smg daemon, you must now run:
      "setup-sangoma smg"

    Operation

    To Start Wanpipe, Dahdi/zaptel and Asterisk, follow the steps below:

    1. start Wanpipe Ports
      wanrouter start
             - Check /var/log/messages for info or errors
      ---
    2. Configure DAHDI/ZAPTEL module
      dahdi
      dahdi_cfg -vvv
      or 
      Zaptel
      ztcfg -vvv


      *Note: this step is taken care of if you have chosen to perform dahdi_cfg automatically
      during 'setup-sangoma'

           
      ---
    3.  start Asterisk
      amportal start 
      asterisk -r

      To stop the Wanpipe driver at any time, you must stop Asterisk first:
      1-> amportal stop
      2-> wanrouter stop

      If using DEPRECATED BRI smg Installation you will need to add a "custom" trunk to dial out. If you go to http://wiki.sangoma.com/WoomeraFreepbx this details how to do this with Freepbx which is essentially the same as Elastix.


    Asterisk Download and Compile

    DEPRECATED
    *Note: This step is only required when using BRI Cards (A500/B700) with Wanpipe Driver 3.5.20 and below
    BRI is now integrated into Dahdi in Wanpipe 3.5.21 and above (this step not required)


     1. Find the version of Asterisk Currently installed:

    asterisk -V


    2. Go to http://downloads.asterisk.org/pub/telephony/asterisk/releases/ and search for your Asterisk version. If you have Asterisk 1.4.22 then the URL will be http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.4.22.tar.gz

    3.
    Once you have the URL run the commands:

    cd /usr/src/
    wget X

    with X being the URL

    Once the download is complete run the command "
     

    tar xfz asterisk-<version>.tar.gz
    cd asterisk-<version>


    4. Once you are in the Asterisk source run the command

    ./configure; make

    this will configure and build the source.