TRY THIS Incredible PBX - Pi2 - Opus Codec not working

Algis

New Member
Joined
Sep 10, 2017
Messages
2
Reaction score
0
I recently installed Incredible PBX 13 on a Raspberry Pi 2 and noticed the opus codec is not working. I am not sure what I would need to do here as the documentation states opus is supported, and I would assume I do not need to recompile.

Any suggestion are appreciated. Below is some information and details to confirm my issue. Thanks!

- I enabled and moved up the opus codec in webgui: Settings > Asterisk SIP Settings > Audio Codecs (submit/apply config)
- I did the same on the phone (opus as priority)
- I called *60 from a Grandstream 2140 phone (which supports opus), it connected, then disconnects, all other "opus" calls fail, g722, g711, etc work fine. Also tried with soft clients as well.

- In Asterisk CLI debug on I receive:
Code:
[2017-09-11 18:09:16] WARNING[11793][C-00000014]: codec.c:397 ast_codec_samples_count: Unable to calculate samples for codec opus
and
Code:
[2017-09-11 18:09:17] WARNING[11793][C-00000014]: channel.c:5540 set_format: Unable to find a codec translation path: (gsm) -> (opus)

- I check translation table (no opus):
Code:
ipbx*CLI> core show translation
         Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

           ulaw  alaw   gsm  g726 g726aal2 adpcm  slin  slin  slin  slin  slin  slin  slin  slin  slin lpc10 speex speex speex  ilbc  g722 testlaw
     ulaw     -  9150 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250   15000
     alaw  9150     - 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250   15000
      gsm 15000 15000     - 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250   15000
     g726 15000 15000 15000     -    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250   15000
 g726aal2 15000 15000 15000 15000        - 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250   15000
    adpcm 15000 15000 15000 15000    15000     -  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250   15000
     slin  6000  6000  6000  6000     6000  6000     -  8000  8000  8000  8000  8000  8000  8000  8000  6000  6000 14000 14000  6000  8250    6000
     slin 14500 14500 14500 14500    14500 14500  8500     -  8000  8000  8000  8000  8000  8000  8000 14500 14500 14000 14000 14500 14000   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500     -  8000  8000  8000  8000  8000  8000 14500 14500  6000 14000 14500  6000   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500     -  8000  8000  8000  8000  8000 14500 14500 14500 14000 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500     -  8000  8000  8000  8000 14500 14500 14500  6000 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500  8500     -  8000  8000  8000 14500 14500 14500 14500 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500  8500  8500     -  8000  8000 14500 14500 14500 14500 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500  8500  8500  8500     -  8000 14500 14500 14500 14500 14500 14500   14500
     slin 14500 14500 14500 14500    14500 14500  8500  8500  8500  8500  8500  8500  8500  8500     - 14500 14500 14500 14500 14500 14500   14500
    lpc10 15000 15000 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000     - 15000 23000 23000 15000 17250   15000
    speex 15000 15000 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000     - 23000 23000 15000 17250   15000
    speex 23500 23500 23500 23500    23500 23500 17500 17500  9000 17000 17000 17000 17000 17000 17000 23500 23500     - 23000 23500 15000   23500
    speex 23500 23500 23500 23500    23500 23500 17500 17500 17500 17500  9000 17000 17000 17000 17000 23500 23500 23500     - 23500 23500   23500
     ilbc 15000 15000 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000     - 17250   15000
     g722 15600 15600 15600 15600    15600 15600  9600 17500  9000 17000 17000 17000 17000 17000 17000 15600 15600 15000 23000 15600     -   15600
  testlaw 15000 15000 15000 15000    15000 15000  9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250       -

- I check to see if the module codec_opus.so is loaded (no):
Code:
ipbx*CLI> module show like opus
Module                         Description                              Use Count  Status      Support Level
res_format_attr_opus.so        Opus Format Attribute Module             1          Running              core
1 modules loaded

- I check to see if codec_resample is loaded (yes):
Code:
ipbx*CLI> module show like codec_resample
Module                         Description                              Use Count  Status      Support Level
codec_resample.so              SLIN Resampling Codec                    0          Running              core
1 modules loaded

- I check to see if the opus module is installed (yes):
Code:
root@ipbx:~ $ ls /usr/lib/asterisk/modules/ | grep opus
codec_opus.manifest.xml
codec_opus.so
format_ogg_opus.so
res_format_attr_opus.so

I attempt to manually load the opus module (fail):
Code:
ipbx*CLI> module load codec_opus.so
Unable to load module codec_opus.so
Command 'module load codec_opus.so ' failed.
[2017-09-11 18:25:20] WARNING[12419]: loader.c:556 load_dynamic_module: Error loading module 'codec_opus.so': /usr/lib/asterisk/modules/codec_opus.so: cannot open shared object file: No such file or directory
[2017-09-11 18:25:20] WARNING[12419]: loader.c:1087 load_resource: Module 'codec_opus.so' could not be loaded.

I also check to see that xmlstrlet is on my machine (yes):
Code:
root@ipbx:~ $ which xmlstarlet
/usr/bin/xmlstarlet

Some info about versions:
Code:
root@ipbx:~ $ uname -a
Linux ipbx 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
Code:
ipbx*CLI> core show version
Asterisk 13.12.2 built by root @ raspberrypi on a armv7l running Linux on 2017-02-02 18:13:04 UTC
 

Algis

New Member
Joined
Sep 10, 2017
Messages
2
Reaction score
0
Thanks for the quick feedback. It installed without any errors, but unfortunately I don't see any change. I still receive the same errors when I attempt to use the opus codec.

I suspect this warning(but I could be wrong):
Code:
[2017-09-11 18:25:20] WARNING[12419]: loader.c:556 load_dynamic_module: Error loading module 'codec_opus.so': /usr/lib/asterisk/modules/codec_opus.so: cannot open shared object file: No such file or directory

Has the most information, but I don't really know what this means :confused:
...and I can't seem to find a simplified answer with google. If I do get it to work, I will be sure to update this post.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
Probably have to recompile Asterisk after installing that package.
 

pianoquintet

New Member
Joined
Oct 3, 2017
Messages
1
Reaction score
1
I have the same issue. The files do exist in the modules directory but they cannot be loaded, I believe, because they are compiled for an x86 platform. They are downloaded directly from the Asterisk website during the installation procedure. I noted this line in the log when executing "make install": "codec_opus: Downloading http://downloads.digium.com/pub/tel....0/x86-32/codec_opus-13.0_1.1.0-x86_32.tar.gz".

Could a solution be to backport package asterisk-opus from the debian stretch repositories? That package contains the following files, among others:

/usr/lib/asterisk/modules/codec_opus_open_source.so
/usr/lib/asterisk/modules/format_ogg_opus_open_source.so
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,788
Reaction score
2,202
All of my Debian 11 systems with Asterisk 19 and FreePBX 16 already had Opus installed.
 

ostridge

Guru
Joined
Jan 22, 2015
Messages
1,636
Reaction score
523
@ostridge: That update is for Debian 10 x86_64 platforms, not Raspbian.
The DEB22 Opus msg - no such dir lib64 so obviously benign.

on 2020.3 for Raspberry Pi 3B (non 2021) Raspbian10 gets update202035

At some stage the auto update on PBX 2021.01 for Raspberry Pi 4B Raspbian10 - got switched from the update202035 stream to the updateDEB22 - presumed to be on the conversion to 2021. Is that not correct?
 

Members online

No members online now.

Forum statistics

Threads
25,824
Messages
167,825
Members
19,247
Latest member
mdauck
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top