Opus codec download substitution

Is there a way to specify the download source directory for codec_opus?
For example: use the opus 20 download directory for Asterisk 22

The reason is simple, there is no 32 bit opus download for Asterisk 22 (or 21).

There isn’t a way to specify an alternate downloads location however, you could just download the proper tarball, untar it and look in manifest.xml to see where the contents go.

You could also…

  • Download the codec_opus-20.0_1.3.0-x86_32.tar.gz tarball.
  • Untar the tarball.
  • Rename the directory from codec_opus-20.0_1.3.0-x86_32 to codec_opus-22.0_1.3.0-x86_32
  • Edit the codec_opus-22.0_1.3.0-x86_32/manifest.xml file and change the version from 20 to 22.
  • Recreate the tarball with tar -czf codec_opus-22.0_1.3.0-x86_32.tar.gz codec_opus-22.0_1.3.0-x86_32
  • Copy the new tarball to a cache location of your choosing.
  • When you run ./configure the next time, add the --with-download-cache=<cache directory> option. Now when you do a make install the build scripts will look in the cache directory for tarballs first before trying to download them. pjproject, jansson and libjwt tarballs will also be cached in that directory so make sure your build user has write access to the directory.

Thanks for the detailed response.
I have tried the first suggestion in the past and Asterisk (-cvvvvT) stops with a seg fault.
Your second option “download-cache” looks promising. I’ll try it soon and respond.

If you’re getting a segfault by manually copying the shared libraries then repackaging isn’t going to help. The 20 version just isn’t going to be compatible with a later asterisk version.

I have been using Opus 20 with Asterisk git master and that works well.

It seems to only look in the ‘cached’ directory during ‘./configure’ not during ‘make install’ where opus is setup.

Ah, sorry… I forgot a step. After you’ve edited the manifest file you have to copy it to codec_opus-22.0.manifest.xml right next to the tarball.

If downloads is your cache directory, it should look like this…

.rw-r--r--@ 1.1k user 10 Dec 06:42 codec_opus-22.0.manifest.xml
.rw-r--r--@ 388k user 10 Dec 06:44 codec_opus-22.0_1.3.0-x86_64.tar.gz

During ‘make install’ it doesn’t look in the cache directory.

It returns:
codec_opus: Unable to fetch https://downloads.digium.com/pub/telephony/codec_opus/asterisk-22.0/x86-32/manifest.xml

Yeah, I forgot the build install tries to retrieve the manifest file from the downloads server to verify it has the latest version. As I said though, if you get a SEGFAULT when copying manually, using the cache isn’t going to work either. It’s the same files. Sorry.

I have added your request for a 32-bit version to the queue. There is no time frame on when/if we will get to it.

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