Welcome to The Tech 
Guide
Google
 
Web www.thetechguide.com
Geeks with attitude
Navigation
  • Home
  • How-To's
  • Tweaks
  • Hardware
  • Software
  • Games
  • Our Picks
  • Downloads
  • FAQ's
  • Forum
  • Chat
  • Tech Deals
  • Links
  • Email

  • Site News
    Our Black Friday section is now online! Click here to check it out.

    Active Discussions
    [an error occurred while processing this directive]


      

    Installing Asterisk on unRAID


    This guide assumes you already have a working Asterisk setup and are wanting to migrate that setup to a server running unRAID. Why does it assume this? Because that's what I needed, so I went about getting it to work. Now, I have included all the files you should need, but note that I was not able to get a zaptel card to work. I believe it was a problem with my motherboard, please feel free to let me know whether you got a zaptel card (such as the X100P or X101P) to work.

    You will need to download these files:

    asterisk-1.4.19.tgz
    libpri-1.4.3.tgz
    zaptel-1.4.9.2.tgz
    libgsm-1.0.10_13-i686-1as.tgz
    gcc-4.2.3-i486-1.tgz

    If you're running an older version of unRAID or Slackware and need asterisk and zaptel compiled for kernel 2.6.24.3, then download these instead (note that you can probably use the newer asterisk version above, but zaptel must be compiled for the current running kernel):

    asterisk-1.4.18.1.tgz
    zaptel-1.4.9.1.tgz

    While the other files may work on other unRAID versions, this version of zaptel will ONLY work on unRAID 4.3x. It has to be compiled against the kernel sources, so if the kernel changes, zaptel will not work. Feel free to try anyways, but you're on your own if it doesn't work. The gcc package is needed for asterisk, else you'll get constant crashes.

    I need to run asterisk as the user asterisk, but that's not a standard user. The quick and easy way for me was to copy in the relevant lines in my /etc/passwd and /etc/group files (from my old server) then put it on the unRAID box. Then I copied the new files to /boot/custom (the custom directory on my usb flash). In the go script, use these lines to copy them back over:

    cp /boot/custom/files/passwd /etc/passwd
    cp /boot/custom/files/group /etc/group


    Now when you use installpkg, the correct user/group name can be applied. Then I copy over /etc/zaptel.conf and all my config files like so (note that you have to either copy these files from your old system or create from scratch, they're not bundled with the packages above). Note that I've stored the asterisk packages in /boot/custom/asterisk and the other packages in /boot/custom, modify the commands below for your needs:

    installpkg /boot/custom/asterisk-1.4.18.1
    installpkg /boot/custom/asterisk/libpri-1.4.3
    installpkg /boot/custom/asterisk/zaptel-1.4.9.1
    installpkg /boot/custom/libgsm-1.0.10_13-i686-1as
    installpkg /boot/custom/gcc-4.2.3-i486-1

    cp /boot/custom/asterisk/asterisk/etc/zaptel.conf /etc/
    cp /boot/custom/asterisk/asterisk/etc/asterisk/* /etc/asterisk/


    For safety's sake, I chown the /etc/asterisk directory contents like so:

    chown -R asterisk.asterisk /etc/asterisk

    Then I have udev reload its config files, since new stuff was added for zaptel after used installpkg on zaptel (but after udev was already up):

    udevcontrol reload_rules

    Now you're ready to start testing your card out. If you have an X101P or X100P card, these additional commands should get you up and running:

    modprobe zaptel
    modprobe wcfxo
    ztcfg -v
    asterisk


    If you don't have any zaptel cards, then instead of modprobe wcfxo type modprobe ztdummy to use the ztdummy interface for timing. Quick note, everything may seem like it worked 100% so far, but still check /var/log/syslog for possible errors. Of course the asterisk command starts asterisk, and you should be good to go.

    A few quick notes:

    The zaptel package above will only work on unRAID 4.3. Tested on up to beta3, and as long as the kernel doesn't change it should work with all future versions of 4.3. The zaptel package has to be compiled against the kernel, so if that changes, it won't work (so you can't use this on any version below 4.3, and can't use on any version higher than 4.3 assuming the kernel changes). Also note that after switching systems and upgrading to beta3 I was able to compile zaptel-1.4.9.2, but I didn't package it up. I only note this in case you need it for some reason, now you have at least one success story. Since my zaptel card won't work in this system, I most likely won't be packaging up zaptel any more, though I may occasionally make a new asterisk package if needed.

    You must use the libgsm package, as I compiled asterisk against it. While I was able to compile without it, sound quality was horrible. All of the built-in voice prompts, anything that had to go through gsm sounded bad. When I installed libgsm and then compiled asterisk, everything sounded perfect. Unfortunately it's one more package that you must install now.


    Questions? Ask in the forum or email me.

    For the Privacy Policy, click here.
      
    Past Articles
  • Build your own Apple Clone
  • AllofMP3 Review
  • Tutorial to Basic Windows 2000 DOS
  • Extracting and joining MPG2 files from SVCD
  • Modifying your Windows XP Boot Logo
  • Unlocking WinXP's setupp.ini
  • Making a Full Screen Bios Logo
  • Making your WinMe CD bootable
  • Auto-insert your Win9x serial
  • Auto-insert your Office2kserial
  • Why FedEx Sucks