Testing Results

Finally on July 22nd I had the opportunity to install the RPi in a real production environment in Germany. Since that day it is used as PBX of a non-profit organization, running a permanent installation of 7 extensions. For a period of 3 weeks following July 22nd several additional extensions were installed to support all kinds of organizational activity of a greater event. These 3 weeks gave me the opportunity to test the system running with greater load than usual. A few numbers:

Number of extensions: 19
Number of trunks: 9
Average number of calls per day: ~60

The RPi directly replaced a PC based Trixbox that was in service for almost 4 years. Voice quality was absolutely perfect, and overal service quality was in no way inferior to the previous Trixbox installation. Users did not notice their calls were now routed through the RPi instead, however none of them used the webinterface (which runs slower indeed compared to the old system). On peak days I recorded more than 100 calls per day. 3 concurrent calls were reported several times in the logs.
The whole installation is using SIP technology only. Most clients are AVM Fritzboxes, and several different Germany based SIP providers are used as trunks: 1und1.de, dus.net, easybell.de and partly sipkom.com

I consider the whole test a big success. However, some problems appeared as well: Directly after connecting the RPi to a PoE enabled HP V1910 switch it crashed very often. Disabling PoE on the port used by the RPi made the frequent crashes disappear, but still the device locked up every 3 to 4 days. It is hard to say what really caused this, but I am suspecting the unstable power grid at the place of installation as the source, because other devices also crashed sometimes. In order to find the cause for the crashes I will try different power supplies as soon as possible and will monitor the situation closely in the long term. The crashes need to be resolved definitely…

42 thoughts on “Testing Results

  1. I was looking for hard statistics of how many concurrent sip ulaw
    channels the 256MB RPI can handle with incrediblepi v3.5
    I have heard of people getting half a dozen non transcoded channels on
    a flashed wrt54gs and while it’s true that the mysql and php is a HUGE
    load, I’m hoping 10 chans is doable.

  2. I don’t yet own a RasPi but took your image to a friend last night who owns one. I didn’t have much time to look in depth, but the work I saw the first time I booted your image was absolutely incredible. Needless to say one of the first things I did was download all modules, I think when my Pi arrives I will be having a lot of fun with this.

    Thanks for your hard work and dedication, I don’t think any of this work would have been possible using equipment we had just a few years ago.

  3. I’ve installed a few modules but I’m having trouble with ‘Backup & Restore’. It was reported that the module had installed OK. However, when using it I get a message “No storage servers found! Aborting.” I know that backup.php is sending this message but I don’t know what to do about it. Also, I don’t know where the backups are supposed to be stored – not the same place as in PIAF anyway.

    Also how can I change the password for web login please?

  4. I am trying my Pi for the first time. I’m using debian6-asterisk-14-07-2012.img
    When I boot up it gets to ‘Starting FreePBX’. Then, forever repeated, is the message:
    “Not starting asterisk with incorrect system time. Trying again in 10 seconds.” I’ve tried rebooting and also connecting the ethernet before and after it starts to boot.
    I assume it picks up the time from the Net.
    I know the Net connection is OK because I used the Pi where I normally have my MythTV Frontend. Also the LEDs light to show the ethernet is plugged in.
    Has anyone any ideas on how I can fix this please?

    • You seem to have some firewall on your network that prevents the NTP daemon from aquiring the current time. A small boot script only starts Asterisk as soon as the time is properly set. However, it should give you a console nevertheless, I will fix this bug soon in a new release of the image. In the meantime, you can still log in through ssh and manually set the time.

      • Thanks for your advice. I’ll give SSH a try – then I’ll be able to set up a static IP as well.

        • I think I’ve fixed it. Now when I boot I get the “Not starting asterisk with incorrect system time. Trying again in 10 seconds.” message just once. Then boot continues as normal. I found that there was an ntp.conf file, with the appropriate entries, but no driftfile.
          Thus I created one in /var/lib/ntp/ntp.drift
          This is now the content of the file:
          driftfile /var/lib/ntp/ntp.drift
          server 0.pool.ntp.org
          server 1.pool.ntp.org
          server 2.pool.ntp.org
          server pool.ntp.org
          Then I set up a static IP and rebooted.

  5. Hi,

    Can please shed some light on connecting RPi with PSTN cards?
    I am totally new to RPi and have no idea about architecture.
    Meanwhile I try studying Rpi and hope I can get some idea.

    • @sam – you would need someway of converting your pstn cards to usb and then have linux drivers to make it work. Not sure if usb to pci/isa cards exist?

      @Stuart – this is possible you would need to read in from a gpio pin and then feed a dial command into asterisk cli.

      • @Tom thanks for your reply. It has been years since I have been genuinely excited by a piece of technology but this kit, and the thousands of people doing work on it then sharing it (like you are) really gives me butterflies in my tummy.

        How easy would it be to come up with a script that would do what I am suggesting with a doorbell push? I am not really a script person, I have used Ubuntu for years now so Linux doesn’t put me off, but I tend to need a bit of help on the more in-depth stuff. Would it be safe enough to have a simple open/closed circuit installed or is it preferable to have some sort of buffer?

        • The rpi has two i2c busses I think.
          In theory any i2c device could connect
          and be read and sent to say the console
          in asterisk. There are many i2c devices for
          the Arduino and other device market.
          Including 24017 (or is it 24s17?) that is
          a port expander, 16 lines per chip and
          you can hang 4 on each i2c. Check for
          expanders etc on adafruit and if you want
          a board with the expanders look for a unit
          called a centipede for Arduino.
          73 de N3GLV

      • Hey Tom,

        Thanks a lot for your reply.
        Your post helps me implement some more ideas for SME market.

  6. Here’s a thought – would it be possible to use GPIO to hook up a doorbell push? When a caller presses the bell that triggers a command and sends an instruction via asterisk to ring the telephones for say 10 seconds displaying ‘Door’ on the phones, how easy would this be?

  7. Just thought you might want to know, along with the community:

    I have nginx running with fastcgi on Raspbian. I will say that Raspbian has provided lower CPU usage, while running nginx with fastcgi script has increased RAM usage by about 20%. Right now I feel the trade off might just be placebo for the faster page loads, and am not sure if it’s worth the increased RAM use.

    Also I did some research on sqlite, and it doesn’t seem to be that FreePBX supports sqlite at all, and may decrease stability.

    Keep us up-to-date on your power issues!

  8. This is amazing stuff. My question is how easy would it be to access the asterisk web interface remotely? I am thinking I could have the raspi hidden out the way as a PBX but still access via a desktop pc to do any config work.

    This is a seriously big breakthrough, I’d love to see it paying huge rewards for all involved in the long term.

  9. I was wondering if anyone here can lend any of their experience with Rpi for what I’m looking to accomplish. I need to install remote cctv analog cameras to a dvr recorder and was thinking about using Rpi and * to remote call out to the cameras, thinking that there nothing more than analog ports, to see if they respond and letting me know if there working. I hope I’m making sense with this question…?

  10. nice one. i have tested it and it works nice. is there a way to optimize it so it will not make use of the CPU at 100%?

    • Can you describe which process is using 100%? Because this is definitely not the case in my setup.

  11. Congrats for your wonderful work
    I need to VPN 2 pbx offices with the raspberry but it seems critical modules like iptables are not installed to the distro. It is very common for bpxes to be connected with VPN so if this could be added it would be terrific

  12. Congrats For the very nice built!

    I am trying to set up a pptp (VPN) and it seems that some modules for iptables are missing from the kernel. Any idea how to fix this? It would be very good to to add this functionality because many networked pbxes use Secure VPN’s for of site offices.

    Thank you once more for the amazing work that you have done!

    • I am using SIP only, with ATA converters and DECT phones. Party also SIP clients on mobile phones, connected with WiFi.

  13. I’ve been using Trixbox for a couple of years with 6 Cisco 7940s and an ATA. It runs on a dual core Pentium and mostly works fine, but pulls about 200 watts. I am fascinated by Rasberry Pi being able to run FreePBX in about 10 watts, and have built a system that works.

    My problem is I can’t find the TFTP server or the Endpoint manager for Cisco phones. Can someone help?



  14. Nice one, I read about your thoughts that the crashes might be coming from the problem with a stable power source. I just ordered some stuff which might work as a very small, and even cheap USV for your asterisk on the rasp. See: http://xn--simonschfer-s8a.net/katsching/RaspOnBat.png

    The Two things attached to the Rasp are:
    * 1x Solar Li-po Rider PRO (The pro version can provide up to 1A output)
    * 1x 1A LiPo

    Without power, the battery will power the rasp for aprox. 20 minutes, but you can also power the rider through a mini USB.

  15. Could you please post your configuration for the providers, especially easybell? Thanks 🙂

    • I’ve been using this for Easybell (replace USERNAME and PASSWORD with your credentials):


      Register string:

  16. Thanks for the update. Glad to hear it’s performing well in the business environment..
    I’m surprised that the web interface is slow, is there no way to optimise for this?

    It’s pretty remarkable what you have done here, a small business capable phone exchange for £30. I look forward to more updates.

    • Probably there is a way to speed up the webinterface, maybe by using sqlite, a lightweight http server and other stuff. But currently I do not have time to work on this. So far it was only me as admin using the webinterface anyway, and I am completely fine with the speed.

  17. Hi I am running asterisk server on the RPi, which sits behind NAT on my ADSL Fritz router. It was the image I found at the downloads section in the end of July. For the last two weeks, the system runs perfectly fine. I have 5-6 remote extensions, which means that when a sip call takes place, the voice packets travel through the asterisk, over the Internet. The call quality is perfect, no delays or packet drops have been reported.

  18. Hi! I am currently compiling Asterisk 11 beta on the wheezy install, my intention is to replace a 3 year old netbook that is running Asterisk 10 on Ubuntu.

    Things I’ll be interested in whether they work very well:
    * Music on Hold mp3 transcoding
    * ulaw / alaw sip transcoding
    * Handling maybe less than four calls at once

    intended other processes on the box:
    * Providing lightweight httpd service
    * smbd CIFS sharing
    * IRC or random other little user-interactive things

    Let’s hope the little system doesn’t sweat too much…!

  19. I am using pi with 6 lines and 2 permanent extension for my home personal use. I replaced by hp pc which I ran Elastix server on it.

    Thank you for releasing the pi version of asterisk.

  20. What OS were you running for the production? What codec were you using for the calls?

    • Thanks a lot for this amazing tip! Did not know about this before and will definitely try it.

        • Thanks again for your tip, it finally works for me. I have activated the watchdog according to your description, but could not test it in the first place. The fork bomb you suggested crashes the RPi but somehow not enough to trigger the watchdog. But running the fork bomb AND pulling out and inserting the SD card back in is definitely too much for that small guy. It kernel panics, and then after about 10 seconds or so, happily reboots.