I am getting the dreaded message below which is due to file permissions.
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
Each time Asterisk is restarted, the file gets re-created but the owner is the asterisk user. Other users do not have permission to write to the file. Because the other users cannot write to the file, any asterisk -r commands cannot be run under their user id…
The link below explains what is happening but doesn’t provide any guidence for a permanent workaround.
Thanks for the reply. OK I understand that the asterisk process now runs as the asterisk user. If I want to create a simple test cron job such as * * * * * /usr/sbin/asterisk -rx ‘rpt localplay /var/lib/asterisk/sounds/hal_cantdo’ it will throw an error because the asterisk.ctl file can only be written to by the asterisk user. If I then modify the permissions of the asterisk.ctl file to allow everyone to have write access the crontab job starts running correctly. So how do I run cron jobs going forward? Without having to reset the permissions on the .ctl file after every Asterisk restart?
Or, to state it more generally, anything you want to interact with asterisk needs to run as the asterisk user. There’s a number of ways to do that, including user crontabs, the /etc/cron.d structure, and even systemd services/timers.
Thanks, that has worked. Douglas Rain (Voice of HAL in 2001 a Space Odessy) is now announcing some of the telemetry on the gateway again giving Allison Smith a rest.