Active Topics

 


Reply
Thread Tools
Posts: 9 | Thanked: 1 time | Joined on Jan 2010
#1
dear everyone,

I am trying to make a sip call over a 3G network through an asterisk server to another phone. now everyone know that the bandwidth available to mobile wireless users isn't always .. optimal .. so I would very much like to use another codec than 'alaw' or 'ulaw'.

can anyone help ?

more info below:

I have an n900, an asterisk SIP server, and a cisco hardphone. everything works perfectly fine over wifi. the calls get set up in 'alaw' 64kbit audio streams, which my wifi can handle flawlessly.

However, when calling over 3G, the audio gets choppy beyond being usable. I would therefor like to use another codec on the n900 side.

according to asterisk, the n900 announces that it is capable of 'alaw', 'ulaw' and 'ilbc' .. a64kbit, 64kbit and 15kbit audioformat respectively.

according to asterisk and cisco, the hardphone is capable of 'alaw', 'ulaw' and 'g729', which ar 64kbit, 64kbit and 8kbit respectively. g729 is a proprietary format, and asterisk cannot 'convert' audio into that format out of the box unless you have appropriate licenses. It can however just pass the audio along.

So .. if the n900 could just send out g729, all would be well...

On the other hand, the n900 can send out 'ilbc' audio .. at 15kbit .. so wouldn't it be wonderful if asterisk can convert 'ilbc' to another format? I am stumped however, to make that possible.

Can anyone help ?
 
Posts: 1,096 | Thanked: 760 times | Joined on Dec 2008
#2
i think the n900 has g729 somewhere. I am pretty sure my n810 did at least...
 
Posts: 1,096 | Thanked: 760 times | Joined on Dec 2008
#3
If you have control of the asterisk box, try adding disallow all and allow g729 to the extensions you wanna connect
 
Posts: 9 | Thanked: 1 time | Joined on Jan 2010
#4
I have control over the asterisk box, and allowing g729 doesn't work. I tried. Ohh, I tried ...

But .. while typing my original post above, I came to the conclusion that I tried to compile speex into before, and that didn't work, and therefore didn't even attempt installing the ilbc codec.

however, after installing the ilbc codec, and restricting the n900 client to ilbc only, finally asterisk can convert between ilbc and alaw.

I do wonder though, what the exact audio codec capabilites are of the sofia-sip stack on the n900.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#5
Originally Posted by drmaemo View Post
I have control over the asterisk box, and allowing g729 doesn't work. I tried. Ohh, I tried ...
Does your asterisk box actually have g729 support? You need to purchase that separately from Digium (who have a special $8/channel promotion until tomorrow), otherwise it only works in pass-thru mode.

I do wonder though, what the exact audio codec capabilites are of the sofia-sip stack on the n900.
G.729, iLBC, G.711 (u-law / A-law) and speex according to the SDP it sends:

Code:
m=audio 7078 RTP/AVP 18 96 8 0 101 99
a=rtpmap:18 G729/8000
a=rtpmap:96 ILBC/8000
a=fmtp:96 mode=30
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 speex/8000
a=rtpmap:99 telephone-event/8000
a=fmtp:99 events=0-15
Note that speex currently doesn't work out of the box, see bug 8609 for the details.
 
Posts: 9 | Thanked: 1 time | Joined on Jan 2010
#6
thanks for the info! I did a 'sip set debug on' while connecting a call, to find out the capabilities of the n900, and I didn't get speex or g729.

I do now undersatand why speex does not work (yet).

However, if 2 peers or friends of asterisk can talk g729, they can interact directly without asterisk having to re-encode the audio stream. And therefore, no codec is needed.

Anyway, at the moment I'm quite happy with the ilbc codec. Latency however is still an issue over 3G or 3.5G even. Sometimes the lag is almost nonexistent, sometimes it is almost 5 seconds.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#7
Originally Posted by drmaemo View Post
thanks for the info! I did a 'sip set debug on' while connecting a call, to find out the capabilities of the n900, and I didn't get speex or g729.

I do now undersatand why speex does not work (yet).
The gist of the aforementioned bug is that you can get it working by installing gstreamer0.10-plugins-good-extra. G.729 should be working anyway, but it's been so long since I reflashed that I can't be 100% sure.

However, if 2 peers or friends of asterisk can talk g729, they can interact directly without asterisk having to re-encode the audio stream.
Yeah, that's what I referred to as "pass-thru mode". For a device like the N900 (which is likely to be "remote" and behind NAT at least some of the time) you probably want nat=yes / canreinvite=no in sip.conf, which kinda ruins that. Also, calls to PSTN destinations or asterisk applications (eg voicemail) won't work with G.729 unless the codec is installed on the asterisk side.
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:04.