From 80be7f6723501f08c83b049af870b849df791f7a Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 15 Dec 2024 11:17:59 -0700 Subject: [PATCH] Fix that lol --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 562c05d..7148e84 100644 --- a/index.js +++ b/index.js @@ -532,7 +532,8 @@ app.get('/api/v1/route/:apiKey/:ani/:number', (req, res) => { } else if (row) { // Check if the ANI is within the block range // If it is, return `local` - if (req.params.ani >= row.block_start && req.params.ani <= row.block_start + row.block_length) { + console.log(`New Call: ${ani} -> ${number}`); + if (ani >= row.block_start && ani <= row.block_start + row.block_length) { res.status(200).send('local'); } else { res.status(200).send(`IAX2/${row.auth}:${row.secret}@${row.server}:${row.port}/${number}`); @@ -562,7 +563,8 @@ app.get('/api/v1', (req, res) => { // Backwards compatibility with TandmX cause } else if (row) { // Check if the ANI is within the block range // If it is, return `local` - if (req.params.ani >= row.block_start && req.params.ani <= row.block_start + row.block_length) { + console.log(`New Call: ${ani} -> ${number}`); + if (ani >= row.block_start && ani <= row.block_start + row.block_length) { res.status(200).send('local'); } else { res.status(200).send(`IAX2/${row.auth}:${row.secret}@${row.server}:${row.port}/${number}`);