OpenWrt Forum Archive

Topic: Searching for a SIP softphone client

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi everybody!

I'am searching for a sip client softphone for my ASUS router. Beacuse i add a soundcard on the usb port with headset on my ASUS and i will make phonecalls (with my router).

Is there an IPKG package for installing an SIP client softphone (so that i can calling with this headset and with the commandline from SSH)?

For example an ipkg version of linphone,ohphone or someting that i can use from the commandline prompt!

(Last edited by jongerenchaos on 22 Jan 2006, 15:52)

Is it possible to use asterisk for this with the oss.conf & chan_oss.so module? So that i can use the soundcard in and out for calling?

If it is possible is there already a compiled version with the chan_oss.so module in it??

This works! I compile the asterisk version with chan_oss.so and i get sound!

But there is one problem, the sound is very slow and a lot of jitter. The problem is the soundcard is made for 44100 hz  & 48000 hz, and the oss program channel ask for 8000hz.

Is there a solution so that i can get the soundcard to 8000hz or the asterisk oss channel to 44100/48000hz?

(--------Logread -f from the USB soundcard!--------------------

Jan  1 00:16:09 (none) kern.info kernel: usb.c: USB disconnect on device 01:02.0-1 address 3
Jan  1 00:16:09 (none) kern.info kernel: usbaudio: unregister dsp 14,3
Jan  1 00:16:09 (none) kern.info kernel: usbaudio: unregister mixer 14,0
Jan  1 00:16:09 (none) kern.info kernel: usbaudio: unregister mixer 14,16
Jan  1 00:16:12 (none) kern.info kernel: hub.c: new USB device 01:02.0-1, assigned address 4
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: device 4 audiocontrol interface 0 has 1 input and 1 output AudioStreaming interfaces
Jan  1 00:16:12 (none) kern.err kernel: usbaudio: device 4 interface 2 altsetting 1 channels 1 framesize 2 configured
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: valid input sample rate 48000
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: valid input sample rate 44100
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: device 4 interface 2 altsetting 1: format 0x00000010 sratelo 44100 sratehi 48000 attributes 0x01
Jan  1 00:16:12 (none) kern.err kernel: usbaudio: device 4 interface 1 altsetting 0 does not have an endpoint
Jan  1 00:16:12 (none) kern.err kernel: usbaudio: device 4 interface 1 altsetting 1 channels 2 framesize 2 configured
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: valid output sample rate 48000
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: valid output sample rate 44100
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: device 4 interface 1 altsetting 1: format 0x01000010 sratelo 44100 sratehi 48000 attributes 0x01
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: registered dsp 14,3
Jan  1 00:16:12 (none) kern.debug kernel: usbaudio: constructing mixer for Terminal 6 type 0x0301
Jan  1 00:16:12 (none) kern.warn kernel: usbaudio: warning: found 1 of 2 logical channels.
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: assuming that a stereo channel connected directly to a mixer is missing in search (got Labtec headset?). Should be fine.
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: registered mixer 14,0
Jan  1 00:16:12 (none) kern.debug kernel: usbaudio: constructing mixer for Terminal 7 type 0x0101
Jan  1 00:16:12 (none) kern.info kernel: usbaudio: registered mixer 14,16
Jan  1 00:16:12 (none) kern.debug kernel: usb_audio_parsecontrol: usb_audio_state at 811934c0)

(Last edited by jongerenchaos on 29 Jan 2006, 14:25)

you are limited to 8000hz because that is what frequency range the phone system was designed for. The PSTN was designed using the codec PCMu aka uLaw aka G.711u. Quoting from O'Reillys "Asterisk - The Future of Telephony":

The purpose of the Public Switched Telephone Network (PSTN) is to establish and maintain audio connections between two endpoints. Although humans can perceive sound vibrations in the range of 20–20,000 Hz,† most of the sounds we make when speaking tend to be in the range of 250–3,000 Hz. Since the purpose of the telephone network is to transmit the sounds of people speaking, it was designed with a bandwidth of somewhere in the range of 300–3,500 Hz. This limited bandwidth means that some sound quality will be lost (as anyone who’s had to listen to music on hold can attest to), especially in the higher frequencies.

<.. cut examples of pcm encoding with illustrations .. >

In essence, what this means is that to accurately encode an analog signal you have to sample it twice as often as the total bandwidth you wish to reproduce. Since the telephone network will not carry frequencies below 300 Hz and above 4,000 Hz, a sampling frequency of 8,000 samples per second will be sufficient to reproduce any frequency within the bandwidth of an analog telephone. Keep that 8,000 samples per second in mind; we’re going to talk about it more later.

So you are committed to 8khz sample rates on asterisk because that is what has to be handed off to the PSTN and is the nature of all the VoIP codec's out there. What codec are you using? If you are encoding in one codec but communicating with your PSTN or SIP/IAX peer in another codec then Asterisk has to handle the coding/decoding between the two. These broadcom devices simply dont have enough juice for that. See if restricting your codec to pure uLaw will help you out.

First thanks for the fast response!

I use currently the Ulaw/Alaw G.711 uncompressed codec with the OSS module. And this not work (very slow voice but no high processor load). I know that asterisk can encoding for example from Ulaw to GSM data. I'll use the installed version in combination with a asterisk on a dataserver.
(usb soundcard with headset connected to <-> asterisk on ASUS router <-> asterisk on linux system in datacentre (pentium4) <-> sip client).

If it is possible i will translate this 44100hz to 8000hz on the linux asterisk system in the datacenter is there a solution for it? And which codec can i use for this if it is possible?

(Last edited by jongerenchaos on 29 Jan 2006, 21:13)

i think the problem is it is having to encode analog (your voice) into a codec. This is quite a tax on a 233mhz machine that does 1 instruction per clock cycle, in my opinion. Try using a sip soft phone on a workstation and connect to the asus router w/ the softphone. This will make handling the coding the job of your PC (probably 1ghz or higher p3 or p4). If the codec comes into your asus as G711u and goes out to the other asterisk server as G711u then the actual load on the asus is quite minimal. It essentially justs switches the traffic.

Hello, i need to port any softphone (SIP) like linphone in my mips Openwrt platform. I have had a lot of problems compiling linphone, with no succeed!....did you asterisk as voip client?!......do you know some package that can be a ip voice client (SIP softphone)??

The discussion might have continued from here.