Re: [asterisk-users] Understanding Codecs
I got very excited when I read the title of this email - I was hoping someone had learnt to speak g729. Ah well. PaulH Adrian Marsh wrote: Hi, I’m having problems with an asterisk server that’s not offering Codecs for ulaw and alaw as it should. I’ve three servers in total: a1, a2 and “b” A1 and A2 have pretty much the same config files, except IP address info changes Server B is configured to accept all inbound invites. Calls from A1 to B, all work fine, and in a sip debug session I can see A1 is offering codecs: [May 6 16:43:19] WARNING[25404]: channel.c:720 ast_best_codec: Don't know any of 0x4000 formats Audio is at IP HIDDEN port 14958 Adding codec 0x2000 (amr) to SDP *Adding codec 0x4 (ulaw) to SDP* *Adding codec 0x8 (alaw) to SDP* Adding non-codec 0x1 (telephone-event) to SDP But when A2 makes the same call to B, it only offers amr: [May 6 16:38:44] WARNING[20408]: channel.c:720 ast_best_codec: Don't know any of 0x4000 formats Audio is at IP HIDDEN port 15554 Adding codec 0x2000 (amr) to SDP Adding non-codec 0x1 (telephone-event) to SDP Its not building ulaw or alaw into its list. Server B doesn’t support AMR, so rejects the call. (I’ve no idea about the 0x4000 error – but I see it on both the good and bad servers, so I don’t think its related). The odd thing is that the sip.conf files for A1 and A2 are exactly the same (save IP info). The build of the Asterisk server is from a 1.4.15 private build to add AMR, but, it’s the same source built on both A1 and A2. I’m trying to figure out why A2 isnt offering ulaw and alaw. The codec seems ok, and is listed in the show codecs: 4 (1 2) (0x4) audio ulaw (G.711 u-law) 8 (1 3) (0x8) audio alaw (G.711 A-law) 8192 (1 13) (0x2000) audio amr (AMR) But I cant see why its not transcoding across to ulaw/alaw. Thanks, Adrian ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Understanding Codecs
All, I think we've found what was blocking us. It seems that SElinux, for some unknown reason, didn't like the AMR codec, and did something to block it. Set that to passive, and the problem goes away... Would still like to learn more about asterisk codec translation though, if anyone has any pointers. Adrian From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Adrian Marsh Sent: 07 May 2009 09:33 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Understanding Codecs Hi All, My theory on the codec translation deepens: Doing a core show translation on the A1 server (working) I get: g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 amr g723- ---- -- -- -- -- - gsm- -222 21 3- - 11 2- 45 ulaw- 2-12 21 3- - 11 2- 45 alaw- 21-2 21 3- - 11 2- 45 g726aal2- 222- 21 3- - 11 1- 45 adpcm- 2222 -1 3- - 11 2- 45 slin- 1111 1- 2- - 10 1- 44 lpc10- 2222 21 -- - 11 2- 45 g729- ---- -- -- -- -- - speex- ---- -- -- -- -- - ilbc- 2222 21 3- -- 2- 45 g726- 2221 21 3- - 11 -- 45 g722- ---- -- -- -- -- - amr- 13 13 13 1313 1214- - 22 13- - But on the new server it gives: g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 amr g723- ---- -- -- -- -- - gsm- -222 21 2- - 11 2- - ulaw- 2-12 21 2- - 11 2- - alaw- 21-2 21 2- - 11 2- - g726aal2- 222- 21 2- - 11 1- - adpcm- 2222 -1 2- - 11 2- - slin- 1111 1- 1- - 10 1- - lpc10- 2222 21 -- - 11 2- - g729- ---- -- -- -- -- - speex- ---- -- -- -- -- - ilbc- 2222 21 2- -- 2- - g726- 2221 21 2- - 11 -- - g722- ---- -- -- -- -- - amr- ---- -- -- -- -- - So where are the codec translations set? Thanks Adrian From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Adrian Marsh Sent: 06 May 2009 18:00 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Understanding Codecs Forgot to add: sip.conf for both A1 and A2 has the following global codec definitions: disallow=all allow=clear allow=amr allow=ulaw allow=alaw The Asterisk build is a private build that adds the clear and AMR codec setups. The two servers are running Fedora, though A1s on 6 and A2s on 10. I cant see why that would make a difference though. From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Adrian Marsh Sent: 06 May 2009 17:53 To: asterisk-users@lists.digium.com Subject: [asterisk-users] Understanding Codecs Hi, I'm having problems with an asterisk server that's not offering Codecs for ulaw and alaw as it should. I've three servers in total: a1, a2 and b A1 and A2 have pretty much the same config files, except IP address info changes Server B is configured to accept all inbound invites. Calls from A1 to B, all work fine, and in a sip debug session I can see A1 is offering codecs: [May 6 16:43:19] WARNING[25404]: channel.c:720 ast_best_codec: Don't know any of 0x4000 formats Audio is at IP HIDDEN port 14958 Adding codec 0x2000 (amr) to SDP Adding codec 0x4 (ulaw) to SDP Adding codec 0x8 (alaw) to SDP Adding non-codec 0x1 (telephone-event) to SDP But when A2 makes the same call
Re: [asterisk-users] Understanding Codecs
Ah... ok thanks for that. In the end it was an SElinux problem. But I was curious as to if I was missing some config somewhere. This clears that up. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tilghman Lesher Sent: 07 May 2009 15:23 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Understanding Codecs On Thursday 07 May 2009 03:33:14 Adrian Marsh wrote: So where are the codec translations set? I assume you're talking about the numbers within the table? They're calculated at runtime, based upon shortest possible path (in terms of time) from one codec to another. Most codecs translate only to signed linear audio, so the translation table tends to be rather simple. Ulaw to alaw is a simple table lookup, which is why it tends to be very fast. -- Tilghman ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Understanding Codecs
Hi All, My theory on the codec translation deepens: Doing a core show translation on the A1 server (working) I get: g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 amr g723- ---- -- -- -- -- - gsm- -222 21 3- - 11 2- 45 ulaw- 2-12 21 3- - 11 2- 45 alaw- 21-2 21 3- - 11 2- 45 g726aal2- 222- 21 3- - 11 1- 45 adpcm- 2222 -1 3- - 11 2- 45 slin- 1111 1- 2- - 10 1- 44 lpc10- 2222 21 -- - 11 2- 45 g729- ---- -- -- -- -- - speex- ---- -- -- -- -- - ilbc- 2222 21 3- -- 2- 45 g726- 2221 21 3- - 11 -- 45 g722- ---- -- -- -- -- - amr- 13 13 13 1313 1214- - 22 13- - But on the new server it gives: g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 amr g723- ---- -- -- -- -- - gsm- -222 21 2- - 11 2- - ulaw- 2-12 21 2- - 11 2- - alaw- 21-2 21 2- - 11 2- - g726aal2- 222- 21 2- - 11 1- - adpcm- 2222 -1 2- - 11 2- - slin- 1111 1- 1- - 10 1- - lpc10- 2222 21 -- - 11 2- - g729- ---- -- -- -- -- - speex- ---- -- -- -- -- - ilbc- 2222 21 2- -- 2- - g726- 2221 21 2- - 11 -- - g722- ---- -- -- -- -- - amr- ---- -- -- -- -- - So where are the codec translations set? Thanks Adrian From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Adrian Marsh Sent: 06 May 2009 18:00 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Understanding Codecs Forgot to add: sip.conf for both A1 and A2 has the following global codec definitions: disallow=all allow=clear allow=amr allow=ulaw allow=alaw The Asterisk build is a private build that adds the clear and AMR codec setups. The two servers are running Fedora, though A1s on 6 and A2s on 10. I cant see why that would make a difference though. From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Adrian Marsh Sent: 06 May 2009 17:53 To: asterisk-users@lists.digium.com Subject: [asterisk-users] Understanding Codecs Hi, I'm having problems with an asterisk server that's not offering Codecs for ulaw and alaw as it should. I've three servers in total: a1, a2 and b A1 and A2 have pretty much the same config files, except IP address info changes Server B is configured to accept all inbound invites. Calls from A1 to B, all work fine, and in a sip debug session I can see A1 is offering codecs: [May 6 16:43:19] WARNING[25404]: channel.c:720 ast_best_codec: Don't know any of 0x4000 formats Audio is at IP HIDDEN port 14958 Adding codec 0x2000 (amr) to SDP Adding codec 0x4 (ulaw) to SDP Adding codec 0x8 (alaw) to SDP Adding non-codec 0x1 (telephone-event) to SDP But when A2 makes the same call to B, it only offers amr: [May 6 16:38:44] WARNING[20408]: channel.c:720 ast_best_codec: Don't know any of 0x4000 formats Audio is at IP HIDDEN port 15554 Adding codec 0x2000 (amr) to SDP Adding non-codec 0x1 (telephone-event) to SDP Its not building ulaw or alaw into its list. Server B doesn't support AMR, so rejects the call. (I've no idea about the 0x4000 error - but I see it on both the good and bad servers, so I don't think its related). The odd thing is that the sip.conf files for A1 and A2 are exactly the same (save IP info). The build of the Asterisk server is from a 1.4.15 private build
Re: [asterisk-users] Understanding Codecs
On Thursday 07 May 2009 03:33:14 Adrian Marsh wrote: So where are the codec translations set? I assume you're talking about the numbers within the table? They're calculated at runtime, based upon shortest possible path (in terms of time) from one codec to another. Most codecs translate only to signed linear audio, so the translation table tends to be rather simple. Ulaw to alaw is a simple table lookup, which is why it tends to be very fast. -- Tilghman ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Understanding Codecs
Forgot to add: sip.conf for both A1 and A2 has the following global codec definitions: disallow=all allow=clear allow=amr allow=ulaw allow=alaw The Asterisk build is a private build that adds the clear and AMR codec setups. The two servers are running Fedora, though A1s on 6 and A2s on 10. I cant see why that would make a difference though. From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Adrian Marsh Sent: 06 May 2009 17:53 To: asterisk-users@lists.digium.com Subject: [asterisk-users] Understanding Codecs Hi, I'm having problems with an asterisk server that's not offering Codecs for ulaw and alaw as it should. I've three servers in total: a1, a2 and b A1 and A2 have pretty much the same config files, except IP address info changes Server B is configured to accept all inbound invites. Calls from A1 to B, all work fine, and in a sip debug session I can see A1 is offering codecs: [May 6 16:43:19] WARNING[25404]: channel.c:720 ast_best_codec: Don't know any of 0x4000 formats Audio is at IP HIDDEN port 14958 Adding codec 0x2000 (amr) to SDP Adding codec 0x4 (ulaw) to SDP Adding codec 0x8 (alaw) to SDP Adding non-codec 0x1 (telephone-event) to SDP But when A2 makes the same call to B, it only offers amr: [May 6 16:38:44] WARNING[20408]: channel.c:720 ast_best_codec: Don't know any of 0x4000 formats Audio is at IP HIDDEN port 15554 Adding codec 0x2000 (amr) to SDP Adding non-codec 0x1 (telephone-event) to SDP Its not building ulaw or alaw into its list. Server B doesn't support AMR, so rejects the call. (I've no idea about the 0x4000 error - but I see it on both the good and bad servers, so I don't think its related). The odd thing is that the sip.conf files for A1 and A2 are exactly the same (save IP info). The build of the Asterisk server is from a 1.4.15 private build to add AMR, but, it's the same source built on both A1 and A2. I'm trying to figure out why A2 isnt offering ulaw and alaw. The codec seems ok, and is listed in the show codecs: 4 (1 2) (0x4) audio ulaw (G.711 u-law) 8 (1 3) (0x8) audio alaw (G.711 A-law) 8192 (1 13) (0x2000) audioamr (AMR) But I cant see why its not transcoding across to ulaw/alaw. Thanks, Adrian ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users