FreeSWITCH opensource G.729 using Belledonne Communications GPLv2 G.729 implementation

Very few people knows about bcg729, which is a gpl implementation for G.729 codec.
So wrote a small wrapper around it to use as codec under FreeSWITCH:

https://github.com/xadhoom/mod_bcg729

There’s also a similar project on github, done by adapting fsg729 and patching the whole FreeSWITCH.  I prefer a separate module, is more clean 😉

This entry was posted in Linux and tagged , , . Bookmark the permalink.

18 Responses to FreeSWITCH opensource G.729 using Belledonne Communications GPLv2 G.729 implementation

  1. amit anand says:

    Great Stuff,

    Really made my transition smooth from asterisk to freeswitch

    • mbrancaleoni says:

      thanks, but all great work must be credited to FreeSWITCH guys (is really simple to add a codec to it…) and Belledone for the codec part 😉

  2. Henry Jones says:

    Hi,

    I would like to try this codec on a Kazoo pbx. It uses Freeswitch and is running on a x64 AMD system with Centos 6.5. I have no Idea how to install the codec. Can you provide instructions on installation?

    • mbrancaleoni says:

      Well, I never used Kazoo pbx, but if is CentOS based I can guess that all software has been packaged with rpms, so should be possibile to install development packages for freeswitch, something like yum install freeswitch-devel.
      If that do not work, you may need to search if the freeswitch headers are available somewhere in the Kazoo distro.

      Done that, is just a matter to modify the mod_bcg729 Makefile as documented in the README to point to freeswitch sources.

      You will need to install gcc stuff for compiling it, by issuing yum groupinstall “Development Tools”.

      Last resort, you can fire an x86_64 CentOS 6.x machine, install freeswitch from sources (same version as kazoo!), build the codec and copy the binary file in place on your Kazoo installation.

      Hope that this helps!

  3. Samad says:

    Hi,

    Well done. thank you so much.

    Do you know anything like bcg729 for g723 codec on FreeSwitch?

    Regards

  4. Octavio says:

    hello mbrancaleoni, great post, could you help me, i have centos 6.6 and when i run make i got this “make: *** No rule to make target `mod_bcg729.c’, needed by `mod_bcg729.o’. Stop.” ans stop make, So i put the file mod_bcg729.c fron the github https://github.com/xadhoom/mod_bcg729 in the same directory, but after that i still get errors like these
    mod_bcg729.c:5: error: expected identifier or ‘(’ before ‘<’ token
    mod_bcg729.c:8:19: warning: character constant too long for its type
    mod_bcg729.c:13: error: stray ‘\302’ in program
    mod_bcg729.c:13: error: stray ‘\267’ in program
    mod_bcg729.c:13: error: stray ‘\302’ in program
    mod_bcg729.c:13: error: stray ‘\267’ in program
    mod_bcg729.c:287:46: error: invalid suffix "d6d10e5c2b441ad9ce11cf6dc62887" on integer constant
    mod_bcg729.c:370:17: warning: character constant too long for its type
    mod_bcg729.c:381:217: error: invalid suffix "A" on floating constant
    mod_bcg729.c:585: error: stray ‘#’ in program
    mod_bcg729.c:585: error: expected identifier or ‘(’ before ‘<’ token

    have you had thos kind of error? could you help me ?

    Best regards
    Octavio

    • Octavio says:

      this is the end of errors

      mod_bcg729.c:1073: error: stray ‘\’ in program
      mod_bcg729.c:1152: error: stray ‘\’ in program
      mod_bcg729.c:1173: error: expected identifier or ‘(’ before ‘<’ token
      mod_bcg729.c:1304: error: expected identifier or ‘(’ before ‘<’ token
      mod_bcg729.c:1393: error: expected identifier or ‘(’ before numeric constant
      make: *** [mod_bcg729.o] Error 1

    • mbrancaleoni says:

      well, you should git checkout the project instead of trying to compile an html page :).
      Try to open the c file you downloaded to understand what I mean :)

      • Octavio says:

        thanks, yes it was the problem. So the codec works fine, but when i run a performance test with the tool “sipp” with g711 the server supports more than 2000 concurrent calls but when i use the g729 the server only support less than 1000 concurrent calls and crash.

        Have you had this performance issues with this codec?

        • mbrancaleoni says:

          Well, never tested so manu transcoded calls, but this makes sense.
          Codec passthrough is basically a “noop” where packets gets only routed.
          So the same applies with g711 to g711. Doing transcoding, it takes cpu time,
          because each packet must be encoded and decoded, so having 1000 calls seems good to me.

          I don’t know the performance of the commercial codec, but if you need to scale a lot,
          maybe an hardware transcoding solution (Sangoma) can be considered.

  5. voipman says:

    Hi mbrancaleoni

    Is there any how to instruction to add this to freeswitch. Unfortunately I do not understand what I need to do to get it installed?

    I am on a debian installation.

    Thanks for any help.

  6. Andrew says:

    the codec loads fine but when i dial out via a phone i get not acceptable here so doesnt seem to like the codec
    any idea why?

    • mbrancaleoni says:

      “not acceptable” means there’re codec negotiation issue.

      maybe is not enabled as a codec in your profiles ?
      loading a codec module does not mean is immediately available for use, fs must be told to enable it in sip profiles.
      if you’re using vanilla config, normally codec selection is in vars.xml, otherwise you can set the proper
      variables directly in the sip profiles.

      check https://wiki.freeswitch.org/wiki/Sofia.conf.xml#Codecs_related_options for more infos.

  7. Jon Braganza says:

    Hi there,

    I am running the Windows x64 version of FreeSwitch…is there any way to compile this module in Visual Studio instead of gcc?

  8. Alberto says:

    Hi,

    Do you know if it works on a Rapsberry Pi B+ with raspbian and fusionpbx?

    Thanks

    • mbrancaleoni says:

      Never tried, but it should, since the code is fully portable and ARM processor is officially supported by bcg729.
      I’m curious about the performances, if you try it let me know how many channels it supports!

Leave a Reply to Jon Braganza Cancel reply

Your email address will not be published. Required fields are marked *