Cannot access *97 (voicemail) from grandstream

I am having a problem with retrieving voicemails on my Grandstream HD GXP14XX/21XX phones.
I have a newly setup FreePBX 64bit running latest ver (FreePBX
I am using the provisioning system included in FreePBX to configure the phones.
I have set g729 as my first preferred codec.
I can make and receive calls on the handset, but I cannot get the phone to retrieve voicemail.  It knows the voicemail is there, and tells me how many messages are waiting, but neither the dedicated voicemail button, nor dialling *97 (or *98) work.  I can retrieve voicemail using Xlite for the same extension. Xlite is using g711 aLaw codec (solely).
I have looked in the Asterisk CLI when I try to retrieve the voicemail and it says: 
[2012-05-11 13:57:21] WARNING[-1]: channel.c:5104 set_format: Unable to find a codec translation path from 0x100 (g729) to 0xe (gsm|ulaw|alaw)
I have seen several forum posts with similar problems, and I have confirmed that “Enable Call Features” locally on phone is turned off (have tried both actually) and I have ensured that Send DTMF: is set to via RTP (RFC2833)

Any pointers will be appreciated.

Did you purchase g729 licenses from Digium? If not, I don’t believe that any server communications (voicemail, IVR, announcements, etc.) will work because they need to be translated to g729.

Or, are you saying that you’ve set the phone with g729 as the 1st preferred codec, but g711 is also an available codec, and the problem is that Asterisk is negotiating the g729 codec rather than the g711 codec? If your carrier supports it GSM is a good choice for a low bandwidth CODEC that does not require a license.

No, I didn’t purchase any 729 licences. I didn’t think I had to as the phones I am using have g729. Am I wrong, as the calls go through the Asterisk server, so I have to have g729 licences for it? This would go a LONG way to explaining my issue.
Presently, I have set g729 as my 1st preferred codec, but I have then have g723, ulaw, alaw, gsm, g722, in order, as codecs to use in SIP. This setting is in “asterisk sip settings”.

Your post has me thinking that the reason the xlite softphone is working is becuase it does not offer g729, so Asterisk uses the ONLY codec the softphone offers - g711, and all is well. When I use the Grandstream, it offers g729 as its first preference, then Asterisk tries to use it but is not licenced so it fails. But, as you say, shouldn’t it fall back to a codec it CAN use?

I really only want to use G729 for my calls out on my SIP trunk, where I need to preserve my upload bandwidth - I am happy to use 711 (or whatever people recommend as ‘the best’ for internal use as the phones are on a LAN and bandwidth is no issue.

Is there a way for me to tell the system to use g729 for Outgoing SIP calls only? Do I use something like “codec=g729” in the SIP Trunk Peer details section?

Thank-you very much for your help so far.

You can set the outbound CODEC to g.729 and Asterisk will transcode but that is a heavy load on the CPU.

g.729 licenses must be purchased from Digium on a per channel basis.

Thanks for all your help. I am experimenting with codecs and priorities now. I will repost if/when I get it figured out.

Yep, I have looked more into the g729 codec issue, and, while asterisk does not prevent the use of the codec, and can pass the call through if the calling handset already has the codec (hence calls work) the issue materialises whenever asterisk has to be able to directly handle the voice encoded by the g729 codec - which it does if it wants to play a recorded message to a handset using the codec!

I could probably have lived without accessing voicemails from the handsets, however further research indicates that this issue (which I experienced in attempting to access voicemails from the handset) will also arise if I want the users to be able to use the conferencing function, and various other functions where the asterisk pabx will be participating directly in the communication stream.

So, rather than muck about trying to avoid buying g729 for $10 a channel, I just bought some and registered them.

I can report that I can now access voicemails directly from the phone handset.

It would probably have been possible to work around the need for the g729 codec, but, as I need it for its low bandwidth, it was just easier to buy some channels and move on.

I have seen other posts on this topic where this was clearly the issue, but where this wasn’t understood by the poster and (if resolved) the resolution wasnt posted back to the forum, so, hopefully this thread will be of use to others.

Thanks SkykingOH for putting your finger directly on the issue.