@onereach/step-voice 6.1.26-VOIC1449.11 → 6.1.26-VOIC1449.13

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.
@@ -19,6 +19,7 @@ class InitiateCall extends voice_1.default {
19
19
  }
20
20
  async runStep() {
21
21
  const { callId = uuid.v4() } = this.data;
22
+ this.log.debug('runStep', this.data);
22
23
  if (!this.session.key) {
23
24
  const sessionTimeoutMs = (0, timestring_1.default)(`${this.data.sessionTimeout ?? defaultSessionTimeoutMin} min`, 'ms');
24
25
  await this.session.start({
@@ -27,7 +28,9 @@ class InitiateCall extends voice_1.default {
27
28
  reporting: {
28
29
  settingsKey: 'session',
29
30
  startedBy: 'Bot',
30
- sessionType: 'Phone'
31
+ sessionType: 'Phone',
32
+ // previousSessionId,
33
+ // beginningSessionId
31
34
  }
32
35
  });
33
36
  }
package/dst/voice.js CHANGED
@@ -52,7 +52,7 @@ class VoiceStep extends step_1.default {
52
52
  async sendCommands({ id, type, callback }, commands) {
53
53
  if (lodash_1.default.isEmpty(commands))
54
54
  return;
55
- const result = await this.thread.eventManager.emit({
55
+ const event = {
56
56
  target: this.helpers.providersAccountId,
57
57
  name: `out/voice/${type}`,
58
58
  params: {
@@ -67,7 +67,9 @@ class VoiceStep extends step_1.default {
67
67
  ...this.session.getSessionRef(),
68
68
  // beginningSessionId: 'd75d278c-0846-48e7-8615-46c8d75d3ade'
69
69
  }
70
- }, {
70
+ };
71
+ console.log('sendCommands', { id, type, event });
72
+ const result = await this.thread.eventManager.emit(event, {
71
73
  target: callback,
72
74
  invocationType: 'async',
73
75
  timeout: 5000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/step-voice",
3
- "version": "6.1.26-VOIC1449.11",
3
+ "version": "6.1.26-VOIC1449.13",
4
4
  "author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
5
5
  "contributors": [
6
6
  "Roman Zolotarov",