[asterisk-users] [tip]semicolon trouble: System($(sleep 4; cp 1.call out)&) not working, but System($( sleep 4 && cp 1.call out)&) ; )

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Jul 7 17:13:20 MST 2006


On Fri, Jul 07, 2006 at 08:39:39PM +0200, Robert Michel wrote:
> Salve *!
> 
> Semicolon inside extensions.conf marks the start of the comment,
> so no chance to use it to build a list of bash comments -
> alternative: && and || see:
> 	 man bash | grep -A 33 Lists
> 
> 
> When I try to use my (GSM)mobile to initiate a callback, I found
> out that it would be good, if this callback is delayed with some
> seconds - and I don't want to put it in a external skript
> 	System ($(delayed-callback.sh) &)
> because this would be not so clear, IMHO.
> 
> BTW, I use "$(command1; command2) &" to send the commandlist 
> "command1; command2" into the background, asterisk would go on
> with the dialplan without waiting for finish both commands.
> 
> BUT System($(sleep 4; cp 1.call out)&) Is not working,
> the trick to build a commandlist without ";" is:
>         Sytem($( sleep 4 && cp 1.call /var/spool/asterisk/outgoing) &)

However you should not copy to the outgoing queue. You should mv a file
there.

-- 
Tzafrir Cohen      sip:tzafrir at local.xorcom.com
icq#16849755       iax:tzafrir at local.xorcom.com
+972-50-7952406           
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-users mailing list