@unboundcx/sdk 4.13.13 → 4.13.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/services/voice.js +26 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "4.13.13",
3
+ "version": "4.13.14",
4
4
  "description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/services/voice.js CHANGED
@@ -51,9 +51,27 @@ export class VoiceService {
51
51
  return result;
52
52
  }
53
53
 
54
- async call({ to, from, destination, app, timeout, customHeaders, statusWebhook }) {
54
+ async call({
55
+ to,
56
+ from,
57
+ destination,
58
+ app,
59
+ timeout,
60
+ customHeaders,
61
+ statusWebhook,
62
+ parentCallId,
63
+ }) {
55
64
  this.sdk.validateParams(
56
- { to, from, destination, app, timeout, customHeaders, statusWebhook },
65
+ {
66
+ to,
67
+ from,
68
+ destination,
69
+ app,
70
+ timeout,
71
+ customHeaders,
72
+ statusWebhook,
73
+ parentCallId,
74
+ },
57
75
  {
58
76
  to: { type: 'string', required: true },
59
77
  from: { type: 'string', required: true },
@@ -65,6 +83,11 @@ export class VoiceService {
65
83
  // events (trying/ringing/answered/failed) with `static` fields
66
84
  // merged into each POST body
67
85
  statusWebhook: { type: 'object', required: false },
86
+ // SIP call id of an in-progress call this outbound leg is placed on
87
+ // behalf of (e.g. task-router ringing an agent for a queued caller).
88
+ // Links the leg as a child so sip-processor cascade-cancels it if
89
+ // that caller hangs up while it's still ringing.
90
+ parentCallId: { type: 'string', required: false },
68
91
  },
69
92
  );
70
93
 
@@ -77,6 +100,7 @@ export class VoiceService {
77
100
  timeout,
78
101
  customHeaders,
79
102
  statusWebhook,
103
+ parentCallId,
80
104
  },
81
105
  };
82
106