@onereach/step-voice 7.0.43-tooltimeoutresponsemode.1 → 7.0.44-VOIC1805.0
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.d.ts +2 -0
- package/dst/Initiate Call.js +9 -3
- package/package.json +1 -1
package/dst/Initiate Call.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ interface INPUT {
|
|
|
36
36
|
whisperAnnounceAudio?: TODO[];
|
|
37
37
|
whisperCustomerConversation?: string;
|
|
38
38
|
whisperCustomerConversationThread?: string;
|
|
39
|
+
/** If false, inbound Wait for Call gets a new beginningSessionId. Default true. */
|
|
40
|
+
reuseBeginningSessionId?: boolean;
|
|
39
41
|
}
|
|
40
42
|
export default class InitiateCall extends VoiceStep<INPUT, TODO, CallStartEvent> {
|
|
41
43
|
get conversation(): string | import("@onereach/flow-sdk/types").IMergeField;
|
package/dst/Initiate Call.js
CHANGED
|
@@ -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, gatewaySettingsMode, sipHost, sipUser, sipPassword, sipProfile, timeout, headers, enableSpoofCallerId, spoofCallerId, isAMD, otherCallRef, otherCallRefThread, handleCancel, } = this.data;
|
|
50
|
+
const { asr, tts, from: botNumber, endUserNumber, gatewaySettingsMode, sipHost, sipUser, sipPassword, sipProfile, timeout, headers, enableSpoofCallerId, spoofCallerId, isAMD, otherCallRef, otherCallRefThread, handleCancel, reuseBeginningSessionId = true, } = this.data;
|
|
51
51
|
const call = await this.fetchData();
|
|
52
52
|
this.triggers.once(`in/voice/${call.id}/event`, async (event) => {
|
|
53
53
|
switch (event.params.type) {
|
|
@@ -193,6 +193,12 @@ class InitiateCall extends voice_1.default {
|
|
|
193
193
|
gateway,
|
|
194
194
|
maxLoops: this.session.data?.loopPrevention?.enabled && this.session.data.loopPrevention.maxLoops,
|
|
195
195
|
};
|
|
196
|
+
if (reuseBeginningSessionId === false) {
|
|
197
|
+
params.reporting = {
|
|
198
|
+
...this.session.getSessionRef(),
|
|
199
|
+
beginningSessionId: '',
|
|
200
|
+
};
|
|
201
|
+
}
|
|
196
202
|
if (otherCallRef) {
|
|
197
203
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
198
204
|
const otherThread = this.process.getSafeThread(otherCallRefThread || this.thread.id);
|
|
@@ -207,14 +213,14 @@ class InitiateCall extends voice_1.default {
|
|
|
207
213
|
await this.thread.emitAsync({
|
|
208
214
|
target: 'provider',
|
|
209
215
|
name: 'out/voice/originate',
|
|
210
|
-
params
|
|
216
|
+
params,
|
|
211
217
|
});
|
|
212
218
|
}
|
|
213
219
|
else {
|
|
214
220
|
await this.thread.emitAsync({
|
|
215
221
|
target: 'provider',
|
|
216
222
|
name: 'out/voice/originate/v2',
|
|
217
|
-
params
|
|
223
|
+
params,
|
|
218
224
|
});
|
|
219
225
|
}
|
|
220
226
|
});
|