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.
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.
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.