@jambonz/node-red-contrib-jambonz 2.4.15 → 2.4.16
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 +1 -1
- package/src/nodes/gather.html +26 -0
- package/src/nodes/gather.js +5 -0
package/package.json
CHANGED
package/src/nodes/gather.html
CHANGED
|
@@ -13,10 +13,15 @@
|
|
|
13
13
|
name: {value: ''},
|
|
14
14
|
actionhook: {value: ''},
|
|
15
15
|
actionhookType: {val: 'str'},
|
|
16
|
+
partialresulthook: {value: ''},
|
|
17
|
+
partialresulthookType: {val: 'str'},
|
|
16
18
|
finishonkey: {value: ''},
|
|
17
19
|
dtmfinput: {value: 0},
|
|
18
20
|
speechinput: {value: 1},
|
|
19
21
|
numdigits: {value: ''},
|
|
22
|
+
mindigits: {value: ''},
|
|
23
|
+
maxdigits: {value: ''},
|
|
24
|
+
interdigittimeout: {value: ''},
|
|
20
25
|
timeout: {value: ''},
|
|
21
26
|
bargein: {value: true},
|
|
22
27
|
dtmfbargein: {value: true},
|
|
@@ -72,6 +77,10 @@
|
|
|
72
77
|
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
73
78
|
typeField: $('#node-input-actionhookType')
|
|
74
79
|
});
|
|
80
|
+
$('#node-input-partialresulthook').typedInput({
|
|
81
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
82
|
+
typeField: $('#node-input-partialresulthookType')
|
|
83
|
+
});
|
|
75
84
|
$('#node-input-playurl').typedInput({
|
|
76
85
|
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
77
86
|
typeField: $('#node-input-playurlType')
|
|
@@ -138,6 +147,11 @@
|
|
|
138
147
|
<input type="text" id="node-input-actionhook" placeholder="webhook with results of gather">
|
|
139
148
|
<input type="hidden" id="node-input-actionhookType">
|
|
140
149
|
</div>
|
|
150
|
+
<div class="form-row">
|
|
151
|
+
<label for="node-input-partialresulthook"><i class="icon-tag"></i> Partial result hook</label>
|
|
152
|
+
<input type="text" id="node-input-partialresulthook" placeholder="webhook with interim transcription results of gather">
|
|
153
|
+
<input type="hidden" id="node-input-partialresulthookType">
|
|
154
|
+
</div>
|
|
141
155
|
<fieldset>
|
|
142
156
|
<legend>Prompt</legend>
|
|
143
157
|
<div class="form-row">
|
|
@@ -218,6 +232,18 @@
|
|
|
218
232
|
<label for="node-input-numdigits"><i class="icon-tag"></i> Num. digits</label>
|
|
219
233
|
<input type="text" id="node-input-numdigits" placeholder="number of digits to collect">
|
|
220
234
|
</div>
|
|
235
|
+
<div class="form-row">
|
|
236
|
+
<label for="node-input-mindigits"><i class="icon-tag"></i> Min. digits</label>
|
|
237
|
+
<input type="text" id="node-input-mindigits" placeholder="Minimum number of dtmf digits expected to gather">
|
|
238
|
+
</div>
|
|
239
|
+
<div class="form-row">
|
|
240
|
+
<label for="node-input-maxdigits"><i class="icon-tag"></i> Max. digits</label>
|
|
241
|
+
<input type="text" id="node-input-maxdigits" placeholder="Maximum number of dtmf digits expected to gather">
|
|
242
|
+
</div>
|
|
243
|
+
<div class="form-row">
|
|
244
|
+
<label for="node-input-interdigittimeout"><i class="icon-tag"></i> Inter digit timeout</label>
|
|
245
|
+
<input type="text" id="node-input-interdigittimeout" placeholder="Amount of time to wait between digits after minDigits have been entered">
|
|
246
|
+
</div>
|
|
221
247
|
<div class="form-row">
|
|
222
248
|
<label for="node-input-numtimeout"><i class="icon-tag"></i> Timeout</label>
|
|
223
249
|
<input type="text" id="node-input-timeout" placeholder="dtmf timeout in secs">
|
package/src/nodes/gather.js
CHANGED
|
@@ -12,6 +12,7 @@ module.exports = function(RED) {
|
|
|
12
12
|
|
|
13
13
|
var obj = {verb: 'gather', input: []};
|
|
14
14
|
if (config.actionhook) obj.actionHook = new_resolve(RED, config.actionhook, config.actionhookType, node, msg)
|
|
15
|
+
if (config.partialresulthook) obj.partialResultHook = new_resolve(RED, config.partialresulthook, config.partialresulthookType, node, msg)
|
|
15
16
|
|
|
16
17
|
// input
|
|
17
18
|
if (config.speechinput) {
|
|
@@ -53,6 +54,10 @@ module.exports = function(RED) {
|
|
|
53
54
|
if (config.finishonkey && config.finishonkey.length) obj.finishOnKey = config.finishonkey;
|
|
54
55
|
if (/^\d+$/.test(config.numdigits)) obj.numDigits = parseInt(config.numdigits);
|
|
55
56
|
if (/^\d+$/.test(config.timeout)) obj.timeout = parseInt(config.timeout);
|
|
57
|
+
if (/^\d+$/.test(config.mindigits)) obj.minDigits = parseInt(config.mindigits);
|
|
58
|
+
if (/^\d+$/.test(config.maxdigits)) obj.maxDigits = parseInt(config.maxdigits);
|
|
59
|
+
if (/^\d+$/.test(config.interdigittimeout)) obj.interDigitTimeout = parseInt(config.interdigittimeout);
|
|
60
|
+
|
|
56
61
|
if (config.dtmfbargein) obj.dtmfBargein = config.dtmfbargein;
|
|
57
62
|
}
|
|
58
63
|
|