mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
add test log
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user