Add Opus codec, show management info after Asterisk startup
- Install Digium precompiled codec_opus.so in Docker image since Ubuntu 24.04's asterisk-modules package doesn't include it (bug #2044135). Opus is the best codec for mobile VoIP (adaptive bitrate, packet loss resilience). - Rework entrypoint to print the management info banner AFTER Asterisk finishes loading, so the CLI command isn't buried in startup log noise. The management command is now highlighted in yellow. - Remove explicit load directive for codec_opus.so from modules.conf; autoload=yes handles it when the .so exists, and silently skips when it doesn't (no more error log noise on systems without Opus). https://claude.ai/code/session_01Vm6NLaQuzM4VosAotqS1q8
This commit is contained in:
+15
@@ -24,6 +24,7 @@ RUN echo "exit 101" > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d &&
|
||||
asterisk-modules \
|
||||
openssl \
|
||||
curl \
|
||||
wget \
|
||||
tcpdump \
|
||||
sngrep \
|
||||
python3 \
|
||||
@@ -38,6 +39,20 @@ RUN echo "exit 101" > /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d &&
|
||||
&& ldconfig \
|
||||
&& update-ca-certificates 2>/dev/null || true
|
||||
|
||||
# Install Opus codec (not included in Ubuntu 24.04 asterisk-modules, bug #2044135)
|
||||
# Download Digium's precompiled codec_opus for Asterisk 20 (Ubuntu 24.04 ships Asterisk 20)
|
||||
RUN MODULES_DIR=$(find /usr/lib -type d -name modules -path "*/asterisk/*" | head -1) && \
|
||||
if [ -z "$MODULES_DIR" ]; then MODULES_DIR="/usr/lib/x86_64-linux-gnu/asterisk/modules"; fi && \
|
||||
mkdir -p "$MODULES_DIR" /var/lib/asterisk/documentation/thirdparty && \
|
||||
cd /tmp && \
|
||||
wget -q "http://downloads.digium.com/pub/telephony/codec_opus/asterisk-20.0/x86-64/codec_opus-20.0_1.3.0-x86_64.tar.gz" -O codec_opus.tar.gz && \
|
||||
tar -xzf codec_opus.tar.gz && \
|
||||
find /tmp -name "codec_opus.so" -exec cp {} "$MODULES_DIR/" \; && \
|
||||
find /tmp -name "format_ogg_opus.so" -exec cp {} "$MODULES_DIR/" \; && \
|
||||
find /tmp -name "codec_opus_config-en_US.xml" -exec cp {} /var/lib/asterisk/documentation/thirdparty/ \; && \
|
||||
rm -rf /tmp/codec_opus* && \
|
||||
echo "Opus codec installed to $MODULES_DIR"
|
||||
|
||||
# Create required directories
|
||||
RUN mkdir -p \
|
||||
/etc/easy-asterisk \
|
||||
|
||||
Reference in New Issue
Block a user