Get the App
SLTechnology News&Howtos  ›  Servers  › 

FreeSWITCH toss notes 5--G729 transcoding support

Shulou Source: shulou.com Published: 2022-06-02 22:54:21 10月27日 Update

FreeSWITCH does not support G729 transcoding by default, but so far G729 media can be transmitted transparently, so it is impossible to make a call if one of the two phones only supports G729, and FreeSWITCH cannot record when using G729 coding.

Of course, if commercial applications, you can buy G729 license, $10 per channel, or use hardware transcoding card, the price seems to be even higher.

There are many G729 modules available for compiling FreeSWITCH using 8000hz's source package on the network, but the effect is general. I use bcg729's source code here to compile, and the transcoding effect is slightly better than 8000hz's. The current latest version of BCG729 is 1.0.3

Preparation: a copy of the source code consistent with the currently running version of FreeSWITCH

Start compiling:

1. Enter the source code.. / src/mod/endpoints directory

Cd / usr/src/freeswitch-1.6.19/src/mod/endpoints

2. Check out the G729 module suitable for FreeSWITCH (this part of the source code is FreeSWITCH adaptation to BCG729)

Git clone https://github.com/xadhoom/mod_bcg729.git

3. Rename mod_bcg729 to mod_g729

Mv mod_g729 mod_g729_bak mv mod_bcg729 mod_g729

4. Return to the home directory of the FreeSWITCH source code and perform the configuration

. / configure

5. Go to the.. / src/mod/endpoints/mod_g729 directory and execute the compilation

Cd / usr/src/freeswitch-1.6.19/src/mod/endpoints/mod_g729 make # # if you are prompted to find the header file when compiling, you can copy the corresponding header file under the FreeSWITCH source code include directory to the #.. / mod_g729/bcg729/include/ directory. Other header files that cannot be found can be searched under the FreeSWITCH source directory using the find command #, then copied to the.. / mod_g729/bcg729/include/ directory, and then recompiled.

6. After compilation, copy mod_bcg729.so to the library directory of FreeSWITCH, or you can directly replace the G729 library file under the library directory of FreeSWITCH.

Cp mod_bcg729.so / usr/lib/freeswitch/mod/

7. Modify the FreeSWITCH configuration file vars.xml to add G729 to global_codec_prefs and outbound_codec_prefs

8. Load the BCG729 module in fs_cli

Unload mod_g729 load mod_bcg729

Tags: Directory source code compilation file module support effect version configuration consistent two price simultaneous command commercial media library file hardware coding network Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker Redmi Apple Shulou Technology