@onereach/step-voice 6.1.4 → 6.1.5-handlequalitystats.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ interface INPUT {
7
7
  recordAfterTransfer: boolean;
8
8
  recordCall: boolean;
9
9
  choices: TODO[];
10
+ isQualityStatsEnabled: boolean;
10
11
  }
11
12
  interface OUTPUT {
12
13
  type: string;
@@ -30,6 +31,9 @@ interface EVENT extends VoiceEvent {
30
31
  background?: boolean;
31
32
  zombie?: boolean;
32
33
  ack?: boolean;
34
+ cause: {
35
+ callQualityVariables?: Record<string, string>;
36
+ };
33
37
  }
34
38
  export default class GlobalCommand extends VoiceStep<Partial<INPUT>, OUTPUT, EVENT> {
35
39
  get isGlobal(): boolean;
@@ -177,6 +177,7 @@ class GlobalCommand extends voice_1.default {
177
177
  });
178
178
  }
179
179
  async hangup(call) {
180
+ this.log.warn({ event: this.event }, 'event from FS');
180
181
  if (this.event.params.zombie && !this.data.handleZombie) {
181
182
  if (this.state.passive) {
182
183
  this.log.debug('ignore zombie hangup waiting for full hangup');
@@ -215,7 +216,10 @@ class GlobalCommand extends voice_1.default {
215
216
  zombie: this.event.params.zombie,
216
217
  callRecording: this.event.params.callRecording,
217
218
  conversation: this.conversation,
218
- conversationThreadId: this.dataThreadId
219
+ conversationThreadId: this.dataThreadId,
220
+ ...(this.data.isQualityStatsEnabled && {
221
+ audioQualityStats: this.event.params.cause.callQualityVariables
222
+ })
219
223
  });
220
224
  }
221
225
  async exitThread(event, type, stepExit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "6.1.4",
3
+ "version": "6.1.5-handlequalitystats.1",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",