IssabelFoundation / callcenter

Community Call Center Module using ECCP Protocol.
38 stars 62 forks source link

Extension does not exist #62

Open uribes78 opened 11 months ago

uribes78 commented 11 months ago

when the originate execute a dialstring on _cb_Originate callback if the result is Error and the message is Extension does not exists, the callback fails when try to save at call_progress_log with the message Column 'new_status' cannot be null as shown in the next image:

imagen

This is happening because on the method marcarLlamada at line 546 you are hardcoding the status 'Placing' inside the array to save the initial status, but the property status is set to 'null'. To fix the issue I added the next line:

$this->status = 'Placing';
// Notificar el progreso de la llamada
$paramProgreso = array(
    'datetime_entry'                    =>  date('Y-m-d H:i:s', $timestamp),
    'new_status'                        =>  $this->status,
    'retry'                             =>  $retry,
    'trunk'                             =>  $trunk,
    'id_call_'.$this->tipo_llamada      =>  $this->id_llamada,
    'extra_events'                      =>  $precall_events,
);

because on _cb_Originate there is a condition when $bExito is false if ($this->status == 'Placing') $this->status = 'Failure';, but status property is not defined so the value is set to null and failed.

Hope this can help some else