From 12478759ad22bf6aef6db82ba1be65ebd74f1f7f Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sat, 25 Oct 2025 10:19:10 -0600 Subject: [PATCH] Simplify logs --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f6c01a1..78e09ce 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,7 @@ const main = async () => { ); try { + var forwards = {}; const commands = [ 'asterisk -x "database show CF"', 'asterisk -x "database show CFB"', @@ -19,7 +20,6 @@ const main = async () => { console.error(`Error executing command "${command}": ${error}`); continue; } - console.log(`Output for command "${command}":\n${stdout}`); const lines = stdout.split('\n'); for (const line of lines) { @@ -28,10 +28,12 @@ const main = async () => { const type = match[1]; const extension = match[2]; const target = match[3]; - console.log(`Parsed - Type: ${type}, Extension: ${extension}, Target: ${target}`); + + forwards[`${type}/${extension}`] = target; } } } + console.log("Call forwards:", forwards); } catch (err) { console.error(`Unexpected error: ${err}`); }