Unable to Set utime

Greeting all,

I am in a bit of a pickle… It seems our PBX likes to crash 2-3 times a day. By crash, I mean all the lines “unregister” and the web page becomes unavailable, but people on the phones can continue talking until the call is completed.

My Engineer and I both believe it has to do with the following error:

pbx_spool.c:309 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/243.call: Operation not permitted

We wrote a little perl script that my call center software uses. It creates the etx.call file locally, then does a mv to the outgoing folder. Essentially a “power dialer”.

So all 65 stations, making 35-60 calls an hour each with this error seems to be bogging down the system. (At least that is what we think).

I read on a different forum someone said I can put a usleep(500); in the pbx_spool.c file to give the system enough time to write the file, which should fix the issue, but I cannot find the pbx_spool.c file to make the change.

So my questions are:

  1. is that error really the cause of the crashing, as nothing else seems to be wrong.

  2. where can I find pbx_spool.c?

I have seen that ‘utime’ error before, and IIRC it is because the .call file is not owned asterisk:asterisk (or whatever group:user asterisk runs as). Are you doing a chown before the mv?

Well the issue is, the file is created on one machine and then moved to the PBX via a mount point and perl script.

You could move the file to a temp location and thn change the owner and permissions.