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

Robert Michel news at robertmichel.de
Fri Jul 7 11:39:39 MST 2006


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) &)


Have a nice weekend,
rob



PS: To do not make noise with small tips like this, like
    ("hey I'm a newbee, I have found out somethink usefull..."),
    where are the best places to look first if this ideas are
    already known and documentated?
    Inside the asterisk Handbook was no tip to deal with ";"
    inside "Sytem()"......
   
    And excuse me to send my question about vserver and colored CLI
    twice - I didn't got my mails from the listserver and I thought
    I killed it - in future I will look there first.



More information about the asterisk-users mailing list