[Question] Call File to be repeated multiple times

hi all,

I succesfully managed to setup a call file via these instructions.

I would now like to repeat the Call for 10 times to check a phone with auto answer on the far end.

How can I tell Asterisk to do so?

THX

PT-1

I think the best way is to make simple script which will copy file 10 times in /var/spool/asterisk/outgoing/

would you have a quick suggestion on how to do so?

PT-1

Ok,

with the help of a mate I solved it

num=0; while [ $num -le 10 ]; do cp -p 4010.call /var/spool/asterisk/outgoing/4010.call; num=$(expr $num + 1); sleep 15; done

Above copy’s the 4010 script 10x to the location and waits 15 seconds between each turn

It will be better to:
cp … 4010.call /tmp/4010.call
mv /tmp/4010.call /var/spool/asterisk/outgoing/4010.call

They suggest using copy to /tmp/ and then move - of course assumption is /tmp and outgoing are on same partition.

[quote=“bira_more”]It will be better to:
cp … 4010.call /tmp/4010.call
mv /tmp/4010.call /var/spool/asterisk/outgoing/4010.call

They suggest using copy to /tmp/ and then move - of course assumption is /tmp and outgoing are on same partition.[/quote]
Why not just copy directly to /var/spool/asterisk/outgoing?

there may be complications as Asterisk starts reading of the File ASAP and the copy process may not have finished.

My example works for me, but depending on CPU etc. the cp & mv example may be better

[quote=“pt-1”]there may be complications as Asterisk starts reading of the File ASAP and the copy process may not have finished.[/quote]IC your point. In this case, then perhaps a symlink will be better.