16

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.

Alex Chamberlain
  • 15,530
  • 14
  • 67
  • 113
  • Maybe something like this? http://www.xmodus.ch/sm_pstn.html –  Aug 10 '12 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. –  Feb 03 '13 at 10:52

10 Answers10

6

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

Piotr Kula
  • 17,307
  • 6
  • 65
  • 104
Peter Loron
  • 209
  • 1
  • 3
  • 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 '13 at 09: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 '17 at 12:49
6

You probably want a device like this one:

USBfxo
(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.

Glorfindel
  • 620
  • 1
  • 8
  • 15
Jon Beckmann
  • 144
  • 1
  • 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 '13 at 09: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 08 '15 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 08 '15 at 19:19
5

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)

Others

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

Other

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.

Caution

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!

Piotr Kula
  • 17,307
  • 6
  • 65
  • 104
  • 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. – Alex Chamberlain Jan 31 '13 at 09: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 06 '20 at 11:05
2

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.

shapr
  • 389
  • 1
  • 6
2

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 '12 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 '13 at 09:46
2

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

Pablo
  • 21
  • 1
0

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

Leo
  • 1
  • 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 08 '15 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.) – Sorin Postelnicu May 29 '17 at 10:06
0

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

http://amfeltec.com/products/piranha-usb-fxo-adapter/

Rosti
  • 11
  • 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 '15 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. – Steve Robillard Oct 13 '15 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 '18 at 02:12
0

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

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

raspberry@sip2sip.info

-1

Why don't you try just this?

http://www.instructables.com/id/Phone-line-audio-interface/step9/Schematic/

RasPi is for hacking!!

  • 1
    Please provide a precise... link only answers are not helpful. – Andrew Nov 23 '12 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 '13 at 09:30
  • @ppumkin This simply isn't true. – Alex Chamberlain Jan 31 '13 at 09: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 '13 at 09:59
  • Besides even a 75Volt jolt is not pleasant! – Piotr Kula Jan 31 '13 at 10:00
  • 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 03 '13 at 13:23