Commit 2d3441772b for

commit 2d3441772bc29ad504db10bd10ed6f3bf16618cd
Author: Jaco Kroon <>
Date:   Fri Dec 18 21:06:20 2020 +0200

    contrib/systemd: Added note on common issues with systemd and asterisk

    With newer version of linux /var/run/ is a symlink to /run/ that has
    been turned into tmpfs.

    Added note that if asterisk has to bind to a specific IP that
    systemd has to wait until the network is up.

    Added note on how to make sure that the environment variable
    HOSTNAME is included.

    Reported by: Mark Petersen
    Tested by: Mark Petersen

    Change-Id: Ib3e560655befd3e99eec743687144f5569533379

diff --git a/contrib/systemd/asterisk.service b/contrib/systemd/asterisk.service
index c3d46483c7..e654f50232 100644
--- a/contrib/systemd/asterisk.service
+++ b/contrib/systemd/asterisk.service
@@ -1,15 +1,22 @@
 Description=Asterisk PBX and telephony daemon.
+#include these if asterisk need to bind to a specific IP (other than

+#if systemd do not provide hostname and you need to use ${ENV(HOSTNAME)}
 ExecStart=/usr/sbin/asterisk -mqf -C /etc/asterisk/asterisk.conf
 ExecReload=/usr/sbin/asterisk -rx 'core reload'
+#if /var/run is a tmpfs, this will create /var/run/asterisk on start