MixMonitor in features.conf causes busy signal

I’m trying to create a dynamic feature that will record a call and play a periodic beep. I included the following in features.conf:
recordcall => #3,peer,MixMonitor(recorded-call.wav,B)

This results in a busy signal for incoming calls.

I installed these modules:
app_mixmonitor.so func_periodic_hook res_monitor.so

extensions.conf has this line:
__DYNAMIC_FEATURES=playmonkeys#recordcall

sip.conf has the line:
directmedia=no

And now, same busy signal if I enable “automon” or “automixmon”.

If I comment out the lines for my custom “recordcall” and “automon” in features.conf I get incoming calls again.

When I check CLI, app_mixmonitor.so is loaded but not running.

Any suggestions?

Thanks for the help

You need to provide logs, and you should note that chan_sip is no longer supported, although unlikely to be the problem

What would you understand to indicate it was running?

You’re right.

The problem seems to be app_mixmoniter.so is loaded but not running.

From /var/log/asterisk/messages
[2025-01-01 19:47:28] WARNING[22307][C-000000cc]: pbx_app.c:508 ast_pbx_exec_application: Could not find application (MixMonitor) -- Channel SIP/Bulkvs-00000005 left 'simple_bridge' basic-bridge <4e31e818-bb65-449c-aea1-a80f1b3a48cb> -- Channel SIP/8180-00000007 left 'simple_bridge' basic-bridge <4e31e818-bb65-449c-aea1-a80f1b3a48cb>

From CLI “module show like mixmon”:
app_mixmonitor.so Mixed Audio Monitoring Application 0 Not Running core 1 modules loaded

I’m assuming that if mixmonitor is running there won’t be problems. But I can’t find any reason why mixmonitor isn’t running or how to start it.

Appreciate you help.

I’m not certain of the status column, but I suspect that Not Running means there is no active monitor, not that the load failed. Normally if the load failed, the module would show as not present.

If you suspect the load has failed, you should look at the logs from when Asterisk was started.

Keep digging deeper and finding more errors. I can live with some of them. I know that sip.conf has been deprecated but it’s too hard for med to switch to pjsip.conf right now. I restarted asterisk. From /var/log/asterisk/messages:

[2025-01-02 06:35:04] Asterisk 18.24.2 built by root @ ubuntu.xxx.com on a x86_64 running Linux on 2024-08-22 06:05:16 UTC
[2025-01-02 06:35:04] NOTICE[25379] loader.c: 104 modules will be loaded.
[2025-01-02 06:35:04] NOTICE[25379] cdr.c: CDR simple logging enabled.
[2025-01-02 06:35:04] NOTICE[25379] indications.c: Default country for indication tones: us
[2025-01-02 06:35:04] NOTICE[25379] indications.c: Setting default indication country to 'us'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] NOTICE[25379] chan_sip.c: The 'username' field for sip peers has been deprecated in favor of the term 'defaultuser'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] ERROR[25379] res_sorcery_config.c: Unable to load config file 'pjsip.conf'
[2025-01-02 06:35:04] NOTICE[25436] chan_sip.c: Peer 'Voipms' is now Reachable. (35ms / 2000ms)
[2025-01-02 06:35:04] NOTICE[25379] confbridge/conf_config_parser.c: Adding default_bridge profile to app_confbridge
[2025-01-02 06:35:04] NOTICE[25379] confbridge/conf_config_parser.c: Adding default_user profile to app_confbridge
[2025-01-02 06:35:04] NOTICE[25379] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
[2025-01-02 06:35:04] WARNING[25379] pbx.c: Context 'local' tries to include nonexistent context 'parkedcalls'
[2025-01-02 06:35:04] WARNING[25379] loader.c: Some non-required modules failed to load.
[2025-01-02 06:35:04] WARNING[25379] loader.c: Module 'chan_sip' has been loaded but was deprecated in Asterisk version 17 and will be removed in Asterisk version 21.
[2025-01-02 06:35:04] ERROR[25379] loader.c: Failed to resolve dependencies for res_monitor
[2025-01-02 06:35:04] ERROR[25379] loader.c: res_monitor declined to load.
[2025-01-02 06:35:04] ERROR[25379] loader.c: res_pjsip_transport_websocket declined to load.
[2025-01-02 06:35:04] ERROR[25379] loader.c: Failed to resolve dependencies for app_mixmonitor
[2025-01-02 06:35:04] ERROR[25379] loader.c: app_mixmonitor declined to load.
[2025-01-02 06:35:04] ERROR[25379] loader.c: Failed to resolve dependencies for bridge_builtin_features
[2025-01-02 06:35:04] ERROR[25379] loader.c: bridge_builtin_features declined to load.
[2025-01-02 06:35:04] ERROR[25379] loader.c: Failed to resolve dependencies for func_periodic_hook
[2025-01-02 06:35:04] ERROR[25379] loader.c: func_periodic_hook declined to load.
[2025-01-02 06:35:04] ERROR[25379] loader.c: Failed to resolve dependencies for app_queue
[2025-01-02 06:35:04] ERROR[25379] loader.c: app_queue declined to load.
[2025-01-02 06:35:04] WARNING[25402] chan_sip.c: chan_sip has no official maintainer and is deprecated.  Migration to
[2025-01-02 06:35:04] WARNING[25402] chan_sip.c: chan_pjsip is recommended.  See guides at the Asterisk Wiki:
[2025-01-02 06:35:04] WARNING[25402] chan_sip.c: https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip
[2025-01-02 06:35:04] WARNING[25402] chan_sip.c: https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip
[2025-01-02 06:35:05] NOTICE[25436] chan_sip.c: Peer 'Bulkvs' is now Reachable. (79ms / 2000ms)
root@ubuntu:/etc/asterisk# asterisk -rvvv
Asterisk 18.24.2, Copyright (C) 1999 - 2022, Sangoma Technologies Corporation and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.

[2025-01-02 06:35:04] ERROR[25379] loader.c: Failed to resolve dependencies for app_mixmonitor
[2025-01-02 06:35:04] ERROR[25379] loader.c: app_mixmonitor declined to load.

I tried to load the module app_mixmonitor through CLI:

ubuntu*CLI> module load app_mixmonitor.so
Unable to load module app_mixmonitor.so
Command 'module load app_mixmonitor.so' failed.
[2025-01-02 07:07:44] ERROR[27008]: loader.c:283 module_load_error: app_mixmonitor has one or more unknown dependencies.
[2025-01-02 07:07:44] ERROR[27008]: loader.c:283 module_load_error: app_mixmonitor loaded before dependency func_periodic_hook!

So next I try to load func_periodic_hook.so from CLI:

ubuntu*CLI> module load func_periodic_hook.so

Unable to load module func_periodic_hook.so
Command 'module load func_periodic_hook.so' failed.
[2025-01-02 06:54:45] NOTICE[26330]: loader.c:1307 auto_unload_resource: Unloading module 'func_periodic_hook.so' that previously declined to load
[2025-01-02 06:54:45] ERROR[26330]: loader.c:283 module_load_error: func_periodic_hook has one or more unknown dependencies.
    -- Registered SIP '6001' at 192.168.1.2:18970

And I can’t figure out the missing dependencies for func_periodic_hook.

Thanks for steering me in the right direction. What next?

The shell command ldd should show you which shared libraries an executable or shared library depends on,. and which if any file was used to resolve the dependency.

Can’t figure what any of this means.

root@ubuntu:/etc/asterisk# ldd /usr/sbin/asterisk
        linux-vdso.so.1 =>  (0x00007ffddc753000)
        libasteriskssl.so.1 => /usr/lib/libasteriskssl.so.1 (0x00007fdc31af9000)
        libasteriskpj.so.2 => /usr/lib/libasteriskpj.so.2 (0x00007fdc316ef000)
        libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fdc31334000)
        libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007fdc310f7000)
        libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fdc30e22000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdc30c05000)
        libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fdc3099d000)
        libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fdc30558000)
        liburiparser.so.1 => /usr/lib/x86_64-linux-gnu/liburiparser.so.1 (0x00007fdc3033d000)
        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fdc30138000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fdc2ff00000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fdc2fcf8000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdc2faf4000)
        libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fdc2f8ee000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fdc2f6d3000)
        libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2 (0x00007fdc2f49b000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdc2f192000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdc2edc8000)
        libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007fdc2ea34000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fdc2e81a000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fdc2e5f8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fdc31cfc000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fdc2e3cf000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fdc2e1ba000)
        libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007fdc2c703000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdc2c381000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdc2c16b000)

menuselect will list the dependencies, in the case of periodic hook that is:

app_chanspy
func_cut
func_groupcount
func_uri

This isn’t the module that is failing! ldd can be run on shared libraries, and should be, in this case.

The output is a list of shared libraries referenced by the binary, and the files that will be used to provide those shared libraries.

If anything except vdso or ld.so lacks an associated file name, that means that, in the environment that ldd was run, that library is referenced but cannot be found. The numbers are the addresses at which the libraries would be loaded.

It’s been endless in chasing down the dependencies and the “unknown” dependencies. The ldd helped but revealed more problems.

I decided to try modules.conf with autoload=yes. I’ve read that it loads all available modules. I commented out everything past that.

After restarting Asterisk, everything works!

Not the correct solution but it will do.

Thanks for your help. Never would have gotten this working without your guidance.

BTW, everything was working a few months ago. I can’t understand how anything changed.

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