Asterisk 20 codec_opus.so not loaded automatically, and not all translation paths available

Hello!

I am trying to use opus codec internal, and I have to use alaw for all outbound calls using a SIP Trunk.
I’ve built Asterisk 20 on Debian, and enabled opus while compiling, so the codect_opus.so is existing.

However it is not automatically loaded when starting asterisk.
If I am loading the module manually, it loads, but complains about a missing codec.conf file.

After loading I have the following translation paths:

debian*CLI> core show translation paths opus
--- Translation paths SRC Codec "opus" sample rate 48000 ---
        opus:48000       To codec2:8000     : No Translation Path
        opus:48000       To g723:8000       : No Translation Path
        opus:48000       To ulaw:8000       : (opus@48000)->(slin@48000)->(slin@8000)->(ulaw@8000)
        opus:48000       To alaw:8000       : No Translation Path
        opus:48000       To gsm:8000        : (opus@48000)->(slin@48000)->(slin@8000)->(gsm@8000)
        opus:48000       To g726:8000       : No Translation Path
        opus:48000       To g726aal2:8000   : No Translation Path
        opus:48000       To adpcm:8000      : No Translation Path
        opus:48000       To slin:8000       : (opus@48000)->(slin@48000)->(slin@8000)
        opus:48000       To slin:12000      : (opus@48000)->(slin@48000)->(slin@12000)
        opus:48000       To slin:16000      : (opus@48000)->(slin@48000)->(slin@16000)
        opus:48000       To slin:24000      : (opus@48000)->(slin@48000)->(slin@24000)
        opus:48000       To slin:32000      : (opus@48000)->(slin@48000)->(slin@32000)
        opus:48000       To slin:44100      : (opus@48000)->(slin@48000)->(slin@44100)
        opus:48000       To slin:48000      : (opus@48000)->(slin@48000)
        opus:48000       To slin:96000      : (opus@48000)->(slin@48000)->(slin@96000)
        opus:48000       To slin:192000     : (opus@48000)->(slin@48000)->(slin@192000)
        opus:48000       To lpc10:8000      : No Translation Path
        opus:48000       To g729:8000       : No Translation Path
        opus:48000       To speex:8000      : No Translation Path
        opus:48000       To speex:16000     : No Translation Path
        opus:48000       To speex:32000     : No Translation Path
        opus:48000       To ilbc:8000       : No Translation Path
        opus:48000       To g722:16000      : (opus@48000)->(slin@48000)->(slin@16000)->(g722@16000)
        opus:48000       To siren7:16000    : No Translation Path
        opus:48000       To siren14:32000   : No Translation Path
        opus:48000       To g719:48000      : No Translation Path
        opus:48000       To none:8000       : No Translation Path
        opus:48000       To silk:8000       : No Translation Path
        opus:48000       To silk:12000      : No Translation Path
        opus:48000       To silk:16000      : No Translation Path
        opus:48000       To silk:24000      : No Translation Path

So there is no translation path for opus ↔ alaw

How am I able to have a valid translation path for that.
Or am I somehow possible, to set the codec for the phones to alaw whenever they make an outbound call? So I don’t even need to transcode it?

Thanks!
BR
Manuel

Do you have codec_alaw and codec_resample loaded? Do you have modules.conf configured to only load certain modules?

I presume he has resample, because the ulaw rate change step is working.

Hello
codec_resample was already loaded, but you are right, codec_alaw wasn’t!
As soon as I’ve loaded codec_alaw, the translation path opus ↔ alaw is available und functional. Thanks!

And yes you were right with modules.conf too - the codec_opus.so and codec_alaw.so are not loaded.

Thank you very much :slight_smile:

But would it be somehow possible, to force the internal extensions to use alaw codec, as soon as they make an outbound call (which only supports alaw)? So that there is no need for transcoding?