Hi,
I am using centos 7. By default on centos 7, the var/run file system is tmpfs. So, when kamailio runs with user and group other than root, it can not create the fifo file.
I set the kamailio service and config files to work on usr/local/var/run/kamailio.
Now, how do i set the kamctl to work with the fifo on /usr/local/var/run/kamailio ?
Uri
Hello,
set FIFOPATH accordingly inside kamctlrc (same location at kamailio.cfg).
Cheers, Daniel
On 31/05/16 10:43, Uri Shacked wrote:
Hi,
I am using centos 7. By default on centos 7, the var/run file system is tmpfs. So, when kamailio runs with user and group other than root, it can not create the fifo file.
I set the kamailio service and config files to work on usr/local/var/run/kamailio.
Now, how do i set the kamctl to work with the fifo on /usr/local/var/run/kamailio ?
Uri
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Tuesday, May 31, 2016 11:43:30 AM Uri Shacked wrote:
Hi,
I am using centos 7. By default on centos 7, the var/run file system is tmpfs. So, when kamailio runs with user and group other than root, it can not create the fifo file.
I set the kamailio service and config files to work on usr/local/var/run/kamailio.
Now, how do i set the kamctl to work with the fifo on /usr/local/var/run/kamailio ?
Uri
I believe CentOS 7 runs systemd. You can have systemd-tmpfilesd create the directory at startup. Here are the systemd unit files I use when building Kamailio RPMs:
## Content of /etc/systemd/kamailio.service [Unit] Description=Kamailio SIP Server Documentation=man:kamailio(8) http://www.kamailio.org/ After=syslog.target network-online.target
[Service] Type=forking User=kamailio Environment=SHM_SIZE=64 Environment=PKG_SIZE=8 ExecStartPre=/usr/sbin/kamailio -c ExecStart=/usr/sbin/kamailio -m $SHM_SIZE -M $PKG_SIZE \ -P /run/kamailio/kamailio.pid ExecStopPost=/usr/bin/rm -f /run/kamailio/kamailio.pid PIDFile=/run/kamailio/kamailio.pid Restart=on-failure RestartSec=30
[Install] WantedBy=multi-user.target
## Content of /etc/tmpfiles.d/kamailio.conf d /run/kamailio 0750 kamailio kamailio
Hello,
I created a wiki page to keep these systemd unit settings -- may be easier to find for someone looking for them:
* https://www.kamailio.org/wiki/tutorials/kamailio-startup-scripts
Anyone feel free to add there more content and tips for startup scripts on various systems.
Cheers, Daniel
On 31/05/16 17:22, Anthony Messina wrote:
## Content of /etc/systemd/kamailio.service [Unit] Description=Kamailio SIP Server Documentation=man:kamailio(8) http://www.kamailio.org/ After=syslog.target network-online.target
[Service] Type=forking User=kamailio Environment=SHM_SIZE=64 Environment=PKG_SIZE=8 ExecStartPre=/usr/sbin/kamailio -c ExecStart=/usr/sbin/kamailio -m $SHM_SIZE -M $PKG_SIZE \ -P /run/kamailio/kamailio.pid ExecStopPost=/usr/bin/rm -f /run/kamailio/kamailio.pid PIDFile=/run/kamailio/kamailio.pid Restart=on-failure RestartSec=30
[Install] WantedBy=multi-user.target
## Content of /etc/tmpfiles.d/kamailio.conf d /run/kamailio 0750 kamailio kamailio