Opus support on FreePBX 13

I am running Freepbx Distro 10.13.66-22 and Asterisk 13.18.3.

There is no codec.conf file on my system that would allow me to configure the details of the Opus codec.
Is that not supported on that distro version or shall I just add the file or what is the best way forward?

AFAIK Opus is only supported in the SNG7 distro.

And “not supported” means that Opus will not work at all on Freepbx 13 or it’s that I can’t configure the codec any further then what the Asterisk defaults would be?

You can install it manually. Get it from here, it has Opus for 13+ and follow the readme instructions

http://downloads.digium.com/pub/telephony/codec_opus/

Opus shows up under core show codecs.
Wouldn’t that mean it’s already installed?

Yes, that would indicate it is installed.

No, the “core show codecs” CLI command indicates the codecs that Asterisk is aware of for passthrough and just general knowledge purposes. For translation the “core show translation paths opus” CLI command shows the translation paths for opus.

1 Like

DOH. I always mess that one up.

1 Like

So if I manually install the codec and just create the codecs.conf file I should be good to go?

I can’t speak for use within FreePBX or the distro, but in Asterisk it works if manually installed but you MUST follow the instructions in the tarball for manual installation. Not doing as it states results in it not working.

I installed it manually on FreePBXes boxes running Asterisk 13 years ago. It works just as we both pointed out. Follow the instructions exactly.

1 Like

So I tried installing the opus codec on a 10.13.66-22 HA system with Asterisk 13.23.1 but failing when loading the module:

[2019-05-01 09:49:10] WARNING[3911]: config_options.c:1060 xmldoc_update_config_type: Cannot update type 'opus' in module 'codec_opus' because it has no existing documentation!
[2019-05-01 09:49:10] ERROR[3911]: codec_opus_config.c:453 codec_opus_config_initialize: Opus: failed to register sorcery object type 'opus'

According to the instructions I copied the codec_opus.so file into the Asterisk module directory /usr/lib64/asterisk/modules and copied codec_opus_config-en_US.xml into /var/lib/asterisk/documentation/thirdparty

[root@freepbx-b lib]# ls -l /var/lib/asterisk/documentation/thirdparty/
total 4
-rw-r--r-- 1 root root 3660 Apr 30 21:13 codec_opus_config-en_US.xml

[root@freepbx-b lib]# ls -l /usr/lib64/asterisk/modules/codec_opus.so
-rwxr-xr-x 1 root root 354064 Apr 30 21:12 /usr/lib64/asterisk/modules/codec_opus.so

I downloaded the current opus version from:
http://downloads.digium.com/pub/telephony/codec_opus/asterisk-13.0/x86-64/codec_opus-13.0_current-x86_64.tar.gz

That should work, but I’m not familiar with the precise layout of where FreePBX places Asterisk things. The problem is that it can’t load the “codec_opus_config-en_US.xml” file or it’s not in the correct replace.

Perhaps making it so the asterisk user can read, open the file, etc. Permissions, Permissions, Permissions. Are those all correct?

With these permissions I get the same errors:

[root@freepbx-b thirdparty]# ls -l codec_opus_config-en_US.xml
-rw-rw---- 1 asterisk asterisk 3660 Apr 30 21:13 codec_opus_config-en_US.xml

And this one?

Those are the permissions that all other modules in the directory also have, but getting the same errors when changing it to:

root@freepbx-b modules]# ls -l codec_opus.so
-rwxr-xr-x 1 asterisk asterisk 354064 Apr 30 21:12 codec_opus.so

I checked on a Freepbx 14 system and the codec_opus_config-en_US.xml file there is actually in /var/lib/asterisk/documentation/, not in /var/lib/asterisk/documentation/thirdparty/.
I also copied manifest.xml to the Asterisk module directory, like it is with Freepbx 14 and now things are working, opus is loading.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.