Hello there. I’m a moderately experienced asterisk/freepbx user. I’ve been using asterisk/freepbx for 10+ years.
I have a situation where on a system reboot (shutdown -r now), when the system reboots, modules don’t load and extensions and trunks cant register.
I believe the modules are trying to reload to soon (before asterisk is ready). Is there a way to delay the modules loading either for a fixed period of time or by waiting for an event?
After a reboot (shutdown -r now) if I then do a CLI “core restart now” the modules load and the extensions and trunks register.
Here is the log showing the module loading failing after a “shutdown -r now”
10360 [2022-10-11 08:06:44] ERROR[2067] loader.c: Error loading module 'chan_local.so': /usr/lib64/asterisk/modules/chan_local.so: cannot open shared object file: No such file or directory
10361 [2022-10-11 08:06:44] ERROR[2067] loader.c: Error loading module 'res_pjsip_phoneprov_provider.so', missing dependency: res_phoneprov
10362 [2022-10-11 08:06:44] ERROR[2067] loader.c: res_config_sqlite declined to load.
10363 [2022-10-11 08:06:44] ERROR[2067] loader.c: res_xmpp declined to load.
10364 [2022-10-11 08:06:44] ERROR[2067] loader.c: Declined modules which depend on res_xmpp: chan_motif
10365 [2022-10-11 08:06:44] ERROR[2067] loader.c: res_stun_monitor declined to load.
10366 [2022-10-11 08:06:44] ERROR[2067] loader.c: chan_console declined to load.
10367 [2022-10-11 08:06:44] ERROR[2067] loader.c: chan_skinny declined to load.
10368 [2022-10-11 08:06:44] ERROR[2067] loader.c: chan_ooh323 declined to load.
10369 [2022-10-11 08:06:44] ERROR[2067] loader.c: chan_mobile declined to load.
10370 [2022-10-11 08:06:44] ERROR[2067] loader.c: res_hep declined to load.
10371 [2022-10-11 08:06:44] ERROR[2067] loader.c: Declined modules which depend on res_hep: res_hep_rtcp, res_hep_pjsip
10372 [2022-10-11 08:06:44] ERROR[2067] loader.c: app_agent_pool declined to load.
10373 [2022-10-11 08:06:44] ERROR[2067] loader.c: res_calendar declined to load.
10374 [2022-10-11 08:06:44] ERROR[2067] loader.c: Declined modules which depend on res_calendar: res_calendar_caldav, res_calendar_ews, res_calendar_exchange, res_calendar_icalendar
10375 [2022-10-11 08:06:44] ERROR[2067] loader.c: cdr_csv declined to load.
10376 [2022-10-11 08:06:44] ERROR[2067] loader.c: cdr_odbc declined to load.
10377 [2022-10-11 08:06:44] ERROR[2067] loader.c: app_alarmreceiver declined to load.
10378 [2022-10-11 08:06:44] ERROR[2067] loader.c: app_festival declined to load.
10379 [2022-10-11 08:06:44] ERROR[2067] loader.c: app_followme declined to load.
10380 [2022-10-11 08:06:44] ERROR[2067] loader.c: chan_phone declined to load.
10381 [2022-10-11 08:06:44] ERROR[2067] loader.c: chan_unistim declined to load.
10382 [2022-10-11 08:06:44] ERROR[2067] loader.c: pbx_dundi declined to load.
10383 [2022-10-11 08:06:44] ERROR[2067] loader.c: pbx_lua declined to load.
10384 [2022-10-11 08:06:44] ERROR[2067] loader.c: pbx_ael declined to load.
10385 [2022-10-11 08:06:44] ERROR[2067] loader.c: res_pktccops declined to load.
10386 [2022-10-11 08:06:44] ERROR[2067] loader.c: func_odbc declined to load.
10387 [2022-10-11 08:06:44] ERROR[2067] loader.c: res_prometheus declined to load.
and here is the log after a CLI command “core restart now”
10388 [2022-10-11 08:06:44] VERBOSE[2067] asterisk.c: Asterisk Ready.
10389 [2022-10-11 08:06:44] VERBOSE[9622] res_pjsip/pjsip_options.c: Contact 101/sip:[email protected]:1024;x-ast-orig-host=xxx.xxx.xxx.xxx:5060 is now Unreachable. RTT: 0.000 msec
10390 [2022-10-11 08:07:07] VERBOSE[9622] res_pjsip/pjsip_configuration.c: Endpoint CA-xxxxxxxxx-50 is now Reachable
10391 [2022-10-11 08:07:07] VERBOSE[9622] res_pjsip/pjsip_options.c: Contact xx-xxxxxxxxxx-xxx50/sip:[email protected]:5060 is now Reachable. RTT: 80.153 msec
10392 [2022-10-11 08:07:19] VERBOSE[9622] res_pjsip/pjsip_configuration.c: Endpoint 100 is now Reachable
10393 [2022-10-11 08:07:19] VERBOSE[9622] res_pjsip/pjsip_options.c: Contact 100/sip:[email protected]:5060;x-ast-orig-host=xxx.xxx.xxx.xxx:5060 is now Reachable. RTT: 35.891 msec
10394 [2022-10-11 08:07:41] VERBOSE[9622] res_pjsip/pjsip_configuration.c: Endpoint 101 is now Reachable
10395 [2022-10-11 08:07:41] VERBOSE[9622] res_pjsip/pjsip_options.c: Contact 101/sip:[email protected]:1024;x-ast-orig-host=xxx.xxx.xxx.xxx:5060 is now Reachable. RTT: 37.327 msec
what do you think?