thank you, yes, I did have to change these lines according to my install path , these are my settings:


KAM=/usr/local/kamailio-4.4/sbin/kamailio
KAMCFG=/usr/local/kamailio-4.4/etc/kamailio/kamailio.cfg
PROG=kamailio
PID_FILE=/var/run/kamailio.pid
LOCK_FILE=/var/lock/subsys/kamailio
RETVAL=0
DEFAULTS=/etc/default/kamailio

the directory is created:
[root@ar-mia-proxy-01 ~]# ls -la /var/run/kamailio/
total 0
drwxr-xr-x.  2 root root  40 Aug  4 15:18 .
drwxr-xr-x. 23 root root 640 Aug  4 15:18 ..
[root@ar-mia-proxy-01 ~]#

I am using the "root" user so it has access to it


From: Fabian Borot <fborot@hotmail.com>
Sent: Thursday, August 4, 2016 9:30 AM
To: sr-users@lists.sip-router.org
Subject: Kamailio 4.4 wont start on CentOS 7 using script
 

Hello

I installed/compiled version 4.4 on CentOS 7. When I start the server like this: "./kamctl start" it works but when I try to use the script: "/etc/init.d/kamailio" it fails


 

[root@ar-mia-proxy-01 sbin]# /etc/init.d/kamailio start
Starting kamailio (via systemctl):  Job for kamailio.service failed because the control process exited with error code. See "systemctl status kamailio.service" and "journalctl -xe" for details.
                                                           [FAILED]
[root@ar-mia-proxy-01 sbin]#

when running the "status" I see this:

[root@ar-mia-proxy-01 sbin]# /etc/init.d/kamailio status
â kamailio.service - LSB: Kamailio (OpenSER) - the Open Source SIP Server
   Loaded: loaded (/etc/rc.d/init.d/kamailio)
   Active: failed (Result: exit-code) since Thu 2016-08-04 15:25:59 GMT; 14s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5556 ExecStart=/etc/rc.d/init.d/kamailio start (code=exited, status=1/FAILURE)

Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: Starting LSB: Kamailio (OpenSER) - the Open Source SIP Server...
Aug 04 15:25:59 ar-mia-proxy-01.dom.com kamailio[5556]: Starting kamailio:
Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: kamailio.service: control process exited, code=exited status=1
Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: Failed to start LSB: Kamailio (OpenSER) - the Open Source SIP Server.
Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: Unit kamailio.service entered failed state.
Aug 04 15:25:59 ar-mia-proxy-01.dom.com systemd[1]: kamailio.service failed.
[root@ar-mia-proxy-01 sbin]#

I welcome all ideas, thank you in advance