[asterisk-users] Waiting before executing System command

Alexander Burke asterisk at alexburke.ca
Mon Oct 30 09:10:27 MST 2006


Hello, Moses!

At 09:20 PM 27/10/2006, you wrote:
>what about
>
>exten => h,n,System(mycommand /some/file /some/other/dir/)
>
>Where "mycommand" is your custom shell script to sleep before moving the file.

That would work, but I'm trying to avoid kludges like that. Hence my 
question about doing it entirely within the dialplan.

Any ideas?


>On 10/27/06, Alexander Burke <asterisk at alexburke.ca> wrote:
>>Hello, all!
>>
>>I'm having a problem with the following snippet that executes upon hangup:
>>
>>exten => h,n,Wait(5)
>>exten => h,n,System(mv /some/file /some/other/dir/)
>>
>>Wait() doesn't want to seem to wait! So instead I tried:
>>
>>exten => h,n,System(sleep 5; mv /tmp/${CALLFILENAME}
>>/var/spool/asterisk/outgoing/)
>>
>>This only executes sleep, not mv. How can I make it wait before
>>moving the file?
>>
>>Thanks in advance!
>
>--
>Alexander Burke, A+, CCNA
>Kingston, Ontario, Canada 



More information about the asterisk-users mailing list