0

I want to make a VoIP ATA (Analog Telephone Adapter) Device using Raspberry Pi, furthermore, I also want to add FXS ports to the Raspberry Pi. Kindly, tell me whether it is possible or not. If Yes, then how?

Here is the Reference Link

Gene Vincent
  • 5,237
  • 9
  • 50
  • 86
Ammar Ashraf
  • 61
  • 3
  • 10

1 Answers1

1

This is probably possible, but not with the Pi alone.

You will need to design and build some external circuitry to convert between telephone line audio (which apparently runs at 48 volts) and audio signals which the Pi can produce. Also it looks like the Pi has no audio input, so you might need to either add a USB audio device or use an analog to digital converter that the Pi has to read the audio signal coming in from the phone line, if it can be polled fast enough.

You might have better luck with a board that has a real microphone jack on it already, instead of the Pi.

Then on the software side you need to attach the audio out, whatever you are using to get audio in, and any circuitry you need to open/close the circuit or send special ring voltages to your VoIP software of choice. Working out how to write that driver code is going to depend heavily on what physical circuit you actually build and what VoIP software you want to have talk to it.

That link above has a design for a line-level audio to phone audio conversion circuit which may help you get started. You could also take the circuitry part of the project over to the Electrical Engineering StackExchange site.

turtle
  • 417
  • 3
  • 11
interfect
  • 2,665
  • 1
  • 20
  • 35
  • Is there any development kit/board that performs this function along with Raspberry Pi? – Ammar Ashraf Oct 05 '18 at 20:48
  • I don't want to go into any complexity just want to attach modules wih little coding. – Ammar Ashraf Oct 05 '18 at 20:49
  • It looks like most people buy standalone ATA devices that talk over the network to PBX software like Asterisk. The USB solutions look to be giant port arrays like https://xorcom.com/product/usb-voip-gateway/ and single-port adapters specifically for Skype like https://www.amazon.com/USRobotics-USB-Telephone-Adapter-NAM/dp/B000F2FIH8. I suspect that neither of these kinds of things has a simple, ready-made Python API. You could talk to them with PyUSB, but you'd have to figure out what protocol the device wants to speak and speak it. – interfect Oct 05 '18 at 22:30
  • If you can get ahold of one of the USB ATA devices (or entire phones) supported by the "yealink" driver that is part of the Linux kernel, such as the "USB-B2K", it will show up as a sound card and you can maybe control the phone that way: https://www.kernel.org/doc/html/v4.15/input/devices/yealink.html#sound-features I'm not sure how you would ring it, though, and you'd need to do your own DTMF decoding. – interfect Oct 05 '18 at 22:43