On Thu, 24 Feb 2011 13:11:02 +0000 (UTC), t...@mountifield.org (Tony
Mountifield) wrote:
>Yes, that is the reason. The easiest thing is probably to put in a delay
>if os.execute allows full shell syntax:

Thanks for the idea.

While reading samples, I happened upon the "system()" application,
which means I can call a script directly from extensions.conf instead
of through AGI.

However, system() seems to launch script synchronously, which means
that using "sleep 10" in the script doesn't solve the issue: Upon
return, the channel is still not available:

===== extensions.conf
exten => h,1,system(/var/tmp/callback.lua)
exten => h,n,NoOp(after running script)
===== callback.lua
os.execute("/bin/sleep 10")
os.execute("mv /var/tmp/callback.call /var/tmp/asterisk/outgoing")
=====

Is there a way to launch a script asynchronously, so that Asterisk
proceeds to the next step immediately, and the script will then wait
10 seconds so that the channel is available again?

Thank you.


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to