How To Install asterisk-opus on Ubuntu 18.04

In this tutorial we learn how to install asterisk-opus on Ubuntu 18.04. asterisk-opus is opus module for Asterisk

Introduction

In this tutorial we learn how to install asterisk-opus on Ubuntu 18.04.

What is asterisk-opus

asterisk-opus is:

Module for the Asterisk open source PBX which allows you to use the Opus audio codec.

Opus is the default audio codec in WebRTC. WebRTC is available in Asterisk via SIP over WebSockets (WSS). Nevertheless, Opus can be used for other transports (UDP, TCP, TLS) as well. Opus supersedes previous codecs like CELT and SiLK. Furthermore in favor of Opus, other open-source audio codecs are no longer developed, like Speex, iSAC, iLBC, and Siren. If you use your Asterisk as a back-to-back user agent (B2BUA) and you transcode between various audio codecs, one should enable Opus for future compatibility.

Opus is not only supported for pass-through but can be transcoded as well. This allows you to translate to/from other audio codecs like those for landline telephones (ISDN: G.711; DECT: G.726-32; and HD: G.722) or mobile phones (GSM, AMR, AMR-WB, 3GPP EVS).

There are three methods to install asterisk-opus on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install asterisk-opus Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install asterisk-opus using apt-get by running the following command:

sudo apt-get -y install asterisk-opus

Install asterisk-opus Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install asterisk-opus using apt by running the following command:

sudo apt -y install asterisk-opus

Install asterisk-opus Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install asterisk-opus using aptitude by running the following command:

sudo aptitude -y install asterisk-opus

How To Uninstall asterisk-opus on Ubuntu 18.04

To uninstall only the asterisk-opus package we can use the following command:

sudo apt-get remove asterisk-opus

Uninstall asterisk-opus And Its Dependencies

To uninstall asterisk-opus and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove asterisk-opus

Remove asterisk-opus Configurations and Data

To remove asterisk-opus configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge asterisk-opus

Remove asterisk-opus configuration, data, and all of its dependencies

We can use the following command to remove asterisk-opus configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge asterisk-opus

References

Summary

In this tutorial we learn how to install asterisk-opus package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.