[asterisk-users] Understanding Codecs

Adrian Marsh Adrian.Marsh at ubiquisys.com
Thu May 7 04:27:44 CDT 2009


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-bounces at lists.digium.com
[mailto:asterisk-users-bounces at 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    -   -    2    2        2     2    1     3    -     -   11
2    -  45

     ulaw    -   2    -    1        2     2    1     3    -     -   11
2    -  45

     alaw    -   2    1    -        2     2    1     3    -     -   11
2    -  45

 g726aal2    -   2    2    2        -     2    1     3    -     -   11
1    -  45

    adpcm    -   2    2    2        2     -    1     3    -     -   11
2    -  45

     slin    -   1    1    1        1     1    -     2    -     -   10
1    -  44

    lpc10    -   2    2    2        2     2    1     -    -     -   11
2    -  45

     g729    -   -    -    -        -     -    -     -    -     -    -
-    -   -

    speex    -   -    -    -        -     -    -     -    -     -    -
-    -   -

     ilbc    -   2    2    2        2     2    1     3    -     -    -
2    -  45

     g726    -   2    2    2        1     2    1     3    -     -   11
-    -  45

     g722    -   -    -    -        -     -    -     -    -     -    -
-    -   -

      amr    -  13   13   13       13    13   12    14    -     -   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    -   -    2    2        2     2    1     2    -     -   11
2    -   -

     ulaw    -   2    -    1        2     2    1     2    -     -   11
2    -   -

     alaw    -   2    1    -        2     2    1     2    -     -   11
2    -   -

 g726aal2    -   2    2    2        -     2    1     2    -     -   11
1    -   -

    adpcm    -   2    2    2        2     -    1     2    -     -   11
2    -   -

     slin    -   1    1    1        1     1    -     1    -     -   10
1    -   -

    lpc10    -   2    2    2        2     2    1     -    -     -   11
2    -   -

     g729    -   -    -    -        -     -    -     -    -     -    -
-    -   -

    speex    -   -    -    -        -     -    -     -    -     -    -
-    -   -

     ilbc    -   2    2    2        2     2    1     2    -     -    -
2    -   -

     g726    -   2    2    2        1     2    1     2    -     -   11
-    -   -

     g722    -   -    -    -        -     -    -     -    -     -    -
-    -   -

      amr    -   -    -    -        -     -    -     -    -     -    -
-    -   -

 

So where are the codec translations set?

 

Thanks

 

Adrian

 

________________________________

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at 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-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Adrian
Marsh
Sent: 06 May 2009 17:53
To: asterisk-users at 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)  audio        amr   (AMR)

 

 

But I cant see why its not transcoding across to ulaw/alaw.

 

Thanks,

 

Adrian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090507/c447fa10/attachment.htm 


More information about the asterisk-users mailing list