@onereach/step-voice 6.1.26-VOIC1449.1 → 6.1.26-VOIC1449.11
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/Transfer.js +5 -0
- package/dst/Wait For Call.js +11 -3
- package/dst/voice.js +4 -1
- package/package.json +1 -1
package/dst/Transfer.js
CHANGED
|
@@ -77,6 +77,11 @@ class Transfer extends voice_1.default {
|
|
|
77
77
|
timeout
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
+
console.log('transfer otherwise', {
|
|
81
|
+
data: { ...this.data },
|
|
82
|
+
headers,
|
|
83
|
+
command
|
|
84
|
+
});
|
|
80
85
|
const muteAfterTransfer = !!muteRecording;
|
|
81
86
|
await this.pauseRecording(call, command, { muteStep: muteAfterTransfer, muteBot: muteAfterTransfer, muteUser: muteAfterTransfer });
|
|
82
87
|
await this.transcript(call, {
|
package/dst/Wait For Call.js
CHANGED
|
@@ -23,7 +23,8 @@ class WaitForCall extends voice_1.default {
|
|
|
23
23
|
}
|
|
24
24
|
async onCall(event) {
|
|
25
25
|
const { asr, tts, endOfInputTimeout } = this.data;
|
|
26
|
-
|
|
26
|
+
this.log.debug('ON_CALL_X', event);
|
|
27
|
+
console.log('ON_CALL_X', { event });
|
|
27
28
|
const call = {
|
|
28
29
|
headers: event.params.headers,
|
|
29
30
|
// @ts-expect-error
|
|
@@ -37,13 +38,20 @@ class WaitForCall extends voice_1.default {
|
|
|
37
38
|
delete call.from;
|
|
38
39
|
delete call.to;
|
|
39
40
|
const presetTime = (Number(endOfInputTimeout) || 0) * 60 * 1000;
|
|
41
|
+
const { sessionId: previousSessionId = '', beginningSessionId = '', } = event?.reporting ?? {};
|
|
40
42
|
await this.session.start({
|
|
41
43
|
timeout: presetTime || defaultSessionTimeout,
|
|
42
44
|
reporting: {
|
|
43
45
|
settingsKey: 'session',
|
|
44
46
|
startedBy: 'Visitor',
|
|
45
|
-
sessionType: 'Phone'
|
|
46
|
-
|
|
47
|
+
sessionType: 'Phone',
|
|
48
|
+
previousSessionId,
|
|
49
|
+
beginningSessionId
|
|
50
|
+
},
|
|
51
|
+
reportingSessions: [{
|
|
52
|
+
previousSessionId,
|
|
53
|
+
beginningSessionId
|
|
54
|
+
}]
|
|
47
55
|
});
|
|
48
56
|
await this.startConversation(call);
|
|
49
57
|
await this.transcript(call, {
|
package/dst/voice.js
CHANGED
|
@@ -63,7 +63,10 @@ class VoiceStep extends step_1.default {
|
|
|
63
63
|
commands,
|
|
64
64
|
step: { key: this.session.key, trd: this.isGlobal ? this.workerThreadId : this.thread.id } // response should be sent to this session
|
|
65
65
|
},
|
|
66
|
-
reporting:
|
|
66
|
+
reporting: {
|
|
67
|
+
...this.session.getSessionRef(),
|
|
68
|
+
// beginningSessionId: 'd75d278c-0846-48e7-8615-46c8d75d3ade'
|
|
69
|
+
}
|
|
67
70
|
}, {
|
|
68
71
|
target: callback,
|
|
69
72
|
invocationType: 'async',
|