@onereach/step-voice 7.0.9-VOIC1575.18 → 7.0.9-VOIC1575.19

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.
@@ -23,6 +23,7 @@ interface INPUT {
23
23
  whisperAnnounceAudio?: TODO[];
24
24
  textType?: string;
25
25
  whisperCustomerConversation?: string;
26
+ whisperCustomerConversationThread?: string;
26
27
  }
27
28
  export default class InitiateCall extends VoiceStep<INPUT, TODO, CallStartEvent> {
28
29
  get conversation(): string | import("@onereach/flow-sdk/types").IMergeField;
@@ -47,7 +47,7 @@ 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, } = this.data;
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;
51
51
  const call = await this.fetchData();
52
52
  const callALegId = headers?.find(h => h.name === 'X-Leg-A')?.value;
53
53
  this.triggers.once(`in/voice/${call.id}/event`, async (event) => {
@@ -133,11 +133,16 @@ class InitiateCall extends voice_1.default {
133
133
  reporterTranscriptEventId: '',
134
134
  }
135
135
  };
136
+ // const customerCall = await this.getConversationByName(whisperCustomerConversation ?? '')
137
+ // const customerCallId = customerCall.dummy
138
+ const customerCall = this.config.mergeFields[whisperCustomerConversation ?? ''];
136
139
  const transferCommand = {
137
140
  name: 'whisper.transfer',
138
141
  params: {
139
142
  id: callALegId,
140
- whisperCustomerConversation
143
+ whisperCustomerConversation,
144
+ whisperCustomerConversationThread,
145
+ customerCall
141
146
  }
142
147
  };
143
148
  commands.push(...[
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "7.0.9-VOIC1575.18",
3
+ "version": "7.0.9-VOIC1575.19",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",