-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinc_vmAnswer.js
35 lines (30 loc) · 1.1 KB
/
inc_vmAnswer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// * inc_vmAnswer.js
function on_dtmf(type, digits, arg)
{
if (digits == "#") {
return allDigits;
}
if (digits == "*") {
return "hangup";
}
console_log("digit: " + digits + "\n");
allDigits += digits;
return(allDigits);
}
function emailNotification() {
if (eMailTo != "") {
console_log(">>>>>>>>>>>>>>>>>>>>>>>>>>>> Sending Email\n");
var tmp_eMailSubject = eMailSubject + sv_caller_id_name + " (" + sv_caller_id_num + ")";
email(eMailFrom, eMailTo, "Subject: " + tmp_eMailSubject, eMailBody, tmp_Filename);
// construct the email notification to cell phone gateway - no file attached
if (Pager_eMailTo != "") {
email(eMailFrom, Pager_eMailTo, "Subject: " + tmp_eMailSubject, tmp_eMailSubject);
}
}
}
function sendPageNotification() {
if (Pager_eMailTo != "") {
console_log(">>>>>>>>>>>>>>>>>>>>>>>>>>>> Sending Page\n");
email(eMailFrom, Pager_eMailTo, "Subject: " + tmp_eMailSubject, tmp_eMailSubject);
}
}