Blegh
This commit is contained in:
parent
66be141aad
commit
730508a60a
|
|
@ -221,10 +221,10 @@ class FreepbxManager {
|
||||||
const startExt = process.env.START_EXT ? parseInt(process.env.START_EXT, 10) : 1000;
|
const startExt = process.env.START_EXT ? parseInt(process.env.START_EXT, 10) : 1000;
|
||||||
// Remove duplicates by using a Set
|
// Remove duplicates by using a Set
|
||||||
const existingExtsSet = new Set(exts.map(ext => parseInt(ext.user.extension, 10)));
|
const existingExtsSet = new Set(exts.map(ext => parseInt(ext.user.extension, 10)));
|
||||||
const existingExts = Array.from(existingExtsSet).sort((a, b) => a - b);
|
var existingExts = Array.from(existingExtsSet).sort((a, b) => a - b);
|
||||||
|
|
||||||
// Filter out extensions that are less than the starting extension
|
// Filter out extensions that are less than the starting extension
|
||||||
const filteredExts = existingExts.filter(ext => ext >= startExt);
|
existingExts = existingExts.filter(ext => ext >= startExt);
|
||||||
|
|
||||||
if (process.env.DEBUG == 'true') {
|
if (process.env.DEBUG == 'true') {
|
||||||
console.log(`Existing extensions: ${existingExts.join(', ')}`);
|
console.log(`Existing extensions: ${existingExts.join(', ')}`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue