Hello,

 

I just installed the latest stable release of Kamailio (I believe 4.3.1) on a debian 8.1 system using the install guide (http://www.kamailio.org/wiki/install/4.3.x/git).

 

Starting kamailio didn’t work using /etc/init.d/kamailio start.

I got the following error:

# /etc/init.d/kamailio start

[....] Starting kamailio (via systemctl): kamailio.serviceFailed to start kamailio.service: Unit kamailio.service failed to load: No such file or directory.

failed!

 

After some googling I found out I have to add a new file named kamailio.service to the /etc/systemd/system/ directory.

 

Kamailio.service:

[Unit]

Description=Kamailio SIP Server

 

[Service]

Type=forking

PIDFile=/var/run/kamailio.pid

ExecStart=/usr/local/sbin/kamctl start

ExecRestart=/usr/local/sbin/kamctl restart

ExecStop=/usr/local/sbin/kamctl stop

 

[Install]

WantedBy=multi-user.target

 

Now I can start kamailio using the command: service kamailio start

 

Is this the correct way of doing this? Does the file need any changes?

 

Regards,

 

Grant