Gwug 5
This commit is contained in:
parent
84561d469d
commit
3cd696d431
7
index.js
7
index.js
|
|
@ -50,7 +50,12 @@ function trigCall(pageType, phone) {
|
||||||
if (!targetNumber) {
|
if (!targetNumber) {
|
||||||
throw new Error(`Phone number is required for page type: ${pageType}`);
|
throw new Error(`Phone number is required for page type: ${pageType}`);
|
||||||
}
|
}
|
||||||
return originateCall(targetNumber, context, 0, timeout, cid);
|
originateCall(targetNumber, context, 0, timeout, cid).then((output) => {
|
||||||
|
console.log(`Call originated: ${output}`);
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error(`Error originating call: ${error}`);
|
||||||
|
});
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function originateCall(number, context, delay, timeout, cid, variables = {}) {
|
function originateCall(number, context, delay, timeout, cid, variables = {}) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue