@onereach/step-voice 7.0.44-VOIC1805.3 → 7.0.44
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/Idle Music.js +2 -2
- package/dst/Initiate Call.d.ts +0 -2
- package/dst/Initiate Call.js +3 -6
- package/package.json +2 -1
package/dst/Idle Music.js
CHANGED
|
@@ -22,8 +22,8 @@ class IdleMusic extends voice_1.default {
|
|
|
22
22
|
async runStep() {
|
|
23
23
|
const call = await this.fetchData();
|
|
24
24
|
const { idleDuration, idleMusicDelay, idleMusicEnabled, customIdleMusic, idleMusicUrl } = this.data;
|
|
25
|
-
const idleDurationMs = (0, timestring_1.default)(lodash_1.default.get(idleDuration, 'input', '30s'), lodash_1.default.get(idleDuration, 'outputMode', 'ms'));
|
|
26
|
-
const idleMusicDelayMs = (0, timestring_1.default)(lodash_1.default.get(idleMusicDelay, 'input', '3s'), lodash_1.default.get(idleMusicDelay, 'outputMode', 'ms'));
|
|
25
|
+
const idleDurationMs = (0, timestring_1.default)(lodash_1.default.get(idleDuration, 'input', '30s'), lodash_1.default.get(idleDuration, 'outputMode', 'ms'), {});
|
|
26
|
+
const idleMusicDelayMs = (0, timestring_1.default)(lodash_1.default.get(idleMusicDelay, 'input', '3s'), lodash_1.default.get(idleMusicDelay, 'outputMode', 'ms'), {});
|
|
27
27
|
const { error: validationError } = await schema.validateAsync({
|
|
28
28
|
idleMusicEnabled,
|
|
29
29
|
customIdleMusic,
|
package/dst/Initiate Call.d.ts
CHANGED
|
@@ -36,8 +36,6 @@ 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;
|
|
41
39
|
}
|
|
42
40
|
export default class InitiateCall extends VoiceStep<INPUT, TODO, CallStartEvent> {
|
|
43
41
|
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,
|
|
50
|
+
const { asr, tts, from: botNumber, endUserNumber, gatewaySettingsMode, sipHost, sipUser, sipPassword, sipProfile, timeout, headers, enableSpoofCallerId, spoofCallerId, isAMD, otherCallRef, otherCallRefThread, handleCancel, } = 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,9 +193,6 @@ 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
|
-
}
|
|
199
196
|
if (otherCallRef) {
|
|
200
197
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
201
198
|
const otherThread = this.process.getSafeThread(otherCallRefThread || this.thread.id);
|
|
@@ -210,14 +207,14 @@ class InitiateCall extends voice_1.default {
|
|
|
210
207
|
await this.thread.emitAsync({
|
|
211
208
|
target: 'provider',
|
|
212
209
|
name: 'out/voice/originate',
|
|
213
|
-
params
|
|
210
|
+
params
|
|
214
211
|
});
|
|
215
212
|
}
|
|
216
213
|
else {
|
|
217
214
|
await this.thread.emitAsync({
|
|
218
215
|
target: 'provider',
|
|
219
216
|
name: 'out/voice/originate/v2',
|
|
220
|
-
params
|
|
217
|
+
params
|
|
221
218
|
});
|
|
222
219
|
}
|
|
223
220
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/step-voice",
|
|
3
|
-
"version": "7.0.44
|
|
3
|
+
"version": "7.0.44",
|
|
4
4
|
"author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Roman Zolotarov",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"@onereach/step-conversation": "^1.0.40",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
18
|
"nanoid": "^3.3.4",
|
|
19
|
+
"timestring": "^6.0.0",
|
|
19
20
|
"uuid": "^9.0.0"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|