@jambonz/node-red-contrib-jambonz 2.4.8 → 2.4.10
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 +16 -2
- package/src/nodes/gather.js +4 -1
- package/src/nodes/sip-request.html +13 -13
- package/src/nodes/sip-request.js +3 -3
package/package.json
CHANGED
package/src/nodes/gather.html
CHANGED
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
defaults: {
|
|
13
13
|
name: {value: ''},
|
|
14
14
|
actionhook: {value: ''},
|
|
15
|
-
|
|
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">
|
package/src/nodes/gather.js
CHANGED
|
@@ -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.
|
|
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
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
3
|
var mustacheType = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
value: 'mustache',
|
|
5
|
+
label: 'mustache',
|
|
6
|
+
hasvalue: true,
|
|
7
|
+
icon: 'resources/@jambonz/node-red-contrib-jambonz/icons/mustache.svg'
|
|
8
|
+
}
|
|
9
9
|
RED.nodes.registerType('sip:request',{
|
|
10
10
|
category: 'jambonz',
|
|
11
11
|
color: '#bbabaa',
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
bodyType: {value: 'str'},
|
|
19
19
|
actionHook: {value: ''},
|
|
20
20
|
actionHookType: {value: 'str'} },
|
|
21
|
-
inputs:1,
|
|
22
|
-
outputs:1,
|
|
21
|
+
inputs: 1,
|
|
22
|
+
outputs: 1,
|
|
23
23
|
icon: "font-awesome/fa-cubes",
|
|
24
24
|
label: function() { return this.name || 'sip:request';},
|
|
25
25
|
oneditprepare: function() {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<div class="form-row">
|
|
65
65
|
<label for="node-input-body">SIP Body</label>
|
|
66
66
|
<input type="text" id="node-input-body" placeholder="SIP body">
|
|
67
|
-
<input type="hidden" id="node-input-
|
|
67
|
+
<input type="hidden" id="node-input-bodyType">
|
|
68
68
|
</div>
|
|
69
69
|
<div class="form-row">
|
|
70
70
|
<label for="node-input-actionHook">Action Hook</label>
|
|
@@ -75,12 +75,12 @@
|
|
|
75
75
|
|
|
76
76
|
<!-- Help Text -->
|
|
77
77
|
<script type="text/html" data-help-name="sip:request">
|
|
78
|
-
<p>
|
|
78
|
+
<p>Send a SIP INFO, NOTIFY, or MESSAGE request on an established call leg.</p>
|
|
79
79
|
<h3>Properties</h3>
|
|
80
|
-
<p><code>
|
|
81
|
-
<p><code>
|
|
82
|
-
<p><code>
|
|
83
|
-
<p><code>
|
|
80
|
+
<p><code>Method</code> - SIP method, should be one of INFO, MESSAGE or NOTIFY </p>
|
|
81
|
+
<p><code>Headers</code> - additional SIP headers to include in the response </p>
|
|
82
|
+
<p><code>SIP Body</code> - the body of the SIP request, if any </p>
|
|
83
|
+
<p><code>Action Hook</code> - a webhook to call when the sip request has completed </p>
|
|
84
84
|
|
|
85
85
|
<h3>Outputs</h3>
|
|
86
86
|
<dl class="message-properties">
|
package/src/nodes/sip-request.js
CHANGED
|
@@ -15,10 +15,10 @@ module.exports = function(RED) {
|
|
|
15
15
|
config[key] = false
|
|
16
16
|
};
|
|
17
17
|
});
|
|
18
|
-
if (typeof(config.headers == 'string')){
|
|
19
|
-
config.headers=JSON.parse(config.headers)
|
|
20
|
-
}
|
|
21
18
|
config.headers ? obj.headers = new_resolve(RED, config.headers, config.headersType, node, msg) : null
|
|
19
|
+
if (typeof obj.headers == 'string'){
|
|
20
|
+
obj.headers = JSON.parse(obj.headers)
|
|
21
|
+
}
|
|
22
22
|
config.body ? obj.body = new_resolve(RED, config.body, config.bodyType, node, msg) : null
|
|
23
23
|
config.actionHook ? obj.actionHook = new_resolve(RED, config.actionHook, config.actionHookType, node, msg) : null
|
|
24
24
|
appendVerb(msg, obj)
|