G729 Passthrough How To

Home » Asterisk Users » G729 Passthrough How To
Asterisk Users 15 Comments

Hello Everyone,

We are currently experiencing some higher load on our servers, and since signaling comes into our servers on G729, we would like to implement G729 pass-through. A few questions arise, do we need to convert all the recording to the codec, and what about voicemail?

We are also using A2Billing (hope I am not violating any thread rules), and would like to convert all that recording to G729 as well.

Any help is greatly appreciated.

Kind Regards,

Nick from Toronto.

15 thoughts on - G729 Passthrough How To

  • If you want to do pass-thu you need to make sure Asterisk NEVER EVER needs to transcode. This means all calls must use only g729, sound files must be in g729 format and no early audio, inband ringing or anything else which might cause Asterisk to require a temp transcoding path.

    In my experience it never works right. The most you should expect to be able to do is reduce the need for transcoding by doing the above steps.

    —–Original Message—

  • Hey!!! Eric thank you so much for your response. Could you guys please direct us in achieving as much as possible. For example:
    * What linux command can we use to convert all recording to G729
    * Which files do we need to convert and there locations
    * For *testing* how do we make sure Asterisk NEVER EVER transcodes.

    Do we still need the G729 codec installed on the asterisk machine if we manage to implement pass-through that would suffice our needs.

    Kind Regards,

    Nick.

  • I forgot to mention that all our equipment (phones etc..) are using G729, and this is for internal use over the net. The problem, concurrent calls, and bad bandwidth at some locations…

    N.

  • As my understanding Asterisk always pass-thu g729 if both ends have this codec. But if you answer the call or play some audio before dialing to end point then asterisk stay between both legs. In case of VM. you should install g729 if your prompts are in g729 format. As a2billing play voice prompts you cannot pass-thu transparently. I think the load on you server is not for transcoding but PHP scripts. I was in this situation and reduce the upto 80% by removing A2B.

  • Hello Ashgar,

    Thank you so much for your response. As removing A2B is not an option we would first like to begin by converting all audio files (Asterisk, VM, A2B prompts etc…) to G729 to minimize unneeded trascoding. Linux commands and the list of recording would be a great help. Sorry, not new to VoIP but new to Asterisk :).

    N.

  • “file convert” in the Asterisk CLI, IF you have the g729 codec installed. You need to convert every single file you may play to a caller You can’t force Asterisk to never attempt transcoding, the most you can do is force all sip.conf entries to use g729. It will still transcode to play ringback to the caller.

    —–Original Message—

  • I wanted to mention that I do not mind posting the converted files on this list for future individuals, given that I am not doing anything illegal…

    N.

  • Hey Eric, I do have the codec installed, and I remember hearing about the CLI command to convert. Is there a recent how-to of blog already discussing this somewhere?

    N.

  • Not really no… And how do I make sure Asterisk always generates prompts and VM recordings in G729 from now on. This is also hard to find information..

    N.

  • Asterisk does not “generate” prompts. You force G729 in VM by only allowing g729 in voicemail.conf. Try reading the Asterisk book.

    Asterisk: The Definitive Guide, 4th Edition (ISBN 1-4493-3242-0) available at http://oreilly.com/catalog/0636920025894 – Asterisk: The Definitive Guide is released under a Creative Commons License (http://creativecommons.org/licenses/by-nc-nd/3.0/us/) and a version is available for reading online at http://www.asteriskdocs.org/

    https://www.google.com/search?q=asterisk+%22file+convert%22

    —–Original Message—

  • CgpTZW50IGZyb20gbXkgVmVyaXpvbiBXaXJlbGVzcyA0RyBMVEUgRFJPSUQKCkVyaWMgV2llbGlu ZyA8RVdpZWxpbmdAbnlpZ2MuY29tPiB3cm90ZToKCj5JZiB5b3Ugd2FudCB0byBkbyBwYXNzLXRo dSB5b3UgbmVlZCB0byBtYWtlIHN1cmUgQXN0ZXJpc2sgTkVWRVIgRVZFUiBuZWVkcyB0byB0cmFu c2NvZGUuICAgVGhpcyBtZWFucyBhbGwgY2FsbHMgbXVzdCB1c2Ugb25seSBnNzI5LCBzb3VuZCBm aWxlcyBtdXN0IGJlIGluIGc3MjkgZm9ybWF0IGFuZCBubyBlYXJseSBhdWRpbywgaW5iYW5kIHJp bmdpbmcgb3IgYW55dGhpbmcgZWxzZSB3aGljaCBtaWdodCBjYXVzZSBBc3RlcmlzayB0byByZXF1
    aXJlIGEgdGVtcCB0cmFuc2NvZGluZyBwYXRoLgo+Cj5JbiBteSBleHBlcmllbmNlIGl0IG5ldmVy IHdvcmtzIHJpZ2h0LiAgICBUaGUgbW9zdCB5b3Ugc2hvdWxkIGV4cGVjdCB0byBiZSBhYmxlIHRv IGRvIGlzIHJlZHVjZSB0aGUgbmVlZCBmb3IgdHJhbnNjb2RpbmcgYnkgZG9pbmcgdG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