5

I am trying to use a Raspberry Pi as a VoIP phone. Sadly the USB bug causes a very bad audio quality if I use an external usb soundcard. I tried to set the usb to 1.1 only and to reduce the sample rate to 8khz, but still have too much glitches etc. My current DAC is an TI PCM2912 (other tested devices are causing the same problems).

I tried Asterisk and linphonec with OSS and ALSA, pjsua with portaudio and ALSA and Freeswitch with portaudio. Using portaudio with an ALSA device causes silence in both directions, portaudio with OSS works (with errors as described above).

Knows anybody a working trick to get a good voice quality? Maybe an asound.conf/.asoundrc with fitting values for buffer and sample rate?

  • Hi @am1337, were you able to make it work? – Arnold Roa Oct 26 '16 at 21:33
  • Hi Arnold, not with USB, but with I2C. I tried several codecs. The WM8731 works in both directions. It took a while as there was a bug in the dma module and the channels swapped every few seconds (you don't hear it when listening to music using both channels). When we finished the project there was still the issue that not all frequencies where working, so we had to resample the VoIP-streams with ALSA. – am1337 Dec 8 '16 at 8:24
2

What I would suggest is to use an IP Phone instead. It may save you the whole sound problem headache but I hope you will see the benefits. This would mean installing Asterisk on your Raspberry Pi and resigning from using the Pi as a VoiP "IP" Phone.

Also, having an IP Phone means you can directly connect the IP Phone to your VoiP provider defeating the purpose you have in mind. You can get fairly cheap IP Phones that run off LAN or WiFi.

enter image description here

The upside of installing Asterisk on your Pi means you can make your own private telephone exchange. THis means you could use VoiP client on your smartphone, have several phones in the house connect to the Pi over LAN - All of which can be accessible by dialing an extension number like. 100, 10 or any custom code you like.

With a bit of configuring you can even install IP Phones at your moms house, you relatives that life in another country or have your friends connect to your Asterisk system. They will all be able to call each other and yourself for free, provided they are connected to the internet. Even 3G calls are supported using the GSM codec. (Other codecs are also available)

You might have several VoiP providers that offer various prices or even free calls. You can then set up rules that choose least cost routes for normal telco/mobile numbers.

I would suggest installing FreePBX GUI on top of Asterisk as it really makes configuring asterisk much easier!

uElasitx is a nice image dedicated for Raspberry that has a nice GUI to help your configure everything.

You can also get RasPBX installer or image

I use voipcheap as my VoiP provider. Really great speeds, free calls with top ups and must be one of the cheapest out there.

I am in no way affiliated with any product or service. I use them or tested them and find them to be very effective.

  • 2
    Hi ppumkin, I want to use the Raspberry as an VoIP phone, not connecting one. – am1337 Aug 26 '13 at 6:51
  • Yea I understand. But like my first sentace says - you might have allot of problems and this is an alternative. possbily someobyd will have a better answer soon – Piotr Kula Aug 27 '13 at 8:02
  • 1
    Hi ppumkin,thanks for your details answer, it is 100% correct, but I need to use a raspberry as phone. I ordered some I2S sound chips. I hope they will work. I will post an answer if this is a solution. – am1337 Aug 27 '13 at 10:59
1

Best way to get a working audio input seems to be using an I2S codec. I had success using WM8731. See http://blog.koalo.de/2013/05/i2s-support-for-raspberry-pi.html for more information.

1

UV4L supports two-way live Audio/Video P2P Calls from any browser, phone, tablet to Raspberry Pi 2. Jitsi Meet Web Conferences are also supported.Screenshot. Both local and remote cameras can be rendered on the screen (touch or HDMI). An USB soundcard for Audio-in. Audio-out is played through speakers. No plugin's required and just works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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