From 9c0d909f6b1ca8cfd185995b4165ad48169b4991 Mon Sep 17 00:00:00 2001 From: uribes78 Date: Fri, 22 Sep 2023 09:43:41 -0700 Subject: [PATCH] Update Llamada.class.php When originate start a call, the status of the instance is not set, so when callback is executed and the Originate fail, set the status to null when trying to save at database, and fail because the table `call_progress_log` does not allow null at `new_status` column --- setup/dialer_process/dialer/Llamada.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/dialer_process/dialer/Llamada.class.php b/setup/dialer_process/dialer/Llamada.class.php index f6f71eb..e9348e2 100644 --- a/setup/dialer_process/dialer/Llamada.class.php +++ b/setup/dialer_process/dialer/Llamada.class.php @@ -540,10 +540,11 @@ public function marcarLlamada($ami, $sFuente, $iTimeoutOriginate, if (!in_array($this->tipo_llamada, array('outgoing'))) return FALSE; + $this->status = 'Placing'; // Notificar el progreso de la llamada $paramProgreso = array( 'datetime_entry' => date('Y-m-d H:i:s', $timestamp), - 'new_status' => 'Placing', + 'new_status' => $this->status, 'retry' => $retry, 'trunk' => $trunk, 'id_campaign_'.$this->tipo_llamada => $this->campania->id, @@ -1227,4 +1228,4 @@ public function _cb_Park($r, $sFuente, $ami, $timestamp) } } } -?> \ No newline at end of file +?>