Built with bcg729 OK but unable to use G729

DM
david.mcbride@gamma.co.uk
Thu, Feb 29, 2024 2:43 PM

Hi

I followed this guide to build pjsip with bcg729 on linux:

https://github.com/pjsip/pjproject/issues/2029

All seems to go well.

I also built Python SWIG and have been trying, in vain,

to get pjsip to use the G729 codec.

I use pj.Endpoint.codecEnum2 to enum all codecs but 729 isn't there:

def _list_supported_codecs(self, ep):

    # List all available codecs

    codec_info_list = ep.codecEnum2()

    # Log or print all available codec IDs

    logger.debug("Listing all supported codecs:")

    for codec_info in codec_info_list:

        logger.debug(f"Codec ID: {codec_info.codecId}")

		

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Listing all supported codecs:

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: speex/16000/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: speex/8000/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: speex/32000/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: iLBC/8000/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: GSM/8000/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: PCMU/8000/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: PCMA/8000/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: G722/16000/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: L16/44100/1

2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: L16/44100/2

I send an INVITE and no sign of payload 18:

m=audio 4000 RTP/AVP 96 97 98 99 3 0 8 9 120 121 122

This is my abbreviated build script:

git clone https://github.com/BelledonneCommunications/bcg729.git

cd ~/bcg729

mkdir build && cd build

cmake ..

make

cd ~/pjsip

./configure CFLAGS="-fPIC" --with-bcg729=/usr/local

# output inidicates that bcg729 is reachable

Using bcg729 prefix... /usr/local

checking bcg729 usability... yes

make dep

make

# no issues here. I can see bcg729 links mentioned in outout

sudo apt-get install swig

sudo apt-get install python3-dev

cd pjsip-apps/src/swig/python

make

make install

I'm obviously doing something stupid.

Can anyone spare some time to help?

Many thanks

David

Hi I followed this guide to build pjsip with bcg729 on linux: https://github.com/pjsip/pjproject/issues/2029 All seems to go well. I also built Python SWIG and have been trying, in vain, to get pjsip to use the G729 codec. I use pj.Endpoint.codecEnum2 to enum all codecs but 729 isn't there: def _list_supported_codecs(self, ep): # List all available codecs codec_info_list = ep.codecEnum2() # Log or print all available codec IDs logger.debug("Listing all supported codecs:") for codec_info in codec_info_list: logger.debug(f"Codec ID: {codec_info.codecId}") 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Listing all supported codecs: 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: speex/16000/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: speex/8000/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: speex/32000/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: iLBC/8000/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: GSM/8000/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: PCMU/8000/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: PCMA/8000/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: G722/16000/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: L16/44100/1 2024-02-29 13:34:05,583 - echo-pjaccess-logs - pj_access.py - DEBUG - Codec ID: L16/44100/2 I send an INVITE and no sign of payload 18: m=audio 4000 RTP/AVP 96 97 98 99 3 0 8 9 120 121 122 This is my abbreviated build script: git clone https://github.com/BelledonneCommunications/bcg729.git cd \~/bcg729 mkdir build && cd build cmake .. make cd \~/pjsip ./configure CFLAGS="-fPIC" --with-bcg729=/usr/local \# output inidicates that bcg729 is reachable Using bcg729 prefix... /usr/local checking bcg729 usability... yes make dep make \# no issues here. I can see bcg729 links mentioned in outout sudo apt-get install swig sudo apt-get install python3-dev cd pjsip-apps/src/swig/python make make install I'm obviously doing something stupid. Can anyone spare some time to help? Many thanks David