SHOUKATHALI P
SHOUKATHALI P

Reputation: 45

How to integrate G.729 Codec with PJSIP Project

I am developing Softphone dialer applications for android, iOS etc with PJSIP. I need to know how to integrate G.729 Codec with the project. I've seen articles related to building G.729 Codec using Intel IPP in PJSIP Website itself. But when I contacted Intel Support Team, they told me that it was only supported in older versions of IPP. Now they are not supporting arm processors and G.729 Codec is also not coming along with the sample project. Is there any other way to integrate the codec with PJSIP project.

Thanks in advance

Upvotes: 2

Views: 5913

Answers (5)

Oleg
Oleg

Reputation: 206

First you need to download g729 patch from pjsip-android-builder library https://github.com/VoiSmart/pjsip-android-builder/tree/master/g729_patch

Download pjsip , unzip it; put g729_patch folder and pjsip folder into one folder. In g729_patch open in editor install.sh and edit the line 5 (put the correct name of your folder with pjsip), for me it was: PJPROJECT_BASE_FOLDER="../pjproject-2.7.2"

In terminal cd to g729_patch directory and run ./install.sh (you need autoconf utility to be installed for that); patch can be applied manually as well, see instructions in readme.

Create file config_site.h with the following content:

    #define PJ_CONFIG_ANDROID 1
    #define PJMEDIA_HAS_G729_CODEC 1
    #define PJMEDIA_HAS_G7221_CODEC 1
    #include <pj/config_site_sample.h>

for me it was for android but can be for other platform so 1st line can vary, also other options can be added. Put this file to /pjlib/include/pj.

cd to your pjsip directory and run:

./configure-android --enable-g729-codec

for me it was android so i ran ./configure-android but may be other. on this step any other configure flags can be applied, for example for me it was NDK_TOOLCHAIN_VERSION=4.9 TARGET_ABI=armeabi-v7a ./configure-android --use-ndk-cflags --enable-g729-codec

then run:

make dep && make clean && make

That's it - pjsip is compiled with g729 codec.

Upvotes: 1

SaRaVaNaN DM
SaRaVaNaN DM

Reputation: 4410

I had the same requirement for one of my VOIP app. But haven't found any solution or stack overflow answer for a long. So finally i come to know there is another open source "linphone"(not pjsip stack) integrated with g729codec.

So i took the g729 codec library alone from linphone and created a patch for pjsip. Also I have tested with my iOS app it works well. You can download the patches from my git repo https://github.com/saravanandm/pjsip-g729codec

Upvotes: 4

Cristea Bogdan
Cristea Bogdan

Reputation: 126

You might have a look at CSipSimple project (https://code.google.com/p/csipsimple/), they use pjsua and G729 codec can be included into the application.

Upvotes: 0

TMSZ
TMSZ

Reputation: 687

For me using IPP would be overkill. AFAIR it is also not free.

Use GSM codec module as a template, modify it and add open source G.729/a (asterisk, freeswitch) implementation as third party library.

Upvotes: 0

frhack
frhack

Reputation: 5112

It seems that PJSIP already support G.729

http://www.pjsip.org/pjmedia/docs/html/group__PJMED__IPP__CODEC.htm

http://trac.pjsip.org/repos/wiki/FAQ#g729-g723

Please, follow the instructions here:

https://github.com/chakrit/gossip/issues/6

Here you found istruction for linux, maybe usefule with some fixes:

How to use pjsip on android device in order to have G.729 codec functionality

Upvotes: 0

Related Questions