HOWTO: Install Sangoma A200 card on elastix 0.8.3

Discussion in 'General' started by davidraw, Jun 15, 2007.

  1. davidraw

    Joined:
    Jun 14, 2007
    Messages:
    8
    Likes Received:
    0
    Hello,

    I had a devil of a time with this, so I decided to list what I did to get Sangoma A200 to work under a standard Elastix installation (Elastix 0.8.3, Centos 5). It may not work on any other version of anything.

    I have included the full output from my install (including my typos) in the attached file. If there is anything missing or wrong in the following instructions, you should be able to find it in there.

    The Sangoma cards do seem to be worth the extra hassle.

    Get a mug of coffee and a pack of cigs if you need them and off we go.

    Install the Sangoma card into its PCI slot. (Don't forget the power cord)

    elastix 0.8.3 - burn ISO to CD and install it on target machine (Download from http://www.elastix.org/ by clicking the download tab)

    Once the machine is up and running you should see

    Welcome to Elastix
    -------------------------------------------------

    For access to the Elastix web GUI use this URL
    http://192.168.178.180

    login as root with the password you entered during install. Then follow along....

    (NB. If significant time has passed since this post, make sure that all the versions are compatible.)

    Go to a nice directory

    [root@elastix ~]# cd /usr/src

    Get bison - it has yacc (yum install bison does not get a yacc the Sangoma installer understands and at the moment yum install byacc does not work - although it may by the time you read this)

    [root@elastix src]# wget http://ftp.gnu.org/gnu/bison/bison-2.3.tar.gz
    [root@elastix src]# tar xvfz bison-2.3.tar.gz

    Get the zaptel and put it in the directory /usr/src/zaptel

    [root@elastix src]# wget ftp://ftp.digium.com/pub/zaptel/zaptel-1.4.3.tar.gz
    [root@elastix src]# tar xvfz zaptel-1.4.3.tar.gz
    [root@elastix src]# mv zaptel-1.4.3 ./zaptel

    VERY IMPORTANT - get the kernel sources (yum install kernel-devel doesn't do it) and the error later on is hard to spot

    [root@elastix src]# wget http://people.redhat.com/dledford/Infin ... 5.i686.rpm
    [root@elastix src]# rpm -i kernel-devel-2.6.18-8.el5.i686.rpm

    (Why is this in some individual's redhat account rather than public FTP?)

    Now start to build the prerequisites:

    build bison

    [root@elastix src]# cd bison-2.3
    [root@elastix bison-2.3]# ./configure
    [root@elastix bison-2.3]# make
    [root@elastix bison-2.3]# make install
    [root@elastix bison-2.3]# cd ..

    We are now ready to install

    Now go and get the Sangoma software required for install (do NOT get wanpipe-3.x.x)

    [root@elastix src]# wget ftp://ftp.sangoma.com/linux/current_wan ... .3.4-9.tgz
    [root@elastix src]# tar xvfz wanpipe-2.3.4-9.tgz wanpipe-2.3.4-9/

    OK. We have everything we need, install the card. Answer the questions as you see fit, here are my answers... I have left out all the press <ENTER> to continue prompts.

    [root@elastix src]# cd wanpipe-2.3.4-9
    [root@elastix wanpipe-2.3.4-9]# ./Setup install

    Would you like to install WAN Router now? (y/n) y

    Would you like update/upgrade wanpipe drivers? (y/n) y

    <ENTER> (to take the default path - we just created it)

    Setting linux directory to /lib/modules/2.6.18-8.el5/build

    Proceed to build WANPIPE kernel modules ? (y/n) y

    (this bit doesn't seem to matter)
    cp: cannot stat `/usr/src/wanpipe-2.3.4-9/patches/kdrivers/src/net/sdladrv.mod.c': No such file or directory
    cp: cannot stat `/usr/src/wanpipe-2.3.4-9/patches/kdrivers/src/net/wanrouter.mod.c': No such file or directory
    cp: cannot stat `/usr/src/wanpipe-2.3.4-9/patches/kdrivers/src/net/wanpipe_syncppp.mod.c': No such file or directory
    cp: cannot stat `/usr/src/wanpipe-2.3.4-9/patches/kdrivers/src/net/wanpipe.mod.c': No such file or directory
    cp: cannot stat `/usr/src/wanpipe-2.3.4-9/patches/kdrivers/src/net/af_wanpipe.mod.c': No such file or directory

    Please Select Compilation Mode

    1. WAN Protocols Support (Default)
    Protocols: Frame Relay, CHDLC, PPP, ATM, X25, ADSL, TDM API

    2. TDM Voice (Zaptel) Support Only
    Protocols: TDMV (Zaptel), TDM API on AFT adatpers.

    3. TDM Voice (Zaptel) + WAN Protocol Support

    4. SMG (SS7) (Default for SMG install)

    5. SMG (SS7) + TDM Voice (Zaptel)

    6. TDM API (FreeSwitch Default)
    Protocols: TDM API on AFT adapters.

    7. Custom Compilation Mode
    Specify protocols to be added into the WANPIPE
    kernel drivers.

    Please select (1,2,3,4,5,6 or 7) [Default: 1]: 2 (VERY IMPORTANT - do NOT select 1 as some Sangoma docs tell you to)

    <specify path:> <ENTER>

    Recompile/reinstall zaptel (recommended) ? (y/n) y

    Visually Confirm that driver compilation was successful! (y/n) y

    Would you like to install WANPIPE start-up scripts? (y/n) y

    Would you like to auto-execute ztcfg after wanrouter start? (y/n) y

    (this error doesn't seem to matter) cp: cannot create regular file `/etc/wanpipe/scripts/start': No such file or directory

    (this error doesn't seem to matter) Error: Could not copy auto-ztcfg script

    <specify path:> <ENTER>

    <specify path:> <ENTER>

    <specify path:> <ENTER>

    Would you like to configure wanpipe devices for ZAPTEL? (y/n) y

    Would you like to generate /etc/asterisk/zapata.conf
    1. YES
    2. NO
    [1-2]:1

    Would you like to configure A200 on slot:5 bus:1
    1. YES
    2. NO
    [1-2]:1

    Zaptel and Wanpipe configuration complete: choose action
    1. Save cfg: Restart Asterisk & Wanpipe now
    2. Save cfg: Restart Asterisk & Wanpipe when convenient
    3. Save cfg: Stop Asterisk & Wanpipe now
    4. Save cfg: Stop Asterisk & Wanpipe when convenient
    5. Do not save cfg: Exit
    [1-5]:1


    Stopping Asterisk...

    Disconnected from Asterisk server

    Stopping Wanpipe...

    Unloading Zaptel modules...

    Removing old configuration files...

    Copying new Wanpipe configuration files...

    Copying new Zaptel configuration file (/etc/zaptel.conf)...

    Copying new chan_zap configuration files (/etc/asterisk/zapata.conf)...

    Starting Wanpipe...

    Starting WAN Router...
    Loading WAN drivers: wanpipe done.
    Starting up device: wanpipe1
    Configuring interfaces: w1g1
    done.

    Loading Zaptel...

    Zaptel Version: 1.4.3
    Echo Canceller: MG2
    Configuration
    ======================


    4 channels configured.


    Would you like to execute 'ztcfg' each time wanrouter starts?
    1. YES
    2. NO
    [1-2]:1


    Starting Asterisk...

    Listing Asterisk channels...

    Chan Extension Context Language MOH Interpret
    pseudo from-internal default
    1 from-zaptel default
    2 from-zaptel default
    3 from-internal default
    4 from-internal default

    Type "asterisk -r" to connect to Asterisk console

    [root@elastix wanpipe-2.3.4-9]#

    And you should have a working Sangoma A200 on Elastix. In this case ZAP/1 and ZAP/2 are FXO (red, PSTN) ports, ZAP/3 and ZAP/4 are FXS (green, to analogue handset) ports.

    /etc/asterisk/zapata.conf should have something similar to:

    ;Sangoma A200 [slot:5 bus:1 span:1]
    context=from-zaptel
    group=0
    signalling = fxs_ks
    channel => 1

    context=from-zaptel
    group=0
    signalling = fxs_ks
    channel => 2

    context=from-internal
    group=1
    signalling = fxo_ks
    channel => 3

    context=from-internal
    group=1
    signalling = fxo_ks
    channel => 4

    and /etc/zaptel.conf should have something like:

    #Sangoma A200 [slot:5 bus:1 span:1]
    fxsks=1
    fxsks=2
    fxoks=3
    fxoks=4

    Connect your red ports to PSTN (or other outgoing phone system) and your green ports to analogue phones or incoming lines.

    Get yourself off to a comfortable chair in front of a computer with a web browser and go to http://<elastix-box-ip>, log in with admin/palosanto and off you go.

    Remember which ports are attached to your phone, they are fxo ports in from zapata.conf and zaptel.conf's point of view. In this case ZAP/3 and ZAP/4 are available for extensions. The install should have configured an outgoing trunk ZAP/g0 if you have red FXO ports on the Sangoma (see the 2 group=0 entries in zapata.conf above). You can just use that.

    Post edited by: davidraw, at: 2007/06/15 16:38

    Post edited by: davidraw, at: 2007/06/15 16:47

    Post edited by: davidraw, at: 2007/06/15 16:50

    Post edited by: davidraw, at: 2007/06/15 16:51<br><br>Post edited by: davidraw, at: 2007/06/15 16:52
     
  2. davidraw

    Joined:
    Jun 14, 2007
    Messages:
    8
    Likes Received:
    0
    Re:HOWTO: Install Sangoma A200 card on elastix 0.8

    STOP PRESS. The Sangoma card doesn't come up after a reboot. Reboot looks good with info and no errors...<br><br>Post edited by: davidraw, at: 2007/06/16 17:11
     
  3. davidraw

    Joined:
    Jun 14, 2007
    Messages:
    8
    Likes Received:
    0

Share This Page