First off I’m new to Asterisk 18 and new to systemd.
I have years working with older Asterisk versions (up to 16) and WITHOUT systemd
This is my first attempt in a couple of years to try newer stuff.
And naturally it feels buggy and like “nothing works”.
I am simply trying to get a fresh out of the box build of Asterisk 18.1 to start and stop with systemd.
Asterisk starts and stops just fine at the command prompt without systemd.
However if I try a “sysctl start asterisk”
It just hangs and I never get the command prompt back.
Asterisk itself appears to start and run + proecess a local test SIP call however asterisk -r does not work
I Get: Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Looking at /lib/systemd/system/asterisk.service
[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target
[Service]
Type=notify
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
User=asterisk
Group=asterisk
ExecStart=/usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf
ExecReload=/usr/sbin/asterisk -rx ‘core reload’
What is created by asterisk build and install has “Type=Notify”
If I change this to “Type=simple”
In now works as in I can start and stop it.
I do not know the different between “Notify” and “simple”
And I do not know why the Asterisk build and install set it to “Notify”
And what I have broken or what I lose by changing it to “simple”
Or how to fix it when et to “Notify”
Trying to find clear cut information about systemd and how to manage it is amazingly difficult to impossible for something that is supposed to be so great and wonderful.
Any help or pointers around this would be absolutely awesome.
As well as ANY information that is useful for somebody new jumping into systemd.
It would be nice could get myself a clue as to how to manage it and actually troubleshoot it when things
are not magically working.
Anything I have found so far has been far more confusing than helpful.