Some functions like, get_variable must be called twice to work, for example:
$var = $agi->get_variable('EXTEN'); $var = $agi->get_variable('EXTEN');
If you call it only one time, $var['data'] has no value.
I have the same problem!!!
The problem is php5 ? Asterisk version ?
this is often due to there being data in the stdin.
Here's an easy fix
add this to the beginning of the evaluate function:
function evaluate($command) {
//clear the buffer stream_set_blocking($this->in,0); do { $line = fgets($this->in); } while ($line);
stream_set_blocking($this->in,1);
Log in to post a comment.
I have the same problem!!!
The problem is php5 ?
Asterisk version ?
this is often due to there being data in the stdin.
Here's an easy fix
add this to the beginning of the evaluate function:
function evaluate($command)
{
//clear the buffer
stream_set_blocking($this->in,0);
do {
$line = fgets($this->in);
} while ($line);
stream_set_blocking($this->in,1);