function existingQueue($pDB) { require_once "modules/agent_console/libs/JSON.php"; $oAgentes = new Agentes($pDB); $extension = $_POST['extension']; $response = $oAgentes->existingQueue($extension); $json = new Services_JSON(); Header('Content-Type: application/json'); return $json->encode($response); }