From b8ef1dba73e6f2196fff713116924f6333a24ce2 Mon Sep 17 00:00:00 2001 From: akirilyuk Date: Tue, 1 Feb 2022 12:01:53 +0100 Subject: [PATCH] add test log --- lib/tasks/cognigy/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tasks/cognigy/index.js b/lib/tasks/cognigy/index.js index d216996b..d033e92a 100644 --- a/lib/tasks/cognigy/index.js +++ b/lib/tasks/cognigy/index.js @@ -104,7 +104,7 @@ class Cognigy extends Task { this.client.on('error', this._onBotError.bind(this, cs, ep)); this.client.on('finalPing', this._onBotFinalPing.bind(this, cs, ep)); await this.client.connect(); - this.client.sendMessage('', {...this.data, ...cs.callInfo}); + this.client.sendMessage('welcome message', {...this.data, ...cs.callInfo}); await this.awaitTaskDone(); } catch (err) { @@ -165,6 +165,7 @@ class Cognigy extends Task { } async _onBotFinalPing(cs, ep) { + this.logger.info({}, "TEST FROM ALEX") this.logger.info({prompts: this.prompts}, 'Cognigy:_onBotFinalPing'); if (this.prompts.length) { const text = this.prompts.join('.'); @@ -225,6 +226,7 @@ class Cognigy extends Task { this.client.sendMessage(utterance); } else { + // if the bot is not connected, should we maybe throw an error here? this.logger.info('Cognigy_onTranscription - not sending user utterance as bot is disconnected'); } } catch (err) { @@ -244,6 +246,7 @@ class Cognigy extends Task { this.client.sendMessage(evt.digits); } else { + // if the bot is not connected, should we maybe throw an error here? this.logger.info('Cognigy_onTranscription - not sending user dtmf as bot is disconnected'); } } catch (err) {