Hello there,
I have upgraded my Ubiquiti EdgeRouter X from 19.10 to 21.02.2, after getting to grips with the DSA transition. Now, I am having issues with asterisk, having advanced from asterisk 1.6 to asterisk 1.8 (default in 21.02.2). All of my configuration works with the latest available packages, but not a callback function, which is reliant on the asterisk module pbx_load.so
, part of the asterisk-pbx-spool package.
I have, to no avail, tried to chase down, where the issue is and it seems to be a permission issue with a spool directory at /var/spool/asterisk
/, being the default in /etc/asterisk/asterisk.conf
as well as startup script /etc/init.d/asterisk
, creating it in the first instance. One of the novel parts of the latest asterisk is, that it is run as the asterisk user, instead of root. When changing the user in the startup script in /etc/init.d/asterisk
, this resolves all the issues and it works.
I have tried to create the directory manually as well as chown
it to asterisk:asterisk, but the module would not load and return the following in an asterisk console:
Mar 29 12:35:13] WARNING[7372]: pbx_spool.c:952 load_module: Unable to create queue directory /var/spool/asterisk/outgoing -- outgoing spool disabled
The thing with this spool directory is, being part of /var
, which is mapped to /tmp
, that it should reside in RAM, rather than flash, as it would write, delete and overwrite things like callback files or voicemails, which are sent via email, hence not burdening the flash.
I was just wondering, if there is some mechanism, by which OpenWrt is keeping other users than root from accessing/writing to it, as I cannot think of any other reason why the directory was not accessible to an asterisk instance run as asterisk user.
Are there any other solutions to this, as running as root is of course a dangerous thing to do, if it can be avoided?