From ce34963d68fc7682982f057084f4b5cf5431d994 Mon Sep 17 00:00:00 2001 From: lucas cardoso Date: Fri, 25 Feb 2022 10:24:36 -0400 Subject: [PATCH] ajustes genericos --- app/Middleware/ApiAgente.php | 2 +- app/Providers/Positus.php | 4 ++-- config/moments.php | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/Middleware/ApiAgente.php b/app/Middleware/ApiAgente.php index 9562e49..3974619 100644 --- a/app/Middleware/ApiAgente.php +++ b/app/Middleware/ApiAgente.php @@ -384,7 +384,7 @@ class ApiAgente implements IApi $anmeArquivo = CONF_PATH_FILES . $mensagem['id_provedor']; $texto = base64_decode($mensagem['content']); file_put_contents($anmeArquivo, $texto); - $provider->ConvertWavToMp3($anmeArquivo); + $provider->convertWavToMp3($anmeArquivo); $retuno = $provider->enviarMedia( $mensagem['dst'], CONF_MIDDLEWARE_LINKUPLOAD . diff --git a/app/Providers/Positus.php b/app/Providers/Positus.php index c3ca38c..1aeba07 100644 --- a/app/Providers/Positus.php +++ b/app/Providers/Positus.php @@ -239,7 +239,7 @@ class Positus extends Requests implements IApiMedia } return false; } - function ConvertWavToMp3($fileOrig) + function convertWavToMp3($fileOrig) { try { // ffmpeg -i 61f1a021ca8908.72216404_1643308267776 61f1a021ca8908.72216404_1643308267776 @@ -247,7 +247,7 @@ class Positus extends Requests implements IApiMedia exec($cmd); copy($fileOrig . ".mp3", $fileOrig); } catch (\Exception $th) { - //throw $th; + logger('ConvertWavToMp3')->error($th->getMessage()); } } diff --git a/config/moments.php b/config/moments.php index 06c9702..6be8677 100644 --- a/config/moments.php +++ b/config/moments.php @@ -12,9 +12,7 @@ define("CONF_MOMENT_SAUDACAO", 'SAUDACAO'); define("CONF_MOMENT_INICIAR_ATENDIMENTO", 'INICIAR_ATENDIMENTO'); define("CONF_MOMENT_FINALIZAR_ATENDIMENTO", 'FINALIZAR_ATENDIMENTO'); -define("CONF_MOMENT_CANCELAR_FILA", 'CANCELAR_FILA'); -//entrou na fila mas n tem agente logado -define("CONF_MOMENT_ENTRAR_FILA_SEM", 'ENTRAR_FILA_SEM'); -//entrou na fila mas n tem agente livre +define("CONF_MOMENT_CANCELAR_FILA", 'CANCELAR_FILA'); //entrou na fila mas n tem agente logado +define("CONF_MOMENT_ENTRAR_FILA_SEM", 'ENTRAR_FILA_SEM'); //entrou na fila mas n tem agente livre define("CONF_MOMENT_ENTRAR_FILA_COM", 'ENTRAR_FILA_COM'); define("CONF_MOMENT_ERRO_ATEND", 'LOST_CONNECTION');// quando estiver em atendimento e perder a conexão com websocket \ No newline at end of file