As a common need, I’m using .call files to originate calls from FreePBX.
The problem with copying call files from another system, is that the default ownership of the file is ‘root’, so asterisk can’t write or move the file.
If I could login the sftp session using the ‘asterisk’ linux user - the file would be written with ‘asterisk’ as the owner, which will make life much easier…
Your best bet is probably to take a leaf out of FreePBX’ method/book and add an incron entry to “elevate permissions”, thusly chown then mv the .call file from the unprivileged place you put it to where it needs to be when you transfer them to the server.
Yup - we set up a Bells system at a school that calls the overhead paging and plays a recorded “Bell” for each class change - Stole the code from Asterisk: The Definitive Guide - here: