@jambonz/node-red-contrib-jambonz 2.4.8 → 2.4.9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/node-red-contrib-jambonz",
3
- "version": "2.4.8",
3
+ "version": "2.4.9",
4
4
  "description": "Node-RED nodes for jambonz platform",
5
5
  "keywords": [
6
6
  "node-red"
@@ -12,12 +12,15 @@
12
12
  defaults: {
13
13
  name: {value: ''},
14
14
  actionhook: {value: ''},
15
- actionhooktype: {val: 'str'},
15
+ actionhookType: {val: 'str'},
16
16
  finishonkey: {value: ''},
17
17
  dtmfinput: {value: 0},
18
18
  speechinput: {value: 1},
19
19
  numdigits: {value: ''},
20
20
  timeout: {value: ''},
21
+ bargein: {value: true},
22
+ dtmfbargein: {value: true},
23
+ listenduringprompt: {value: true},
21
24
  prompttype: {value: 'say'},
22
25
  playurl: {value: ''},
23
26
  playurlType: {value: 'str'},
@@ -203,6 +206,10 @@
203
206
  <input type="checkbox" id="node-input-dtmfinput">
204
207
  </div>
205
208
  <div id="dtmf-input-container">
209
+ <div class="form-row">
210
+ <label for="node-input-dtmfbargein">Allow DTMF bargein</label>
211
+ <input type="checkbox" id="node-input-dtmfbargein">
212
+ </div>
206
213
  <div class="form-row">
207
214
  <label for="node-input-finishonkey"><i class="icon-tag"></i> Finish key</label>
208
215
  <input type="text" id="node-input-finishonkey" placeholder="dtmf key to signal end of input">
@@ -224,6 +231,14 @@
224
231
  <input type="checkbox" id="node-input-speechinput">
225
232
  </div>
226
233
  <div id="speech-input-container">
234
+ <div class="form-row">
235
+ <label for="node-input-bargein">Allow Speech bargein</label>
236
+ <input type="checkbox" id="node-input-bargein">
237
+ </div>
238
+ <div class="form-row">
239
+ <label for="node-input-listenduringprompt">Listen during prompt</label>
240
+ <input type="checkbox" id="node-input-listenduringprompt">
241
+ </div>
227
242
  <div class="form-row">
228
243
  <label for="node-input-transcriptionvendor">Vendor</label>
229
244
  <select id="node-input-transcriptionvendor">
@@ -234,7 +249,6 @@
234
249
  <option value="microsoft">microsoft</option>
235
250
  <option value="ibm">ibm</option>
236
251
  <option value="nuance">nuance</option>
237
-
238
252
  </select>
239
253
  </div>
240
254
  <div class="form-row">
@@ -11,7 +11,7 @@ module.exports = function(RED) {
11
11
  node.log(`config: ${JSON.stringify(config)}`);
12
12
 
13
13
  var obj = {verb: 'gather', input: []};
14
- if (config.actionhook) obj.actionHook = new_resolve(RED, config.actionHook, config.actionHookType, node, msg)
14
+ if (config.actionhook) obj.actionHook = new_resolve(RED, config.actionhook, config.actionhookType, node, msg)
15
15
 
16
16
  // input
17
17
  if (config.speechinput) {
@@ -45,12 +45,15 @@ module.exports = function(RED) {
45
45
  });
46
46
  }
47
47
  obj.recognizer = recognizer;
48
+ if (config.bargein) obj.bargein = config.bargein;
49
+ if (config.listenduringprompt) obj.listenDuringPrompt = config.listenduringprompt;
48
50
  }
49
51
  if (config.dtmfinput) {
50
52
  obj.input.push('digits');
51
53
  if (config.finishonkey && config.finishonkey.length) obj.finishOnKey = config.finishonkey;
52
54
  if (/^\d+$/.test(config.numdigits)) obj.numDigits = parseInt(config.numdigits);
53
55
  if (/^\d+$/.test(config.timeout)) obj.timeout = parseInt(config.timeout);
56
+ if (config.dtmfbargein) obj.dtmfBargein = config.dtmfbargein;
54
57
  }
55
58
 
56
59
  // prompt