@onereach/step-voice 7.0.9-VOIC1575.20 → 7.0.9-VOIC1575.21
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.
- package/dst/Initiate Call.js +14 -21
- package/package.json +1 -1
package/dst/Initiate Call.js
CHANGED
|
@@ -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,
|
|
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,18 +121,24 @@ 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
|
-
|
|
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,
|