guh
This commit is contained in:
parent
862c4f0184
commit
86151d7bf9
6
index.js
6
index.js
|
@ -38,13 +38,13 @@ function parseVoicemailData(data) {
|
|||
}
|
||||
|
||||
function getUsers() {
|
||||
var vmData = fs.readFileSync(process.env.DEV ? "./dev/voicemail.conf" : "/etc/asterisk/voicemail.conf").toString()
|
||||
var vmData = fs.readFileSync(process.env.DEV == "true" ? "./dev/voicemail.conf" : "/etc/asterisk/voicemail.conf").toString()
|
||||
voicemailData = parseVoicemailData(extractTextFromRawText(vmData));
|
||||
return voicemailData;
|
||||
}
|
||||
|
||||
function getEndpoints() {
|
||||
if (!process.env.DEV) {
|
||||
if (!process.env.DEV == "true") {
|
||||
const currentEndpoint = execSync('asterisk -x "pjsip show endpoints"').toString();
|
||||
const endpoints = currentEndpoint.split("\n");
|
||||
return endpoints;
|
||||
|
@ -142,7 +142,7 @@ function renderStatusPage() {
|
|||
if (err) {
|
||||
console.error(err);
|
||||
} else {
|
||||
fs.writeFileSync(process.env.DEV ? "./dev/index.html" : "/var/www/html/status/index.html", str);
|
||||
fs.writeFileSync(process.env.DEV == "true" ? "./dev/index.html" : "/var/www/html/status/index.html", str);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue