Call Files Without Permission For Asterisk To Read

Home » Asterisk Users » Call Files Without Permission For Asterisk To Read
Asterisk Users 7 Comments

Hi all, I am syncing call files on my secondary asterisk server but without permission to read for asterisk. So they should be executed when I grant the right permissions (thats when my primary asterisk server crashes or shutsdown somehow). But asterisk only tries to read the file at the time of placing the file. So when i grant right permissions nothing happens. Is there any workaround to this problem?

I need to continue the execution of call files on secondary server if primary server fails. The call files are suppose to retry for 45 mins if the call does not get connected.

Thanks in advance.

7 thoughts on - Call Files Without Permission For Asterisk To Read

  • You could save the call file initially to “/var/spool/asterisk/tmp”, then adjust the permissions as needed and necessary. Finally copy the call file into the “outgoing” directory. This also minimizes the chance that Asterisk tries to execute a partial file, although I don’t know whether one still has to take care of issues like that.


  • ‘mv’ not ‘cp’

    Also, create the file on the same filesystem as the spool directory so
    ‘mv’ isn’t silently ‘promoted’ to ‘cp.’

  • Thanks for the responses.

    Touching a file after setting permissions does not work. Asterisk only looks at the new file only, not all the files in the directory. Restarting asterisk does work, but dont want to do this. Best way i think would be, as suggested by JG, to sync in a tmp directory and at the time of switch-over mv to outgoing directory.