@onereach/step-voice 1.2202.23 → 1.2202.26
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/Cancel.js +5 -1
- package/dst/Initiate Call.js +4 -5
- package/package.json +1 -1
package/dst/Cancel.js
CHANGED
|
@@ -3,9 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const voice_1 = (0, tslib_1.__importDefault)(require("./voice"));
|
|
5
5
|
class VoiceCancel extends voice_1.default {
|
|
6
|
+
async runBefore() {
|
|
7
|
+
await this.fetchData();
|
|
8
|
+
await this.cancel();
|
|
9
|
+
return super.runBefore();
|
|
10
|
+
}
|
|
6
11
|
async runStep() {
|
|
7
12
|
const channel = await this.fetchData();
|
|
8
|
-
await this.cancel();
|
|
9
13
|
await this.sendCommands(channel, [{ name: 'cancel' }]);
|
|
10
14
|
return this.exitStep('next');
|
|
11
15
|
}
|
package/dst/Initiate Call.js
CHANGED
|
@@ -11,9 +11,8 @@ class InitiateCall extends voice_1.default {
|
|
|
11
11
|
return this.step.dataOut.name;
|
|
12
12
|
}
|
|
13
13
|
async runStep() {
|
|
14
|
-
const { from: botNumber, endUserNumber, sipHost, sipUser, sipPassword, timeout, headers } = this.data;
|
|
14
|
+
const { from: botNumber, endUserNumber, sipHost, sipUser, sipPassword, timeout, headers, originationId = uuid.v4() } = this.data;
|
|
15
15
|
const originateTimeout = timestring(`${timeout || 30} sec`, 'ms'); // timeout or 30 seconds
|
|
16
|
-
const originationId = uuid.v4();
|
|
17
16
|
const customHeaders = _.reduce(headers, (memo, header) => {
|
|
18
17
|
memo[header.name] = `${header.value}`;
|
|
19
18
|
return memo;
|
|
@@ -114,14 +113,14 @@ class InitiateCall extends voice_1.default {
|
|
|
114
113
|
}
|
|
115
114
|
});
|
|
116
115
|
}
|
|
116
|
+
await this.startConversation(channel, {
|
|
117
|
+
events: { [`in/voice/${channel.id}/event`]: {} }
|
|
118
|
+
});
|
|
117
119
|
await this.transcript(channel, {
|
|
118
120
|
action: 'Call Start',
|
|
119
121
|
reportingSettingsKey: 'transcript',
|
|
120
122
|
actionFromBot: true
|
|
121
123
|
});
|
|
122
|
-
await this.startConversation(channel, {
|
|
123
|
-
events: { [`in/voice/${channel.id}/event`]: {} }
|
|
124
|
-
});
|
|
125
124
|
await this.sendCommands(channel, [
|
|
126
125
|
...isAMD
|
|
127
126
|
? [{
|