diff --git a/index.js b/index.js index 59446c2..ef3931b 100644 --- a/index.js +++ b/index.js @@ -50,7 +50,12 @@ function trigCall(pageType, phone) { if (!targetNumber) { 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 = {}) {