@onereach/step-voice 7.0.44 → 7.0.45-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 +6 -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, do not propagate beginningSessionId to inbound Wait for Call. 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,9 @@ 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.propagateBeginningSessionId = false;
|
|
198
|
+
}
|
|
196
199
|
if (otherCallRef) {
|
|
197
200
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
198
201
|
const otherThread = this.process.getSafeThread(otherCallRefThread || this.thread.id);
|
|
@@ -207,14 +210,14 @@ class InitiateCall extends voice_1.default {
|
|
|
207
210
|
await this.thread.emitAsync({
|
|
208
211
|
target: 'provider',
|
|
209
212
|
name: 'out/voice/originate',
|
|
210
|
-
params
|
|
213
|
+
params,
|
|
211
214
|
});
|
|
212
215
|
}
|
|
213
216
|
else {
|
|
214
217
|
await this.thread.emitAsync({
|
|
215
218
|
target: 'provider',
|
|
216
219
|
name: 'out/voice/originate/v2',
|
|
217
|
-
params
|
|
220
|
+
params,
|
|
218
221
|
});
|
|
219
222
|
}
|
|
220
223
|
});
|