EXECUTAR COMANDO $command\n"); $server->send($fd, $command . "\n"); $response = ''; while (true) { $response = $server->table->get($fd); // var_dump($response); if ($response['data']) break; sleep(1); } $server->table->set($fd, array( 'agi' => 1, 'data' => '', )); return $response['data']; }; } function agiLogWrapper() { return function ($texto) { print_r("-----> LOG $texto\n"); }; }