Or, download this non-GPLed G729 CoDec source from ITU and modify the source so it can be compiled to generate an asterisk codec module to use on your asterisk. :mrgreen:
For the second option, you need to pay the patent royalties, if you are using the codec other than for codec research/evaluation purposes. The original question suggests to me that the royalty is payable in this case.
Note there is also a version that claims to be GPLed, but the licence is invalid.