FreePBX 10.13.66-12 with Asterisk 13.9.1 not Transcoding Audio

I tried to push out the G722 codec today across all of the offices I manage. Every PBX took the change okay except one. It seems this one is not transcoding audio from one codec to G722. Here are the symptoms that I was presented with.

Calls would work as they should if someone was calling in, all parties could hear each other as they should.

Outgoing calls would work okay except the internal user would be unable to hear what the external user was saying. All other audio streams worked okay.

Users could check their voicemail and hear all of the system generated prompts but, when they got to the point where they were to listen to the actual recorded voicemail, they would be presented with silence. This is what made me think the issue was with the transcoding and not a NAT issue.

I have reversed my changes and this PBX is using ulaw as the default for now but, I really want to implement G722 as it sounds so much better.

I am hoping someone here can help me diagnose this issue. I have no idea where to start. I don’t see any errors that could be related to this problem in the Asterisk logs so I don’t know where I should be looking for errors.

Thanks in advance guys.

Please post your Asterisk CLI when issues happening, so this will help to debug your problem

In the box that you have the problem run the following command

core show translation

Post here the output.

http://pastebin.com/b4F9Gtk5

Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

           ulaw  alaw   gsm  g726 g726aal2 adpcm  slin  slin  slin  slin  slin  slin  slin  slin  slin lpc10  ilbc  g722 testlaw
     ulaw     -  9150 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 17250   15000
     alaw  9150     - 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 17250   15000
      gsm 15000 15000     - 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 17250   15000
     g726 15000 15000 15000     -    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 17250   15000
 g726aal2 15000 15000 15000 15000        - 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 17250   15000
    adpcm 15000 15000 15000 15000    15000     -  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 17250   15000
     slin  6000  6000  6000  6000     6000  6000     -  8000  8000  8000  8000  8000  8000  8000  8000  6000  6000  8250    6000
     slin 14500 14500 14500 14500    14500 14500  8500     -  8000  8000  8000  8000  8000  8000  8000 14500 14500 14000   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500     -  8000  8000  8000  8000  8000  8000 14500 14500  6000   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500     -  8000  8000  8000  8000  8000 14500 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500     -  8000  8000  8000  8000 14500 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500  8500     -  8000  8000  8000 14500 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500  8500  8500     -  8000  8000 14500 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500  8500  8500  8500     -  8000 14500 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500  8500  8500  8500  8500     - 14500 14500 14500   14500
    lpc10 15000 15000 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000     - 15000 17250   15000
     ilbc 15000 15000 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000     - 17250   15000
     g722 15600 15600 15600 15600    15600 15600  9600 17500  9000 17000 17000 17000 17000 17000 17000 15600 15600     -   15600
  testlaw 15000 15000 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 17250       -

All seems to be fine on your cli output, still not clear with your explenation I was hoping find some clue with your logs but all seems to be normal, Format Interpreters seems to be working fine

Check if your phones support g722. Is the only thing that can make asterisk to transcode if they don’t support it.

Yes, the phones (Yealink T42G) support G722 and this setup is working in every other office with the exact same setup. It is just this one office.

Make again all the tests that you have described in your first post. After answering the call run the following command to see what codec is being used in each channel, then hangup.
Post here the results.

sip show channels

I am using pjsip so I did pjsip show channelstats this is the output of the calls that are not working correctly:

                                         ...........Receive......... .........Transmit..........
BridgeId ChannelId ........ UpTime.. Codec.   Count    Lost Pct  Jitter   Count    Lost Pct  Jitter RTT....
===========================================================================================================

3c5a5bfb 108-00000006       00:05:12 ulaw    15528       0    0   0.000  15521       0    0   0.000   0.155
3c5a5bfb Spirit-00000007    00:05:12 ulaw    15523      11    0   0.000  15528       6    0   0.000   0.099

It is showing it as ulaw which I thought was odd as the little HD voice symbol appears on the phone during this call.

This is the output of the above command on a working call:

                                         ...........Receive......... .........Transmit..........
BridgeId ChannelId ........ UpTime.. Codec.   Count    Lost Pct  Jitter   Count    Lost Pct  Jitter RTT....
===========================================================================================================

441e08dc 108-00000009       00:00:39          1782       0    0   0.000   1802       0    0   0.000   0.046
441e08dc Spirit-00000008    00:00:50 ulaw     2494       1    0   0.000   2259       1    0   0.000   0.095

I also noticed this error that appeared right around when the working call was made:

[2016-07-08 20:06:08] ERROR[10979][C-00000005]: pbx_functions.c:636 ast_func_read2: Function SIP_HEADE                                                                                                         R not registered
[2016-07-08 20:06:08] WARNING[10979][C-00000005]: Ext. 8XXXXXX400:2 @ from-pstn: Friendly Scanner from 

I have got it all working without using G722 so it has not been at the top of my list (hence the delayed response). Any help is still very much appreciated as I would like to get HD Voice working as it sounds so much better.

Check what happens if you use sip and make a call using g722.
Related to the error are you using the specific function somewhere in your dialplan?
Also your box is accesible through internet?

I will have to check to see what happens when I make a sip call with g722.

I am not using this function in my dialplan to the best of my knowledge.

Yes, the box is accessible via the internet.

Well I don’t have any other ideas related to the problem but in the log there is friendly-scanner message indicating a sipvicious scan of your box. Check your settings that you are secure enough and avoid hacking.

Hmm. It is sitting behind FreePBX’s built in firewall. Any other suggestions from a security standpoint beyond that?