Service asterisk not found Asterisk 13.37 on Debian 10

I’ve installed Asterisk 13.37.0.rc1 on Debian 10 and I have the following issues:

  • I have to run asterisk once when the system boots up, so that other commands such as rasterisk or asterisk -r will work. Of course this is not a big deal since I’ve fixed it by running it with /etc/rc.local.

  • Asterisk service actually doesn’t exist! So I can’t do service asterisk restart (and thus not also systemctl restart asterisk). Here’s the message I get:
    Failed to restart asterisk.service: Unit asterisk.service not found.
    Of course I’ve found a way around this by entering the asterisk CLI and running core restart gracefully/now. However, in our situation, we do need to be able to restart asterisk without entering the asterisk’s CLI as well. Any solutions/thoughts on this? I’ll be thankful.

Also here’s the message I get when I run /usr/sbin/asterisk restart:

Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.

P.S.: Of course also asterisk -x "core restart gracefully/now" could be used to achieve the goal but I’m specifically asking why asterisk service doesn’t exist? Is this an error or normal? Because on earlier versions of asterisk 13 and on Ubuntu 14 we used to run “service asterisk restart” and it worked.

System startup scripts are OS and distribution specific, and are generally user contributed.

However, there is one for Debian, and it should be installed when you run “make config” in the source directory. My initial assumption is that you failed to run “make config” when installing Asterisk.

Note that it is this script, not the Asterisk binary, that takes the “restart” parameter.

The trunk version of the script is at https://github.com/asterisk/asterisk/blob/master/contrib/init.d/rc.debian.asterisk and make config should install it at /etc/init.d/asterisk

1 Like

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