#!/usr/bin/php -q 'ATENDIDA' "; $result = pg_query($conexao, $query); $row = pg_fetch_row($result); $agendado = $row[0]; if (!$agendado && $status == '6') { $query = "update pbx_campanha set cmp_status = '5' where upper(cmp_descricao) = upper('$campanha')"; pg_query($query); pg_close(); } write("NOOP STATUS => $status"); read(); write("NOOP AGENDADO => $agendado"); read(); write("HANGUP"); read(); exit; } fclose($in); fclose($stdlog); exit; ?>