G726 codec choppy audio

I am using G726 to reduce the rtp steam. It all works great for calls. Quality is good but when VM or a prompt is played the sound is horrible. It seems the translation is not working correctly.

If the call is G726 (caller) => Asterisk => G726 (callee) the voice is great. Sounds as good as G711.

If:
G711 (caller) => Asterisk = > G726 (callee) voice is horrible. You cannot understand most words. Or
Asterisk (VM or prompt playback) => G726 it is also bad.

Just did not know if you had experienced this.

Just a stab in the dark, but are you sure that it is not bridging the two phones then using g711 or something with better call quality once they are bridged?

After several hours I found that the source file for 1.6.1 main/frame.c
had to be editied. The G726_AAL2 had to have the name g726 instead of g726aal2. Then the audio is crystal clear.

{ AST_FORMAT_G726_AAL2, “g726”, 8000, “G.726 AAL2”, 40, 10, 300, 10, 30 }, /*!< codec_g726.c */

What kind of phone were you using ? I had this issue with 1.4.X using SNOM phones. Polycom phones had no issue. Also you may want to post this on bugs.digium.com.

EDIT: Sorry I had audio issues with G722 and not G726.