ESL execute is async, so you will need to wait for the correct event to be returned, that tells you it's finished. EXECUTE_COMPLETE I think the event is called.. /Peter 29 mar 2012 kl. 16:57 skrev "Alex Crow" <acrow@integrafin.co.uk>:
"execute
execute($app[, $arg][, $uuid])
Execute a dialplan application, and wait for a response from the server. On socket connections not anchored to a channel (most of the time inbound), all three arguments are required -- $uuid specifies the channel to execute the application on.
Returns an ESLevent object containing the response from the server. The getHeader("Reply-Text") method of this ESLevent object returns the server's response. The server's response will contain "+OK [Success Message]" on success or "-ERR [Error Message]" on failure.
See the examples below for information on how to get a uuid to use when calling execute().
executeAsync
executeAsync($app[, $arg][, $uuid])
Same as execute, but doesn't wait for a response from the server.
This works by causing the underlying call to execute() to append "async: true" header in the message sent to the channel. "