@jambonz/node-red-contrib-jambonz 2.4.13 → 2.4.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.
package/package.json
CHANGED
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
to: {value: '', required: true},
|
|
19
19
|
toType: {value: ''},
|
|
20
20
|
dest: {value: 'phone', required: true},
|
|
21
|
-
timeout: {},
|
|
21
|
+
timeout: {validate: RED.validators.regex(/^\d*$/) },
|
|
22
|
+
tag: {required: true},
|
|
23
|
+
tagType: {value: 'json'},
|
|
22
24
|
application: {value: ''},
|
|
23
25
|
appName: {},
|
|
24
26
|
mode: {value: 'app'},
|
|
@@ -91,6 +93,11 @@
|
|
|
91
93
|
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
92
94
|
typeField: $('#node-input-callernameType')
|
|
93
95
|
});
|
|
96
|
+
$('#node-input-tag').typedInput({
|
|
97
|
+
default: $('#node-input-tagType').val(),
|
|
98
|
+
types: ['json', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
99
|
+
typeField: $('#node-input-tagType')
|
|
100
|
+
});
|
|
94
101
|
|
|
95
102
|
var populateApplications = function() {
|
|
96
103
|
var serverId = $('#node-input-server option:selected').val();
|
|
@@ -229,7 +236,11 @@
|
|
|
229
236
|
<div class="form-row">
|
|
230
237
|
<label for="node-input-timeout">Ring timeout</label>
|
|
231
238
|
<input type="text" id="node-input-timeout" placeholder="ring no answer timeout in secs (default: 60)">
|
|
232
|
-
|
|
239
|
+
</div>
|
|
240
|
+
<div class="form-row">
|
|
241
|
+
<label for="node-input-tag">Tag data</label>
|
|
242
|
+
<input type="text" id="node-input-tag" placeholder="tag object">
|
|
243
|
+
<input type="hidden" id="node-input-tagType">
|
|
233
244
|
</div>
|
|
234
245
|
<div class="form-row">
|
|
235
246
|
<label for="node-input-application">Connect to</label>
|
|
@@ -342,8 +353,10 @@
|
|
|
342
353
|
<h3>Properties</h3>
|
|
343
354
|
<p><code>Server</code> - Jambonz server to connect to</p>
|
|
344
355
|
<p><code>From</code> - Calling party phone number</p>
|
|
356
|
+
<p><code>From name</code> - Calling party name</p>
|
|
345
357
|
<p><code>To</code> - Called party phone number, or other identifier</p>
|
|
346
358
|
<p><code>Call type</code> - Type of destination: phone number, registered user, sip endpoint, or microsoft teams</p>
|
|
359
|
+
<p><code>Tag data</code> - Initial set of customer-supplied metadata to associate with the call</p>
|
|
347
360
|
<p><code>Application</code> - Application to execute when call is answered</p>
|
|
348
361
|
<p><code>Webhooks</code> - Webhooks to execute when call is answered</p>
|
|
349
362
|
|
package/src/nodes/create_call.js
CHANGED
|
@@ -21,12 +21,14 @@ module.exports = function(RED) {
|
|
|
21
21
|
|
|
22
22
|
var from = new_resolve(RED, config.from, config.fromType, node, msg);
|
|
23
23
|
var to = new_resolve(RED, config.to, config.toType, node, msg);
|
|
24
|
+
var tag = new_resolve(RED, config.tag, config.tagType, node, msg);
|
|
24
25
|
|
|
25
26
|
const opts = {
|
|
26
27
|
from,
|
|
27
28
|
to: {
|
|
28
29
|
type: config.dest
|
|
29
30
|
},
|
|
31
|
+
tag
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
if (config.headers) {
|
|
@@ -66,6 +68,7 @@ module.exports = function(RED) {
|
|
|
66
68
|
const timeout = parseInt(config.timeout);
|
|
67
69
|
if (timeout > 0) opts.timeout = timeout;
|
|
68
70
|
}
|
|
71
|
+
|
|
69
72
|
switch (config.dest) {
|
|
70
73
|
case 'phone':
|
|
71
74
|
opts.to.number = to;
|