Codec issues

21 posts / 0 new
Last post
admin2all
admin2all's picture
Codec issues

Hi Folks.. I am running across an issue that I am at an impasse on and hope you can help/guide me..

I have this system almost ready to deploy except for a problem I am having with codecs - I think !!!

General info is we are running Cent OS 6 - and Asterisk 12.0 on a clean system. I have only 10 extensions and they are SNOM 320 phones.

My specific problem is when I make an outbound call to a 3rd party or an extension call to my other office ( they have their own setup like this one ) - the call goes through using g729 which is installed and registered. However, if I try to access my voicemail or conference rooms, I get dead air - no audio and a command line full of the following output..
-- Executing [*98@from-internal:1] Answer("SIP/71006-0000072e", "") in new stack
-- Executing [*98@from-internal:2] Wait("SIP/71006-0000072e", "1") in new stack
[2013-05-15 15:18:25] WARNING[10721][C-00000744]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (slin)
[2013-05-15 15:18:25] ERROR[10721][C-00000744]: channel.c:8717 ast_channel_start_silence_generator: Could not set write format to SLINEAR
-- Executing [*98@from-internal:3] NoOp("SIP/71006-0000072e", "app-dialvm: Asking for mailbox") in new stack
-- Executing [*98@from-internal:4] Read("SIP/71006-0000072e", "MAILBOX,vm-login,,,3,2") in new stack
[2013-05-15 15:18:26] WARNING[10721][C-00000744]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (gsm|ulaw)
[2013-05-15 15:18:26] WARNING[10721][C-00000744]: file.c:1014 ast_streamfile: Unable to open vm-login (format (g729)): No such file or directory
-- User disconnected
-- Executing [*98@from-internal:5] NoOp("SIP/71006-0000072e", "app-dialvm: Got Mailbox ") in new stack
-- Executing [*98@from-internal:6] Macro("SIP/71006-0000072e", "get-vmcontext,") in new stack
-- Executing [s@macro-get-vmcontext:1] Set("SIP/71006-0000072e", "VMCONTEXT=") in new stack
-- Executing [s@macro-get-vmcontext:2] GotoIf("SIP/71006-0000072e", "1?200:300") in new stack
-- Goto (macro-get-vmcontext,s,200)
-- Executing [s@macro-get-vmcontext:200] Set("SIP/71006-0000072e", "VMCONTEXT=default") in new stack
[2013-05-15 15:18:26] ERROR[10721][C-00000744]: app_voicemail.c:11953 acf_mailbox_exists: MAILBOX_EXISTS requires an argument ([@])
[2013-05-15 15:18:26] WARNING[10721][C-00000744]: func_logic.c:192 acf_if: Syntax IF(?[][:]) (expr must be non-null, and either or must be non-null)
[2013-05-15 15:18:26] WARNING[10721][C-00000744]: func_logic.c:193 acf_if: In this case, ='', ='SUCCESS', and ='FAILED'
-- Executing [*98@from-internal:7] Set("SIP/71006-0000072e", "VMBOXEXISTSSTATUS=") in new stack
-- Executing [*98@from-internal:8] GotoIf("SIP/71006-0000072e", "0?good:bad") in new stack
-- Goto (from-internal,*98,14)
-- Executing [*98@from-internal:14] NoOp("SIP/71006-0000072e", "app-dialvm: BAD mailbox @default") in new stack
-- Executing [*98@from-internal:15] Wait("SIP/71006-0000072e", "1") in new stack
[2013-05-15 15:18:26] WARNING[10721][C-00000744]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (slin)
[2013-05-15 15:18:26] ERROR[10721][C-00000744]: channel.c:8717 ast_channel_start_silence_generator: Could not set write format to SLINEAR
-- Executing [*98@from-internal:16] NoOp("SIP/71006-0000072e", "app-dialvm: Asking for password so people can't probe for existence of a mailbox") in new stack
-- Executing [*98@from-internal:17] Read("SIP/71006-0000072e", "FAKEPW,vm-password,,,3,2") in new stack
[2013-05-15 15:18:27] WARNING[10721][C-00000744]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (gsm|ulaw)
[2013-05-15 15:18:27] WARNING[10721][C-00000744]: file.c:1014 ast_streamfile: Unable to open vm-password (format (g729)): No such file or directory
-- User disconnected
-- Executing [*98@from-internal:18] NoOp("SIP/71006-0000072e", "app-dialvm: Asking for mailbox again") in new stack
-- Executing [*98@from-internal:19] Read("SIP/71006-0000072e", "MAILBOX,vm-incorrect-mailbox,,,3,2") in new stack
[2013-05-15 15:18:27] WARNING[10721][C-00000744]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (gsm|ulaw)
[2013-05-15 15:18:27] WARNING[10721][C-00000744]: file.c:1014 ast_streamfile: Unable to open vm-incorrect-mailbox (format (g729)): No such file or directory

If I change the order of the codecs in my Trunk and put the alaw/ulaw codecs ahead of the g729, then I CAN access the Voicemail and Conference rooms - BUT when I call my other office via IAX - then all I hear are clicks and noise and they CAN'T hear me!

I get similar output in my CLI - talking about codec translations etc.

How do set this up for any call - where or what should my settings be? I see codecs can be set on the phones - in the configs etc - what will work for ALL calls??

dicko
dicko's picture
G729 will only work in

G729 will only work in passthrough mode if you attempt to use more than the number of licenses you have purchased (and installed). You need one for each leg of a call that Asterisk will handle the audio on.

dicko
dicko's picture
. . . that Asterisk will

. . . that Asterisk will concurrently handle the audio on.

admin2all
admin2all's picture
g729

I'm confused. This is a new install. I only have 3 test phones hooked up to my system. There is no-one using it yet. I applied our license via the Admin GUI and I ran the g729 show licenses command. This is what I get...
0/0 encoders/decoders of 20 licensed channels are currently in use

Licenses Found:
File: G729-XXXXXXXXX.lic -- Key: G729-XXXXXXXXXX -- Host-ID: d3:25:16:e0:d3:c3:cc:84:25:c0:9d:d6:9f:c2:67:18:e7:54:38:0a -- Channels: 20 (Expires: 2032-02-19) (OK)

freepbx-voip*CLI> sip show channels
Peer User/ANR Call ID Format Hold Last Message Expiry Peer
0 active SIP dialogs

Is this telling me I have no lic available or all 20 are available.

If I have 20 good licenses on a system that is not deployed yet, how do I configured it to use these licenses.

Our present in-use system has the same number of licenses 20. Is there a method I am missing to apply the 20 I have?

dicko
dicko's picture
Then g729 is not your problem

Then g729 is not your problem, you DO have 20 available.

admin2all
admin2all's picture
g729

I don't fully understand what is supposed to happen, but when I move g729 codec down one space in the Asterisk SIP Settings I CAN make Conference room calls and CAN access Voicemail *98 but I Cannot call an extension in our other office - I hear clicks and noises but no audio. That office says the phone rang but no one was on the line!

If I move g729 back up first in the list, then I CAN call extensions but CANNOT access voicemail or conference rooms. This is the CLI output when g279 is on the top of the list...

2013-05-16 14:04:13] WARNING[2083][C-00000006]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (slin)
[2013-05-16 14:04:13] ERROR[2083][C-00000006]: channel.c:8717 ast_channel_start_silence_generator: Could not set write format to SLINEAR
-- Executing [78000@from-internal:9] Set("SIP/71006-00000000", "PINCOUNT=0") in new stack
-- Executing [78000@from-internal:10] Read("SIP/71006-00000000", "PIN,enter-conf-pin-number,,,,") in new stack
[2013-05-16 14:04:14] WARNING[2083][C-00000006]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (gsm)
[2013-05-16 14:04:14] WARNING[2083][C-00000006]: file.c:1014 ast_streamfile: Unable to open enter-conf-pin-number (format (g729)): No such file or directory
-- User disconnected
-- Executing [78000@from-internal:11] GotoIf("SIP/71006-00000000", "0?USER") in new stack
-- Executing [78000@from-internal:12] Set("SIP/71006-00000000", "PINCOUNT=1") in new stack
-- Executing [78000@from-internal:13] GotoIf("SIP/71006-00000000", "0?h") in new stack
-- Executing [78000@from-internal:14] Playback("SIP/71006-00000000", "conf-invalidpin") in new stack
[2013-05-16 14:04:14] WARNING[2083][C-00000006]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (gsm|ulaw)
[2013-05-16 14:04:14] WARNING[2083][C-00000006]: file.c:1014 ast_streamfile: Unable to open conf-invalidpin (format (g729)): No such file or directory
[2013-05-16 14:04:14] WARNING[2083][C-00000006]: app_playback.c:480 playback_exec: ast_streamfile failed on SIP/71006-00000000 for conf-invalidpin
-- Executing [78000@from-internal:15] Goto("SIP/71006-00000000", "READPIN") in new stack
-- Goto (from-internal,78000,10)
-- Executing [78000@from-internal:10] Read("SIP/71006-00000000", "PIN,enter-conf-pin-number,,,,") in new stack
[2013-05-16 14:04:14] WARNING[2083][C-00000006]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (gsm)
[2013-05-16 14:04:14] WARNING[2083][C-00000006]: file.c:1014 ast_streamfile: Unable to open enter-conf-pin-number (format (g729)): No such file or directory
-- User disconnected

To me - no expert by any means - it looks like I access the conference romm - just can't hear the audio.

I am guessing it's a config issue with the g729. But hey - that's why I am here ! Help !!

admin2all
admin2all's picture
I went through all my configs

I went through all my configs in both the Asterisk IAX and Asterisk SIP Settings- also I checked all settings in which I can Disallow and Allow codecs. I have set Disallow to ALL and Allow to g729&ulaw&alaw&gsm.

If I dial out to my Trunks the call goes through but when I dial my voicemail or conference rooms - I get line after line of this repeated code..
[2013-05-21 09:12:02] ERROR[9211][C-0000005d]: app_voicemail.c:11953 acf_mailbox_exists: MAILBOX_EXISTS requires an argument ([@])
[2013-05-21 09:12:02] WARNING[9211][C-0000005d]: func_logic.c:192 acf_if: Syntax IF(?[][:]) (expr must be non-null, and either or must be non-null)
[2013-05-21 09:12:02] WARNING[9211][C-0000005d]: func_logic.c:193 acf_if: In this case, ='', ='SUCCESS', and ='FAILED'
[2013-05-21 09:12:02] WARNING[9211][C-0000005d]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (slin)
[2013-05-21 09:12:02] ERROR[9211][C-0000005d]: channel.c:8717 ast_channel_start_silence_generator: Could not set write format to SLINEAR
[2013-05-21 09:12:03] WARNING[9211][C-0000005d]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (gsm|ulaw)
[2013-05-21 09:12:03] WARNING[9211][C-0000005d]: file.c:1014 ast_streamfile: Unable to open vm-password (format (g729)): No such file or directory
[2013-05-21 09:12:03] WARNING[9211][C-0000005d]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (gsm|ulaw)
[2013-05-21 09:12:03] WARNING[9211][C-0000005d]: file.c:1014 ast_streamfile: Unable to open vm-incorrect-mailbox (format (g729)): No such file or directory
[2013-05-21 09:12:03] ERROR[9211][C-0000005d]: app_voicemail.c:11953 acf_mailbox_exists: MAILBOX_EXISTS requires an argument ([@])
[2013-05-21 09:12:03] WARNING[9211][C-0000005d]: func_logic.c:192 acf_if: Syntax IF(?[][:]) (expr must be non-null, and either or must be non-null)
[2013-05-21 09:12:03] WARNING[9211][C-0000005d]: func_logic.c:193 acf_if: In this case, ='', ='SUCCESS', and ='FAILED'
[2013-05-21 09:12:03] WARNING[9211][C-0000005d]: channel.c:5303 set_format: Unable to find a codec translation path from (g729) to (slin)
[2013-05-21 09:12:03] ERROR[9211][C-0000005d]: channel.c:8717 ast_channel_start_silence_generator: Could not set write format to SLINEAR

If I move the G729 codecs down in the order - then I can get my voicemail and conference rooms - BUT when I dial my IAX extensions - I hear the ring - and then just clicking noises etc - the person I called says her phone did ring but could not hear me.

Our phones are SNOM 320's - they all work fine on our older Asterisk 1.8 system I am trying to replace. The phones are set up to use g729&ulaw&alaw&gsm

I do have 20 licenses and they are all available. If this is not a Codec issue as its suggested here, can someone provide options or give me some set up help?

Thank you.

admin2all
admin2all's picture
Codec Issue

I was hoping someone could say whether or not this is a codec issue or is there there a configuration option somewhere I should be looking at.

It is kind of odd to me that the order of the codecs changes the system's behavior and I am hopeful there is a "fix"

SkykingOH
SkykingOH's picture
If you change the order of

If you change the order of the CODEC's you are changing the used CODEC so that should not be surprising.

The g.729 is a Digium product, they support it. From my experience it just "works", never had any issues.

You sure you used the right one? It's CPU dependent.

Why do you have so many CODEC's configured? If you paid for g.729 one would think you would want to use it.

admin2all
admin2all's picture
Codec Issues

Hello Skyking - I downloaded the g729 from the Admin Panel drop down - under Digium Addons. Among the Addons there was an option for the g729 codec which seemed to install fine. I applied our license and tested the system. We could make and get phone calls and see the codec being used. It was when I tried communications with our West Coast office ( also running the same VoIP software version ), that we found we could not hear each other unless the g729 codec was first in the list but if it is first in the list, then we cannot use the other features like voicemail and Conference Calls.

So I left the other codecs in the system ( ulaw - alaw - and gsm ) until we could figure out what was or was not happening but I am not clear on why we are having the issue.

I don't understand fully what the CLI output is complaining about - I see lines like this...

Unable to find a codec translation path from (g729) to (slin) and think that it's problem the system is having using codecs. But I don't know for sure.

Is there a way I can force use g729 not matter what kind of call is made - IAX, Internal, Outgoing, etc,etc.??

SkykingOH
SkykingOH's picture
You force g.729 by putting

You force g.729 by putting you dissalow=all then just allow g.729

Keep in mind that the Digium add-ons module is third party, we don't use it or know anything about it.

Do a core show translation and make sure that you have a g.729 to slin path.

admin2all
admin2all's picture
force 729

Well - this don't look good!! g729 does not even show up on a core show translation..

New-voip*CLI> core show translation
         Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

            gsm  ulaw  alaw  g726 adpcm  slin lpc10  ilbc g726aal2  g722 slin16 testlaw
      gsm     - 15000 15000 15000 15000  9000 15000 15000    15000 17250  26250   15000
     ulaw 15000     -  9150 15000 15000  9000 15000 15000    15000 17250  26250   15000
     alaw 15000  9150     - 15000 15000  9000 15000 15000    15000 17250  26250   15000
     g726 15000 15000 15000     - 15000  9000 15000 15000    15000 17250  26250   15000
    adpcm 15000 15000 15000 15000     -  9000 15000 15000    15000 17250  26250   15000
     slin  6000  6000  6000  6000  6000     -  6000  6000     6000  8250  17250    6000
    lpc10 15000 15000 15000 15000 15000  9000     - 15000    15000 17250  26250   15000
     ilbc 15000 15000 15000 15000 15000  9000 15000     -    15000 17250  26250   15000
 g726aal2 15000 15000 15000 15000 15000  9000 15000 15000        - 17250  26250   15000
     g722 15600 15600 15600 15600 15600  9600 15600 15600    15600     -   9000   15600
   slin16 21600 21600 21600 21600 21600 15600 21600 21600    21600  6000      -   21600
  testlaw 15000 15000 15000 15000 15000  9000 15000 15000    15000 17250  26250       -

I downloaded the Digium Addon the way I did -- because it seemed to be straight forward.
Could you provide a link? I guess I would need to uninstall it ( if it actually exists) and install using a different method.

SkykingOH
SkykingOH's picture
That is just downright odd.

That is just downright odd.

It should show up, even if not installed.

You say that g729 commands show up in CLI?

Check the startup log in /var/log/asterisk/full for g729 errors when you restart asterisk.

mustardman
mustardman's picture
The codec module is not

The codec module is not installed. Also check that permissions are 755

put it in
/usr/lib/asterisk/modules
for 64bit and if all the other asterisk modules are there it goes in
/usr/lib64/asterisk/modules

mustardman
mustardman's picture
You download it from here.

You download it from here.
http://downloads.digium.com/pub/telephony/codec_g729/

tar zxvf codecfilename.tar.gz

cp codecname.so /usr/lib/asterisk/modules

reboot or restart asterisk

admin2all
admin2all's picture
Ok - I looked in my /usr/lib

Ok - I looked in my /usr/lib/asterisk/modules dir and I do see files codec_ulaw.so ( g722, g726, etcetc ) but NO codec_g729. I also see files like format_ulaw.so etc - and there is a file called format_g729.so !!

Do I still need to download the g729 codec from that link ? or is that format_g729.so file the one I need to install?
I'm a bit confused - I thought I was working with a system that had that codec !!

mustardman29
mustardman29's picture
Yes you need to download the

Yes you need to download the codec separately because of the licensing. All the info is in the readme at that link I included above.

The codec settings in the Asterisk SIP settings module just enables or disables them globally. It does not check if the codec actually exists on the system. It probably should and not show it as an option if it doesn't exist on the system.

admin2all
admin2all's picture
Codec Issue

I did the download and untarred the codec to modukles dir. I'm now following the README and am at the Enter License Key ! I trying to retrieve the key from the server - but not finding where it is stored - if at all.

I know we have purchased 20 licenses which is more than enough for us. I even entered that key in the GUI on the server !!

What is happening here is very odd in my opinion but I need to find that key so I can follow through.

SkykingOH
SkykingOH's picture
You can get the key from your

You can get the key from your account at Digium site.

admin2all
admin2all's picture
Codec

OK - thank you for that info. I will contact them.

admin2all
admin2all's picture
Codecs

Hi all - I got my License Key for the g729 codec and applied it. I can now see the codec list in g729 show translation and I can now make extensions calls and access our voicemail/conference room features!

I can now continue with our deployment of this system.

Thank you all for your patience and support !!