Conference call with g729 codec issue

Hello,

I have an issue using g729 codec with ConfBridge. The CLI message is the following :

    -- Executing [confexec@from-sip:1] Answer("SIP/test-00000001", "")
       > 0x7f1d0c06fc80 -- Probation passed - setting RTP source address to XX.XX.XX.XX:60715
       > 0x7f1d0c06fc80 -- Probation passed - setting RTP source address to XX.XX.XX.XX:60715
    -- Executing [confexec@from-sip:2] ConfBridge("SIP/test-00000001", "SIP/123")
    -- Channel CBAnn/SIP/123-00000001;2 joined 'softmix' base-bridge <963462d4-5d94-41dd-8d51-704f7b9ea99d>
    -- <SIP/test-00000001> Playing 'conf-onlyperson.g729' (language 'en')
    -- Channel SIP/test-00000001 joined 'softmix' base-bridge <963462d4-5d94-41dd-8d51-704f7b9ea99d>
[2017-08-31 12:11:23] WARNING[24110][C-0000000f]: translate.c:485 ast_translator_build_path: No translator path: (starting codec is not valid)
[2017-08-31 12:11:23] WARNING[24110][C-0000000f]: channel.c:5493 set_format: Unable to find a codec translation path: (slin) -> (g729)
    -- Channel SIP/test-00000001 left 'softmix' base-bridge <963462d4-5d94-41dd-8d51-704f7b9ea99d>
    -- <CBAnn/SIP/123-00000001;1> Playing 'confbridge-join.slin' (language 'en')
    -- <CBAnn/SIP/123-00000001;1> Playing 'confbridge-leave.slin' (language 'en')
    -- Channel CBAnn/SIP/123-00000001;2 left 'softmix' base-bridge <963462d4-5d94-41dd-8d51-704f7b9ea99d>

I am allowing only g729 in sip.conf and all my clients are offering g729. Call ends after 2 or 3 seconds. However, the conference call is successful if I allow speex (as first choice in sip.conf) for example and let clients offer speex.

Ain’t it possible to make Asterisk conference call work using g729?

Thank you guys.

If you add G.729 samples together, you get something that isn’t even G.729, it is just gibberish.

In order to mix streams in a conference you have to add the samples together, and to do that, they have to be in a linear format. That means Asterisk must transcode in and out of G.729 around the conference bridge.

You will need the codec, and not just the format module installed, and you will need sufficient licences (I think you will need two licences for each party in the conference.

Could you explain to me why it works with other codecs such as speex? Is it because it is in a linear format, I suppose? So in the case of speex there is no need to transcode in and out?

And what codec would you recommend best for conferencing?

Thanks

Asterisk comes with speex to linear codecs, that are free to use.

G.729 is patented, so you must obtain a closed source, commercial codec, and pay the relevant licence fees.

AFAIK, the g729 license has expired :

Also: https://www.mgraves.org/2017/03/its-official-the-patents-on-g-729-have-expired/

My requirement would be satisfied if only one party talks at a time while all the others are listening. Is it possible to avoid adding samples in this case? If this can’t be done using ConfBridge, is there any way to do it on Asterisk? In other words, I need a one-to-many channel…

ConfBridge always requires each channel to be transcoded, so it can’t be used in that scenario. Nothing else springs to mind that could be used.

So basically, there is no way in Asterisk to simulate something like Skype for business (where one person talks while all others can only listen)… Not even through dialplan scripting without using ConfBridge??

There may be some creative way to do it, but most people use codecs which can be transcoded by Asterisk so they can use ConfBridge as it is with listener only and other features, and it just works for them. Your case is complicated because you are using a codec which can’t be transcoded by default.

What do you mean by using “ConfBridge as it is with listener only”? Is it possible then to avoid adding samples in that case and use less CPU? How do I set ConfBridge to listener-only mode? I could use speex for conference instead of g729.

I am wondering if I enable dsp_drop_silence in ConfBridge default user profile and I let only one party talk at a time (by muting the mic of the listeners), and use speex for conference mode instead of g729, I could end up having something similar to Skype for business… Don’t you think? And the Asterisk server’s CPU shouldn’t be affected too much by ConfBridge… ?

If you use speex then it will work as you want. CPU usage depends on how much CPU Is taken to transcode speex into signed linear and back. The mixing part wouldn’t be the CPU intensive part there.

1 Like

Yes it works, just pay for the G729 licenses that you need or use G711, SPEEX or any other free codec shipped within asterisk. Confridge works out of the box with asterisk when using normal codecs.

Do you think speex would be the most suitable codec to be used in conference or is there a better codec performance wise? Thank you.

Every codec has its pros and cons. It all depends on what you are trying to achieve.

As I said, I am trying to achieve conference call with acceptable audio quality and minimal CPU overhead. For this, I don’t mind muting all listeners and let one person talk at a time to improve performance (as I have dsp_drop_silence=yes in confbridge.conf). So I was wondering if speex was the best codec for my need. Thanks.

If you want a minimal amount of CPU overhead then g722, ulaw, or alaw are the options for codec. Options do exist, like you’ve discovered, that can also minimize things. You’ll need to experiment and see.

2 Likes

If those are your only requirements, use mulaw or alaw, depending where you are in the world. They are the most efficient commonly used codecs for conversion to linear, and will give you PSTN voice quality, as they are the PSTN codecs.

1 Like