Installing And Configuring Opus?

Home » Asterisk Users » Installing And Configuring Opus?
Asterisk Users 2 Comments

Hello Friends,

I am recently beginning to work with Asterisk. I am using version 18.3.0 on Ubuntu 20.04. I have the Hello World example running and I am able to connect to Asterisk using Zoiper on a Mac to test it.

The next thing I would like to do is have Asterisk use Opus. It is currently using G.711 u-law for the call. What do I need to do in order to have it use Opus? I already set Opus as the preferred codec in Zoiper. I think I might need to install something and perhaps configure something in Asterisk.

I have already seen this page:

https://wiki.asterisk.org/wiki/display/AST/Codec+Opus

I configured codecs.conf as follows:

[opus]
type=opus max_playback_rate=16000 ; Limit bandwidth to narrow band fec=yes ;

However, doing so had no effect. What do I need to do in order to install Opus and configure it?

Thank you.

Brant Merryman

2 thoughts on - Installing And Configuring Opus?

  • The binary module as provided by Sangoma can be installed by selecting
    “codec_opus” in the Codecs section of menuselect. It is not enabled by default. If installed then transcoding is provided, and no other configuration is generally needed. I can’t comment on any other implementations.

  •     If you compiles Asterisk by hand you need to make sure that codec_opus was selected (make menuconfig to check selections).  If you installed it from another source make sure that Opus is included (maybe an extra package).  Also, make sure that you modules.conf file is not explicitly blocking it (if you have autoload on).

        From the Asterisk cli do “modules show like codec” and you should see something like this:

    codec_opus.so                  OPUS Coder/Decoder                      
    0          Running extended

        If it is not there then you have not enabled it.