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('error', this._onBotError.bind(this, cs, ep));
|
||||||
this.client.on('finalPing', this._onBotFinalPing.bind(this, cs, ep));
|
this.client.on('finalPing', this._onBotFinalPing.bind(this, cs, ep));
|
||||||
await this.client.connect();
|
await this.client.connect();
|
||||||
this.client.sendMessage('', {...this.data, ...cs.callInfo});
|
this.client.sendMessage('welcome message', {...this.data, ...cs.callInfo});
|
||||||
|
|
||||||
await this.awaitTaskDone();
|
await this.awaitTaskDone();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -165,6 +165,7 @@ class Cognigy extends Task {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _onBotFinalPing(cs, ep) {
|
async _onBotFinalPing(cs, ep) {
|
||||||
|
this.logger.info({}, "TEST FROM ALEX")
|
||||||
this.logger.info({prompts: this.prompts}, 'Cognigy:_onBotFinalPing');
|
this.logger.info({prompts: this.prompts}, 'Cognigy:_onBotFinalPing');
|
||||||
if (this.prompts.length) {
|
if (this.prompts.length) {
|
||||||
const text = this.prompts.join('.');
|
const text = this.prompts.join('.');
|
||||||
@@ -225,6 +226,7 @@ class Cognigy extends Task {
|
|||||||
this.client.sendMessage(utterance);
|
this.client.sendMessage(utterance);
|
||||||
}
|
}
|
||||||
else {
|
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');
|
this.logger.info('Cognigy_onTranscription - not sending user utterance as bot is disconnected');
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -244,6 +246,7 @@ class Cognigy extends Task {
|
|||||||
this.client.sendMessage(evt.digits);
|
this.client.sendMessage(evt.digits);
|
||||||
}
|
}
|
||||||
else {
|
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');
|
this.logger.info('Cognigy_onTranscription - not sending user dtmf as bot is disconnected');
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user