I'd love to run Asterisk on my Raspberry Pi. Does anyone know how I could connect to the telephone network?

Obviously, PCI based cards aren't going to work.

  • Maybe something like this? xmodus.ch/sm_pstn.html
    – user13
    Aug 10, 2012 at 21:46
  • I searching for the same solution But I want to tell you that the USBfxo will not work with the pi because it not support with ARM processor of the pi. I got this answer from sangoma support after a lot of tries. I hope to find solution.
    – user5816
    Feb 3, 2013 at 10:52

10 Answers 10


Assuming you can get Asterisk rolling, I'd probably go for one of the ethernet connected FXO boxes. Many companies make them. Here's an example:

Official Grandstream web site with details

enter image description here

  • I found that one for about USD250- That is a good price for 8 port FXO and has nice features... but not really the ideal thing to use at home? :) Besides, grandstream in my opinion has really bad software design. It is slow, buggy and not properly translated form Chinese to English.
    – Piotr Kula
    Jan 31, 2013 at 9:48
  • this is a simple and production working solution for us! This is a good small office solution since this is relatively cheap !
    – jeorfevre
    Mar 16, 2017 at 12:49

You probably want a device like this one:

(source: sangoma.com)

This is a USB to FXO device that runs right from bus power and consumes only 200ma.

I've used them before. They work well with most linux distros, are about the same size as your PI, and are cheaper than most of the ethernet-fxo bridges you will find. The last time I bought one, I think it was about $130.

  • That is much more expensive than the more feature packed Linksys PAP2 What is the USB for anyway? Oh you have to pipe UDP data via usb and a a computer. That and the price AND the lack of Arm support just makes this a bad answer :(
    – Piotr Kula
    Jan 31, 2013 at 9:35
  • 1
    @ppumkin the device you mention only does FXS ("transforms" your analog phone to voip) while you need FXO to connect to POTS (what you'd need to have asterisk connect to your land line)... You'd need something like a cisco SPA3102 So Jon's answer was a valid ansewr to the OP's question.
    – Mathieu
    May 8, 2015 at 19:16
  • Yea. This was a long time ago. I realise my mistake now and Agree the SPA3102 is the correct suggestion. I bought one a while after this comment and use it till today. It is great. Oh wait a minute... scroll down :) hehehe
    – Piotr Kula
    May 8, 2015 at 19:19

Click image to find out more about uElastix.

enter image description here

After you have set it up the way you love you can consider one of these amazing devices from linksys/cisco. (That wont cost you hundreds and hundreds!)

Linksys PAP2

enter image description here

A really really cheap solution to enable your existing home phones to use VoiP instead- If you want to recieve phone calls on your existing number, you can buy a cheap DID for voip and then redirect all incoming land line calls to your VoIP DID. Sorted

  • Cost about £25 from eBay

Linksys SPA2102

enter image description here

This is a step higher and can act as a repalcement router but does not have to. It jsut has the facility. This model allows you to use 2 VoiP lines/channels and connect 2 phones or 1 phone and 1 fax or 2FAX's. What ever you fancy. Again you can redirect your land line to your Voip DID

  • About £40-£60 (these are not made by Cisco/Linksys anymore - So check eBay)

Linksys SPA3102

enter image description here

I currently use this one at home because it allows me to connect my existing land line and set up dial routes inside the SPA3102 to select if it should use landline, like toll free numbers(because allot of VoIP and mobile providers charge a small amount) or VoIP

  • About £60-£80 (these are not made by Cisco/Linksys anymore - so check eBay)


I searched allot for various products and all the ones mentioned fit my budget of CHEAP AND CHEERFUL! Cisco offer newer SPA's that are faster, have more FXO's and other gadets


I do not work/am not ascociated with any of those companies. I use the SPA3102 at home and I run a production server using Elastix(not Pi- A proper i5 with 8GB ram). I tried FreePBX distro and clean Asterisk- They are really difficult to customize things if you are a bit of newbie. Elastix is a nice complete package that is easy to use.

Be aware that if you are going to use and Cisco products in the UK- Buy a BT to RJ11, and a RJ11 to BT converters(even with the -UK version!). Otherwise you will scratch your head as to why there is no dial tone! Arrrrrr.


You cannot jsut connect PSTN to the Raspberry and hope that Asterisk will translate the call. Connecting PSTN to any uncertified device in most countries in the world is ILLEGAL! Tampering with TELCO phone lines can cause injury (because the TELCO line has a different impedance than you ground at home- this can cause you 110/220v shock!) and if you damage their systems because of improper use the fine is in thousands and even jail!

Just buy a cheap and cheerful FXO/PSTN gateway and run Asterisk on the Pi (it can handle a few simultaneous calls on 1.8 without transcoding) - Do not try to reinvent the wheel!

  • 1
    The Potential Difference on a PSTN (at least in the UK) is nowhere near the mains voltage. Not to mention the lack of current. Jan 31, 2013 at 9:55
  • Just FYI - If your home has some kind of dodgey grounding the impedance difference on ground between your home and that on the telco can result in the difference on ground. This could but in the hundreds of volts and the current limited by the circuit breakers on either side. Ground differential is very very dangerous and not well known about. Have a search about this as its quite dangerous. Luckily in the UK there are strict safety standards but in other parts of the world not so much
    – Piotr Kula
    Apr 6, 2020 at 11:05

Alternatively, you may want to look for a SIP provider and use a softphone instead. For that purpose, you could run ekiga on your desktop, asterisk on your Raspberry Pi, and you would be able to call out to the rest of the world.

  • Thanks for your answer; I actually wanted to use the Pi as a PSTN to SIP gateway. Aug 13, 2012 at 18:33

None of the above USB to FXO devices are known for have drivers that compile in ARM architectures. It's well know that Sangoma has always open sourced his drivers but I'm not sure if is the case for this device, anyway you should ask to Sangoma's support team before you buy one of this ones to use with your RPi.

Asterisk is able to compile and work in ARM, actually, some years ago, the very first Xorcom Appliance used to run on ARM with a 6 FXO and 2 FXS Astribank. So there are chances that this devices could work as they used if someone still maintain the code.

Anyway I'm not sure the RPi could handle more than one call so spending money on a 6FXO/2FXS device for just one call, not sure it's worth.

I really think the best option is a SIP to PSTN gateway.

  • Welcome to Raspberry Pi, nice answer!
    – Avio
    Sep 30, 2012 at 12:10
  • Yea Raspberry can handle about a handful of simultaneous calls without transcoding. If calls need to be transcoded then about 2-4 depending on what codecs you are using.
    – Piotr Kula
    Jan 31, 2013 at 9:46

search for a linksys spa3102 they are cheap and have one fxo (to pbx or tel.line) and a fxs (regular phone). there are hundred of webs tellíng you how to configure asterist and use both. Working with bigger FXOs or FXSs are very similar and will let you attend your home calls witht or without the pi on. hope this helps


simple: http://nerdvittles.com/?p=3026

setup yourself with a free sip2sip.info account and give me a call at

[email protected]

  • 2
    This would be a better answer with a bit more explanation.
    – Jivings
    Jan 31, 2013 at 8:17
  • Jivings, the article contains a lot of information that will help you out. Feb 15, 2013 at 19:11
  • 1
    Ideally it's better for answers to stand alone without links to prevent link-rot.
    – Jivings
    Feb 16, 2013 at 15:48

pstn>SIP trunk>network>raspberry pi+asterisk , many box can do that.

  • This is a good answer which cuts out hardware and can do exactly what the OP wanted. A bit short and unformatted though..
    – Piotr Kula
    May 8, 2015 at 19:22
  • 1
    How is this a good answer? The OP wanted to know which hardware to use for connecting the Raspberry to the PSTN network. So basically he was asking how to create your own SIP trunk using Raspberry. Your answer did not provide that. (More over, even assuming your solution would be considered by the OP, you said "many box can do that" but did not provide any examples.) May 29, 2017 at 10:06

Amfeltec created a USB FXO and FXS solutions: http://amfeltec.com/news-releases/


  • 1
    Can you provide further details in your answer such as: does this work with the RPi - is there software compatibility for this device? Do you have experience running this device with a RPi? Right now your post looks a bit like an advertisement for Amfeltec.
    – Phil B.
    Oct 13, 2015 at 14:02
  • Welcome to Raspberry Pi! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Oct 13, 2015 at 14:10
  • 1
    Can't add comment to @Rosti's answer, but checking amfeltec's website, found this posting, which indicates this DOES provide ARM drivers & supports Asterisk on the raspberry pi.
    – user88051
    Jun 30, 2018 at 2:12

Why don't you try just this?


RasPi is for hacking!!

  • 1
    Please provide a precise... link only answers are not helpful.
    – Andrew
    Nov 23, 2012 at 12:17
  • 1
    Connecting uncertified devies to phone lines is illegal in almost every country in the world. Causing damage to the phone line can cost you thousands in fines. Sometimes if you are unlucky it can cause serious injury! and even DEATH! VERY BAD ADVICE!
    – Piotr Kula
    Jan 31, 2013 at 9:30
  • @ppumkin This simply isn't true. Jan 31, 2013 at 9:56
  • It is what is written in many telco sites and many engineers warn about. How true it is I am not sure but I do not want to find out the hard way :)
    – Piotr Kula
    Jan 31, 2013 at 9:59
  • 3
    @ppumkin As long as nobody calls you at the moment you are trying to strip the phone wires with your teeth, you're o.k. The reason I am still around means, you easily survive when somebody does call while you're sitting with those wires in your mouth in some small space beneath some desk... But you'll remember the refreshing shock for a looooong time.. hehehe
    – ikku
    Feb 3, 2013 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.