From 22751e22686a8844f5b8a7c47a880280f5300902 Mon Sep 17 00:00:00 2001 From: Matheo Bonucia Date: Thu, 20 Jun 2024 21:18:57 +0000 Subject: [PATCH] correcoes de encoding e numero durante chamada --- appWebrtc/keypad.js | 61 +++++++++++++++++++-------------------- appWebrtc/simplesipsdk.js | 6 ++-- 2 files changed, 33 insertions(+), 34 deletions(-) diff --git a/appWebrtc/keypad.js b/appWebrtc/keypad.js index 2776ca9e..4511c764 100644 --- a/appWebrtc/keypad.js +++ b/appWebrtc/keypad.js @@ -34,7 +34,7 @@ const KeypadSimplesIP = (function () { }); const createKeyPad = () => { - // Função para verificar e definir o tema inicial + // Funcao para verificar e definir o tema inicial const initialThemeMode = sessionStorage.getItem("themeMode") || "light"; const simplesipStateCall = (initialStateCall) => { let stateCall = initialStateCall; @@ -71,9 +71,7 @@ const KeypadSimplesIP = (function () { //RECEBENDO CHAMADA let otherNumber = "Indefinido"; UASimplesIP.simplesipEvento.on("incomingcall", function (callerNumber) { - if (otherNumber) { - otherNumber = callerNumber; - } + otherNumber = callerNumber; stateCurrent.setStateCall("incomingcall"); }); //FAZENDO CHAMADA @@ -81,7 +79,8 @@ const KeypadSimplesIP = (function () { stateCurrent.setStateCall("outgoingcall"); }); //EM CHAMADA - UASimplesIP.simplesipEvento.on("incall", function () { + UASimplesIP.simplesipEvento.on("incall", function (calleNumber) { + otherNumber = calleNumber; stateCurrent.setStateCall("incall"); }); //NA HOME @@ -96,7 +95,7 @@ const KeypadSimplesIP = (function () { const simplesipCreateContainer = (themeMode) => { let simplesipContainer = document.querySelector(".simplesipContainer"); - // Verifica se já existe um container, e se existir, remove-o + // Verifica se ja existe um container, e se existir, remove-o if (simplesipContainer) { simplesipContainer.remove(); } @@ -116,7 +115,7 @@ const KeypadSimplesIP = (function () { let titles = document.querySelector(".simplesipTitles"); if (titles) { - // Remover todos os próximos irmãos de titles + // Remover todos os pr�ximos irmaos de titles let proximoIrmao = titles.nextSibling; while (proximoIrmao) { let irmaoRemovido = proximoIrmao; @@ -170,7 +169,7 @@ const KeypadSimplesIP = (function () { const titleConfig = document.createElement("div"); titleConfig.id = "titleConfig"; - titleConfig.textContent = "Configurações do usuário"; + titleConfig.textContent = "Configurações de usuário"; const formScreen = document.createElement("form"); formScreen.id = "form"; @@ -219,7 +218,7 @@ const KeypadSimplesIP = (function () { }); divUnregister.appendChild(textoUnregister); divUnregister.appendChild(unregisterBtn); - // Função para criar elementos