Building a PBX setup around the Raspberry Pi

We’re not sure why this use didn’t immediately come to mind when we got our hands on a Raspberry Pi board, but the hardware is almost perfect as a PBX system. PBX, or Private Branch Exchange, is basically an in-house phone system. This guide which [Ward] put together shows you how to do some interesting things with it.

When talking about PBX setups the most common software package is Asterisk. That’s what’s at work here, rolled up with a bunch of other helpful software in an RPi targeted distro called Incredible PBX. All it takes to get up and running is to partition and burn the image to an SD like any other RPi distro. The configuration ends up being most of the work, starting with changing the default password, and moving on to customizing the environment to match your phone numbers and your needs. As with PBX setups on other embedded Linux devices, Google Voice is your best friend. The service will set you up with a free phone number.

This guide doesn’t delve into hardware connected hand sets. You’ll need to use a SIP phone. But that’s easy enough as there are free apps for most smart phones that will do the trick.

[Thanks Jamie]


  1. Mathias says:

    Am I the only one who would love to have DECT phones used with Asterisk with cheap hardware that is not 5+ years old? I could never (in the forseeable future) convince my Girlfriend to use a smartphone and given the standby and talk time I can understand her.
    Is there cheap analog phone hardware so I could just wire up a DECT basestation?

    • lpbk says:

      You can pick up an “ATA” (Analogue Terminal Adaptor) for about 30 quid which will allow you to do just that. The Linksys ones (eg PAP2T) are relatively inoffensive.

    • sean says:

      I would recommend the Linksys SPA-1001. You can get them for around 20€ on Ebay from china, and they work relatevely well. I have been using them exclusively to speak with my family after moving from Canada to Europe, and they have worked flawlessly. This was the perfect soltuion for my mom who is an absolute technophobe.

      Basically you configure them via a web interface, then plug any normal analog phone into it (be it a cordless phone, or a normal corded phone)

      In the 2 years that they have been running, I have had to have one reset by unplugging and plugging back in, but other than that it has been flawless operation.

      I am using as a provider, but they also work with Asterisk.

    • Bob Fleming says:

      Gigaset (used to be Siemens) have a few DECT stations which do analogue PSTN and VoIP and I’ve found them to work well. I swapped my mother’s old DECT (also Gigaset, but not VoIP) base station with a Gigaset N300A and it works pretty well. My only gripe is the inability to define more complicated dial plans, but that’s what the RPi could be for (I use an old fanless HP thin client atm).

    • Panikos says:

      Can’t you use any of those wifi SIP phones with the asterisk server configured as the SIP gateway?

      There’s tons at a reasonable price on ebay and elsewhere. Sent one to my parents preconfigured for callcentric recently s they just plugged it in and started using it as a normal phone. Didn’t have to explain anything.

    • kendall15 says:

      Try the obi100:
      It can handle Google voice all on it’s own with a server.

    • willnue says:

      Mathias: Grandstream has a SIP based DECT phone – “DECT base station registers up to 5 DECT handsets and talks to up to 4 handsets concurrently” They run about $80 for the base station handset and $45 for each additional one.

      DP715/DP710 – VoIP DECT Phone

    • JayTaylor says:

      If you like DECT phones then check out the Panasonic KX-TGP500. You can have quite a few handsets and up to three calls up at once. It also passes WAF pretty good. (Wife Acceptance Factor)

  2. hellophilly says:

    What you need is an analog converter. It’s basically a SIP phone in a box that then passes the analog signal on to a phone port. Something like this: (no affiliation except that we buy these at work).

  3. Guilherme Silveira says:

    You’re right :) Raspberry Pi is ideal for small Asterisk PBX.
    Actually it can be expandable for some analog phones also if used with a switch in the box with PAPs.

  4. lpbk says:

    If anyone has any suggestions for some FXO/FXS hardware (either USB or GPIO?) which can be made to work with a raspberry pi I would be interested to hear about it!

    I’d love to be able to replace my home asterisk server with a pi, but I need 2 FXO and 2 FXS ports to connect it to my 1957 strowger exchange, and currently the most cost effective way to provide those is with a PCI card.

    I did find a sangoma USB FXS/FXO adapter which works with linux, but it costs more than I spent building my existing solution… and has half as many ports.

    Homebrew suggestions welcome!

    • Bob Fleming says:

      I know you said USB/GPIO, but is an ethernet solution so bad? It’d allow you to place the ATA near the actual handset.
      If eth is ok then I’d recommend Cisco/Linksys/Sipura SPA-3102 (1FXO,1FXS) and/or PAP-2T (2FXS). many options, and difficult to configure sometimes but it’s all time well spent and they’re solid.

    • nes says:

      How about an Ethernet FXS adapter like this one for example? I guess no reason they wouldn’t talk to a local Asterix server. is a good alternative to Google voice and provide free numbers too.

    • michael says:

      I have run a Fritzbox as ISDN Gateway. The Fritzbox runs as SIP Client und * has a SIP trunc between the Fritzbox. It works well. Google * and Fritzbox.

  5. nes says:


    Ah, I see. How does the signalling for incoming calls to the exchange work? Is it still pulse dialling? If so, I am wondering if hooking a relay up to a GPIO on the R-Pi and writing a script to tap out the internal number might work, in conjunction with one of these boxes.

    As an aside, are you UK based? I have a big box of ex-GPO relays, maybe 50 or so, all different. Most have oddball coils with multiple windings for doing relay logic I guess. They’re not much use to me so if you’re interested, feel free to PM me on the hackaday forum.

    • lpbk says:

      @nes – yea, it’s all pulse dialing all over the place (although I have some boxes which which can do dtmf->pulse translation if necessary)

      I wonder if I could use a usb soundcard (and some line isolation transformers so the soundcard doesn’t unexpectely get 50V up it) in combination with some relays etc hanging off the GPIO port for doing the signalling. Hmm. A bit hairy but it might get me somewhere.

      I am in the UK, and I may very well be interested in a big box of relays! Especially any with multiple windings. I’ll have a crack at getting in touch with you (never used the forum before ;-)

      • Bryn-y-Baal says:

        I use Gigaset N300IP which has normal landline plus 6 VoIP accounts on it. The landline goes to my old Strowger exchange whilst the VoIP lines are on various providers such as My old Strowger exchanges – I have a number of former public exchanges are linked by VoIP to others around the UK and the World on our own network – is your Strowger connected to the network?

  6. wardmundy says:

    @lpbk: Visit the PBX in a Flash Forum and post this issue there. We have folks that use ATA’s with true FXO ports all the time. The best of these is the Obi110 which you can find on Amazon for under $50.

  7. mortain says:


    Maybe IPBrick can be installed in a R-Pi.

  8. BadHaddy says:

    One of the companies I work for, and 2 of the companies I own use asterisk for the phone systems.

    One of the big issues with non x86 based asterisk units is: No Digium fax. They also lack the power to transcode more than 1 or 2 channels at a time.

    That said, while the raspi is a neato little board, my Ubiquity Routerstation Pro running OpenWRT has been my home asterisk server for YEARS. 800MHz CPU, plenty of ram, USB for voicemail storage, and designed to be on 24/7.

  9. Jason says:

    Speaking as someone who used Asterisk for years. Asterisk is garbage. I would have used Freeswitch.

  10. roberto says:

    Asterisk rocks, and small PBX’s have been done since asterisk was ported to the openwrt distro.

  11. wardmundy says:

    roberto: There certainly have been other Asterisk ports. But you won’t find anything comparable to this build: text-to-speech, speech-to-text, IVRs, SMS messaging and message blasting, free Google Voice service, email delivery of voicemails, directory lookups and dialing by just saying the name of anybody in your phonebook, CallerID name lookups for your incoming calls, inbound call alerts on your desktop, XBMC, wired or wireless operation, and the list goes on and on. We love FreeSwitch, too, so stay tuned. In the meantime, take Incredible Pi for a spin. You won’t be disappointed.

  12. proflt says:

    Is there a way to make this call one number from many g-voice accounts and connnect the first one that makes it through? would be great for “be the 10th caller” type stuff. you could win all the local radio station contest :)

    Guess i need to see if the phones at work are IP based? and if i can connect to my raspberry pi.

  13. wardmundy says:

    @profit: Takes about 5 seconds to set up each GVoice trunk. Then another 5 seconds to set up an Inbound Route for each one and point all of them to the same extension. Pick up the 10th call. Done. Or you could write a little script to do the counting for you. Simple stuff with the Asterisk dialplan which is a complete programming language.

  14. daniel says:

    Hey all,

    the Ozeki Phone System XE can be installed on R-Pi and SIP trunks can be used with the system. Watch this (page to read + video to watch):

    Needs basic configuration to run and do not crash like Astersik do sometimes. I can do nothing but recommend it.

  15. Did you see This is a open hardware project!Maybe that project is the way to handle FXO on raspbaerry-pi PABX.

  16. ted says:

    Hi. I recently ordered a Raspi and am so glad the conversation here is happening. Heres what I want to accomplish maybe someone here can help.

    I want to be able to install the DAHDI drivers onto raspberry pi
    I want the Pi to then be able to accept calls via a normal in-home telephone line.

    No voip needed, no outbound calls needed.

    Is this possible? Right now I accomplish this using dahdi on ubuntu 12.10 with a Digium PCI card.

    Thanks, this is fun stuff!

  17. mjam239 says:

    Curious the size of SD card recommended if you want to utilize voice mail on the Raspi? Can you select the folders where the voice mail is stored and put that on a external USB drive?

  18. Andrew says:

    I am working on developing both FXS and FXO modules for RPi. If anyone has some interest email me!.

  19. Gary Evans says:

    Also interested! What is your email?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,459 other followers