Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Installing Asterisk on unRAID

Featured Replies

Edit:  I've made several corrections to my posts, but any future changes can be found at http://www.thetechguide.com/howto/asterisk-on-unraid.html.  You're welcome to do what you want with the info, i.e. repost it wherever, redistribute the files, I don't care (I only compiled them, nothing more).

  • Author

Ok, I'll start documenting some of the steps I've taken in case it helps someone else out later.  If this doesn't belong here, feel free to just delete the thread.

 

Currently using 4.3-beta2.  Installed kernel headers and then kernel source.  Had problems with zaptel-1.4.0, tried newest 1.4.9.2 and had new problems, 1.4.9.1 seems to compile ok.  Had to do some fancy legwork to get modprobe to work, here's what I've done so far:

 

After installing kernel source, it wipes out at least part of the original /usr/src (most importantly the .config file).  I extracted the bzroot contents, it gave quite a few errors but /usr/src/linux was intact (actual location was /boot/bz-mod/usr/src/linux).  Did a cp -rf /boot/bz-mod/usr/src/linux/* /usr/src/linux/ to get all the files over that may be missing.  Obviously .config was still missing, so I then did a cp -rf /boot/bz-mod/usr/src/linux/.config /usr/src/linux/ which worked.  I then ran these commands while in the /usr/src/linux directory:

 

make oldconfig

make include/linux/version.h

make modules

 

Went back to /usr/src/zaptel-1.4.9.1 directory, issued a make clean, make, and make install which all worked.  A make config complains about a missing zaptel.  At this point, modprobe ztdummy is working with no errors.

 

For asterisk I'm using version 1.4.18.1, libpri is version 1.4.3 (probably not needed).  I was able to finally compile everything, though make config for zaptel still states this:

 

root@Stacker:/usr/src/zaptel-1.4.9.1# make config

zaptel defaults 15 30

make: zaptel: Command not found

make: *** [config] Error 127

 

Doing a search only found a post where someone said there were some missing packages and it works now.  No mention of what those missing packages were.  Since a modprobe works, I figure I'll just wait until I can install my X101P card and try to copy the config files over from my other asterisk box.

 

Now, not all of these packages are necessary I'm sure, but I'm just listing everything I used to get to this point.  In my /boot/custom directory, here's what I have:

 

aaa_terminfo-5.6-noarch-1.tgz*   

glibc-2.7-i486-7.tgz*                   

libtermcap-1.2.3-i486-7.tgz* 

perl-5.8.8-i486-6.tgz*

binutils-2.17.50.0.17-i486-1.tgz* 

gzip*                                   

make-3.81-i486-1.tgz*       

wget-1.11-i486-1.tgz*

cpio-2.5-i486-3.tgz*             

gzip-1.3.12-i486-1.tgz*                 

nano-2.0.7-i486-1.tgz*

gcc-4.2.3-i486-1.tgz*             

kernel-headers-2.6.24.3-x86-1.tgz*       

ncompress-4.2.4-i486-1.tgz*

gcc-g++-4.2.3-i486-1.tgz*         

kernel-source-2.6.24.3_smp-noarch-1.tgz* 

ncurses-5.6-i486-3.tgz*

 

Note the separate gzip, since 4.3-beta2 does not include gzip, I had to extract it manually, copy it over to /usr/bin, then installpkg would work.  Not sure if you need kernel-headers since you have to have the actual source for zaptel.  Hope this helps some, I'll try to post back when I have more to report.

Here's a site which might have all the asterisk packages you need for slack 12 (which is what unRAID 4.3 is based on).  If they have all the packages needed, it might be easier for you than building from source.  If you are missing a critical non-asterisk library, let me know & I'll send it to you and/or build into next beta.
  • Author

Their version of zaptel is built on a different (older) kernel.  I will attempt to package up at least libpri and zaptel, maybe even go all the way and do asterisk too.

  • Author

Ok, here goes.  I compiled libpri, zaptel, and asterisk.  I have not yet done any real testing.  Right now I can confirm that the packages can be installed using installpkg, that modprobe ztdummy works, and you can start asterisk.  There are no config files, and not a single part has actually been tested.  It may not even work correctly on a fresh unRAID install, I still have a lot of extra stuff installed (gcc, glibc, terminal stuff, etc.).  When I have the chance, I'll see if it'll work on a fresh boot and if not, what it takes to make it work.

 

http://downloads.thetechguide.com/unraid/asterisk-1.4.18.1.tgz

http://downloads.thetechguide.com/unraid/libpri-1.4.3.tgz

http://downloads.thetechguide.com/unraid/zaptel-1.4.9.1.tgz

 

Edit:  You also need libgsm and gcc, here's links to download them, though you can find them elsewhere:

 

http://downloads.thetechguide.com/unraid/libgsm-1.0.10_13-i686-1as.tgz

http://downloads.thetechguide.com/unraid/gcc-4.2.3-i486-1.tgz

 

Now, asterisk is pretty large, if anyone has any suggestions on trimming it down, I'm all ears.  Don't want to lose any core functionality, but there's probably a lot of fluff we don't need.  Just tell me how to trim it down and what exactly I'm cutting out (don't want it to be anything I rely on).

 

BTW, if anyone else has large files related to unRAID they want me to host, just let me know.

My first suggestion would be to look at the tar and remove any /usr/doc or /usr/man pages after installing the package.

  • Author

My first suggestion would be to look at the tar and remove any /usr/doc or /usr/man pages after installing the package.

 

Nothing there.  It does look like there's a lot of unneeded modules though in /usr/lib/asterisk/modules (over 20MB).  I'm trying to figure out what the bare essentials are, but I'm worried I'll leave out a lot of stuff others need.  Perhaps the best way would be to remove all the modules from the tgz file, then provide a separate download for just the modules.  You'd just delete the modules you don't need, then copy over the directory contents sometime after using installpkg on asterisk, but before actually starting asterisk.

  • Author

No success getting the X101P card to work.  The wcfxo module loads but I get this error in the syslog:  "FXO PCI Master abort", which means big trouble.  I believe it's something to do with the motherboard and the zaptel card, so it should still work for other people.  For now I'm going to get a Zoom 5801 (kinda like the Sipura SPA-3000), so that should take care of it for me.  Anyways, here's some extra steps I needed to take to get it to this point:

 

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):

 

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 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

 

You could probably just modprobe wcfxo and it will load zaptel automatically, I just like already having zaptel going first.  ztcfg has to be run, else asterisk won't know about the zaptel cards (I use the -v so you can see onscreen if there's any problems).  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 instructions above should help you compile zaptel for future kernel versions though.

  • Author

Asterisk kept crashing whenever a call ended, found out it was needing libgcc_s.so.1, so now I have installpkg install gcc for me and asterisk appears happy for now.

  • Author

Ok, last update.  My asterisk install had horrible gsm audio quality (any time the built-in prompts were used, you ran into this), to fix I installed libgsm then recompiled asterisk.  The end result is perfect audio quality, but you must now have libgsm installed.  I will also post any future updates at http://www.thetechguide.com/howto/asterisk-on-unraid.html so I don't clutter up the forum here replying to myself over and over.

what kind of resources does this "mix" need?

 

 

  • Author

what kind of resources does this "mix" need?

 

I had Asterisk 1.2 running on a Pentium3 933MHz before, with a Zaptel card and all (Zaptel cards can be resource intensive).  If you aren't using a Zaptel card, then the requirements should be even lower.  Transcoding can take up cpu too, if you have a slower PC there's ways around that though (for one, try to keep everything native, i.e. convert all your sound files to all the different codecs you'd use so asterisk doesn't need to transcode them, and make sure your phones can handle whatever codecs calls are made in and out from, that way asterisk just passes the call directly to and from the phone instead of having to transcode it first).

 

Basically, if this is for home use, then any server that can handle unRAID can handle Asterisk.  I haven't done any optimization (all my sound files are in gsm and calls are sent via G711, so there's transcoding going on) and everything works fine.  In case you have problems, this is what I'm using:

 

Intel E2160 (dual-core 1.8GHz)

2GB RAM (1GB might or might not be enough, if not then try symlinking more of asterisk's directories to a hard drive)

Abit AB9 Pro (seems to have problems with the X101P Zaptel card, not sure if others would work)

 

The astdb database, call logs, and all voicemails are symlinked to a hard drive.  For one this keeps them from filling up the ram drive.  Another benefit is you don't have to worry about losing all that information after a reboot.

  • 4 years later...

This is something I am interested in...  Asterisk PBX on my unRAID box..  Are there newer instructions (with newer asterisk version maybe 1.8?)

 

Thanks!

I would love to see a plugin for this on the new 5.0 when it's released.  I have been wanting to build an asterisk box for a while.  I want to make my little business sound fancy :)

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.