@onereach/step-voice 7.0.9-VOIC1575.20 → 7.0.9-VOIC1575.22

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.
@@ -47,9 +47,8 @@ class InitiateCall extends voice_1.default {
47
47
  this.exitStep('cancel');
48
48
  }
49
49
  async waitForCall() {
50
- const { asr, tts, from: botNumber, endUserNumber, sipHost, sipUser, sipPassword, timeout, headers, enableSpoofCallerId, spoofCallerId, isAMD, otherCallRef, otherCallRefThread, handleCancel, enableWhisperTransfer, whisperAnnounceAudio, textType, whisperCustomerConversation, whisperCustomerConversationThread, } = this.data;
50
+ const { asr, tts, from: botNumber, endUserNumber, sipHost, sipUser, sipPassword, timeout, headers, enableSpoofCallerId, spoofCallerId, isAMD, otherCallRef, otherCallRefThread, handleCancel, enableWhisperTransfer, whisperAnnounceAudio, textType, whisperCustomerConversation, } = 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': {
@@ -102,18 +101,6 @@ class InitiateCall extends voice_1.default {
102
101
  }
103
102
  }]
104
103
  : [],
105
- /* {
106
- name: 'whisper.hold',
107
- params: {
108
- id: callALegId
109
- }
110
- }, */
111
- /* {
112
- name: 'whisper.hold_off',
113
- params: {
114
- id: callALegId
115
- }
116
- }, */
117
104
  ];
118
105
  if (enableWhisperTransfer === true) {
119
106
  const ttsSettings = tts.getSettings(call.tts);
@@ -134,22 +121,28 @@ class InitiateCall extends voice_1.default {
134
121
  }
135
122
  };
136
123
  const customerCall = await this.getConversationByName(whisperCustomerConversation ?? '');
137
- // const customerCallId = customerCall.dummy
138
- // const customerCall = this.config.mergeFields[whisperCustomerConversation ?? '']
139
- // customerCall.
140
124
  const transferCommand = {
141
125
  name: 'whisper.transfer',
142
126
  params: {
143
- id: callALegId,
144
- whisperCustomerConversation,
145
- whisperCustomerConversationThread,
146
- customerCall
127
+ aLegId: customerCall['id']
147
128
  }
148
129
  };
130
+ /* {
131
+ name: 'whisper.hold',
132
+ params: {
133
+ id: callALegId
134
+ }
135
+ }, */
136
+ /* {
137
+ name: 'whisper.hold_off',
138
+ params: {
139
+ id: callALegId
140
+ }
141
+ }, */
149
142
  commands.push(...[
150
143
  announceMessageCommand,
151
144
  transferCommand,
152
- { name: 'hangup' }
145
+ // { name: 'hangup' }
153
146
  ]);
154
147
  }
155
148
  await this.sendCommands(newCall, commands);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.9-VOIC1575.20",
3
+ "version": "7.0.9-VOIC1575.22",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",