@onereach/step-voice 7.0.9-VOIC1575.9 → 7.0.9

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.
@@ -49,7 +49,6 @@ class InitiateCall extends voice_1.default {
49
49
  async waitForCall() {
50
50
  const { asr, tts, from: botNumber, endUserNumber, sipHost, sipUser, sipPassword, timeout, headers, enableSpoofCallerId, spoofCallerId, isAMD, otherCallRef, otherCallRefThread, handleCancel } = this.data;
51
51
  const call = await this.fetchData();
52
- const callALegId = headers?.find(h => h.name === 'X-Leg-A')?.value;
53
52
  this.triggers.once(`in/voice/${call.id}/event`, async (event) => {
54
53
  switch (event.params.type) {
55
54
  case 'is_flow_ready': {
@@ -101,46 +100,7 @@ class InitiateCall extends voice_1.default {
101
100
  type: asr.serverSettings.engine
102
101
  }
103
102
  }]
104
- : [],
105
- {
106
- name: 'whisper.hold',
107
- params: {
108
- id: callALegId
109
- }
110
- },
111
- {
112
- name: 'playback',
113
- params: {
114
- 'sections': [
115
- {
116
- 'text': '<speak>This is a live transfer from the automated system. Stand by for connection.</speak>',
117
- 'url': '',
118
- 'bargeInVoice': false,
119
- 'bargeInKeypad': false,
120
- 'textType': 'ssml',
121
- 'provider': 'polly',
122
- 'voiceId': 'Joanna',
123
- 'engine': 'standard',
124
- 'isStream': false,
125
- },
126
- ],
127
- 'useWhisperFeature': false,
128
- 'sensitiveData': {},
129
- resumeAfterGc: true,
130
- }
131
- },
132
- {
133
- name: 'whisper.hold_off',
134
- params: {
135
- id: callALegId
136
- }
137
- },
138
- {
139
- name: 'whisper.transfer',
140
- params: {
141
- id: callALegId
142
- }
143
- },
103
+ : []
144
104
  ]);
145
105
  return this.exitStep('success');
146
106
  }
@@ -218,8 +178,7 @@ class InitiateCall extends voice_1.default {
218
178
  : undefined,
219
179
  timeout: originateTimeout,
220
180
  version: 2,
221
- sessionExpireTime: this.session.expireTime,
222
- useWhisperFeature: false
181
+ sessionExpireTime: this.session.expireTime
223
182
  };
224
183
  if (otherCallRef) {
225
184
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
@@ -2,6 +2,7 @@ import VoiceStep, { TODO, VoiceEvent } from './voice';
2
2
  interface INPUT {
3
3
  conferenceName: string;
4
4
  stayInConference: boolean;
5
+ mute: boolean;
5
6
  volumeIn?: number;
6
7
  volumeOut?: number;
7
8
  }
@@ -6,7 +6,7 @@ const voice_1 = tslib_1.__importDefault(require("./voice"));
6
6
  class JoinConference extends voice_1.default {
7
7
  async runStep() {
8
8
  const call = await this.fetchData();
9
- const { conferenceName, stayInConference, volumeIn, volumeOut } = this.data;
9
+ const { conferenceName, stayInConference, volumeIn, volumeOut, mute } = this.data;
10
10
  this.triggers.local(`in/voice/${call.id}`, async (event) => {
11
11
  switch (event.params.type) {
12
12
  case 'hangup':
@@ -49,7 +49,10 @@ class JoinConference extends voice_1.default {
49
49
  name: 'conference.start',
50
50
  params: {
51
51
  room: conferenceName,
52
- flags: [call.vv >= 3 ? 'mandatory_member_endconf' : 'endconf'],
52
+ flags: [
53
+ call.vv >= 3 ? 'mandatory_member_endconf' : 'endconf',
54
+ ...mute ? ['mute'] : []
55
+ ],
53
56
  stayInConference,
54
57
  volumeIn,
55
58
  volumeOut
@@ -46,8 +46,7 @@ class SayMessage extends voice_1.default {
46
46
  name: 'speak',
47
47
  params: {
48
48
  sections: speechSections,
49
- reporterTranscriptEventId: '',
50
- useWhisperFeature: true
49
+ reporterTranscriptEventId: ''
51
50
  }
52
51
  };
53
52
  const eventId = await this.transcript(call, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.9-VOIC1575.9",
3
+ "version": "7.0.9",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",