Opus From Git : Install Questions

Home » Asterisk Users » Opus From Git : Install Questions
Asterisk Users 2 Comments

On 13.9.0
https://github.com/traud/asterisk-opus

The README:

Alternatively, you can use the Makefile of this repository to create just the shared libraries of the modules. That way, you do not have to
(re-) make your whole Asterisk.

The Makefile generates:
codecs/codec_opus_open_source.so formats/format_ogg_opus_open_source.so formats/format_vp8.so res/res_format_attr_opus.so

Without any of the patches the asterisk build generates:

codec_opus.so format_ogg_opus.so

res_format_attr_opus.so

Questions:

Should the *_opus_open_source.so be in modules with the *opus.so libraries from the asterisk build ? If not, do I build asterisk without selecting opus ? If they are in modules, how does asterisk know which library to use ?

The res_format_attr_opus.so library ?

And another question, to enable PLC do I need to apply the patch even if I’m installing the libraries directly ?

Thanks for all the work getting opus to work on asterisk.

sen

2 thoughts on - Opus From Git : Install Questions

  • See, e.g. the Debian package asterisk-opus:
    https://packages.debian.org/source/sid/asterisk-opus

    That package builds the opus modules as stand-alone modules out of the tree of asterisk. It has a build-time dependency on the binary package asterisk-dev.

    The list of files in it:

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

    IIRC res_format_attr_opus.so in Asterisk proper is by now good enough and needs no patching.

    Not by default.

    You can either copy them to the Asterisk build directory (I do that in another Asterisk package I maintain). The build system will just pick them up and use them.

    Alternatively, as suggested in the README above, build them outside of the Asterisk tree (you’ll need to point them to the asterisk source tree, or at least to the installed asterisk header files and copy the resulting .so files to the astmoddir (e.g. /usr/lib/asterisk/modules).

    Which patch specifically? I’m not sure I follow.

  • So if I’m building outside the tree, do _not_ select opus in menuselect when building asterisk. Correct ? Then copy codec_opus_open_source.so, format_ogg_opus_open_source.so and format_vp8.so to {astmoddir} ,
    /usr/lib64/asterisk/modules.

    asterisk-opus-asterisk-13.7/enable_native_plc.patch

    From the README:

    Out of the box, Asterisk does not detect lost (or late) RTP packets. Such a detection is required to conceal lost packets (PLC). PLC improves situations like Wi-Fi Roaming or mobile-phone handovers. This patch detects lost/late packets but is experimental.

    patch -p1 <./asterisk-opus*/enable_native_plc.patch Looks like this can’t be built out-of-tree, and you need to patch each build of asterisk. Appreciate the quick reply.