How to disable to load asterisk?

I am using version 16,
The problem MySQL is loading before the asterisk, so the cel_odbc and cdr_odbc modules do not write data to the database.
Reloading these modules helps resolve the issue.

I’m thinking of running the asterisk through the script, but for this you need to turn it off.

This depends on the OS you are using to run Asterisk, as is the detail of the order in which start-up scripts are run.

That’s the correct order, for Asterisk to be be able to use the database.

Depending on your system, one or chkconfig or systemctl might be of use.

more precisely, on the contrary, the asterisk starts before MySQL I tried it through systemctl - it still loads,
and chkconfig: command not found

I don’t know where to look yet.

systemctl’s not working sounds like an OS problem, not an Asterisk one. The two commands are mutually incompatible, because they relate to two different start-up systems. As such, I wouldn’t expect to find both on one system.

asterisks in the logs

[2021-06-21 19:46:06] WARNING[906] codec_g729a.c: Failed to initialize G.729 copy protection!
[2021-06-21 19:46:06] NOTICE[976] chan_sip.c: Peer ‘SIP_SERVER_LOCAL’ is now Reachable. (1ms / 2000ms)
[2021-06-21 19:46:06] ERROR[906] cdr_mysql.c: Failed to connect to mysql database asterisk on
[2021-06-21 19:46:06] WARNING[906] loader.c: Module ‘cdr_mysql’ has been loaded but may be removed in a future release. Its replacement is ‘cdr_adaptive_odbc’.

I made a crutch, I share

vi /lib/systemd/system/runscript.service
Description=My Script Service
ExecStart=/bin/sh -c “sleep 10 && asterisk -rx ‘module reload’ && asterisk -rx ‘module reload’”

sudo chmod 644 /lib/systemd/system/runscript.service
sudo systemctl daemon-reload
sudo systemctl enable runscript.service

If anyone has a more elegant way to solve this problem, please share.

Thank you.

in /etc/asterisk/modules.conf


preload =>
preload =>


preload =>
preload =>

not effect

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