@jambonz/node-red-contrib-jambonz 2.3.11 → 2.4.1
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 +5 -5
- package/resources/editor.js +5 -3
- package/resources/icons/mustache.svg +1 -0
- package/src/nodes/{template.js → _template.js} +1 -1
- package/src/nodes/conference.html +11 -4
- package/src/nodes/conference.js +5 -7
- package/src/nodes/config.html +17 -17
- package/src/nodes/config.js +18 -18
- package/src/nodes/create_call.html +11 -4
- package/src/nodes/create_call.js +5 -5
- package/src/nodes/create_sms.html +11 -4
- package/src/nodes/create_sms.js +5 -5
- package/src/nodes/dequeue.html +11 -5
- package/src/nodes/dequeue.js +6 -6
- package/src/nodes/dial.html +25 -20
- package/src/nodes/dial.js +19 -19
- package/src/nodes/dialogflow.html +16 -10
- package/src/nodes/dialogflow.js +10 -11
- package/src/nodes/dtmf.html +8 -2
- package/src/nodes/dtmf.js +3 -3
- package/src/nodes/enqueue.html +10 -4
- package/src/nodes/enqueue.js +5 -7
- package/src/nodes/gather.html +17 -5
- package/src/nodes/gather.js +8 -8
- package/src/nodes/get_alerts.html +9 -3
- package/src/nodes/get_alerts.js +4 -4
- package/src/nodes/get_calls.html +10 -4
- package/src/nodes/get_calls.js +5 -10
- package/src/nodes/get_recent_calls.html +12 -5
- package/src/nodes/get_recent_calls.js +6 -6
- package/src/nodes/lcc.html +12 -5
- package/src/nodes/lcc.js +6 -6
- package/src/nodes/lex.html +25 -10
- package/src/nodes/lex.js +10 -11
- package/src/nodes/libs.js +36 -0
- package/src/nodes/listen.html +14 -7
- package/src/nodes/listen.js +12 -12
- package/src/nodes/message.html +10 -4
- package/src/nodes/message.js +5 -10
- package/src/nodes/pause.html +8 -1
- package/src/nodes/pause.js +2 -3
- package/src/nodes/play.html +9 -1
- package/src/nodes/play.js +2 -2
- package/src/nodes/rasa.html +10 -4
- package/src/nodes/rasa.js +5 -5
- package/src/nodes/redirect.html +7 -1
- package/src/nodes/redirect.js +2 -2
- package/src/nodes/say.html +1 -1
- package/src/nodes/say.js +2 -2
- package/src/nodes/sip-decline.html +8 -2
- package/src/nodes/sip-decline.js +3 -3
- package/src/nodes/sip-refer.html +11 -5
- package/src/nodes/sip-refer.js +6 -6
- package/src/nodes/sip-request.html +9 -3
- package/src/nodes/sip-request.js +4 -4
- package/src/nodes/tag.html +7 -1
- package/src/nodes/tag.js +2 -2
- package/src/nodes/userauth.html +11 -5
- package/src/nodes/userauth.js +6 -6
- /package/src/nodes/{template.html → _template.html} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jambonz/node-red-contrib-jambonz",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Node-RED nodes for jambonz platform",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red"
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"author": "Dave Horton",
|
|
54
54
|
"license": "MIT",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"aws-sdk": "^2.
|
|
56
|
+
"aws-sdk": "^2.1354.0",
|
|
57
57
|
"bent": "^7.3.12",
|
|
58
|
-
"body-parser": "^1.20.
|
|
58
|
+
"body-parser": "^1.20.2",
|
|
59
59
|
"cookie-parser": "^1.4.6",
|
|
60
60
|
"cors": "^2.8.5",
|
|
61
61
|
"hash-sum": "^2.0.0",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"multer": "^1.4.4",
|
|
65
65
|
"mustache": "^4.2.0",
|
|
66
66
|
"on-headers": "^1.0.2",
|
|
67
|
-
"raw-body": "^2.5.
|
|
67
|
+
"raw-body": "^2.5.2",
|
|
68
68
|
"s3-upload-stream": "^1.0.7",
|
|
69
|
-
"ws": "^8.
|
|
69
|
+
"ws": "^8.13.0"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/resources/editor.js
CHANGED
|
@@ -392,9 +392,11 @@
|
|
|
392
392
|
}
|
|
393
393
|
var onXVoiceChanged = function() {
|
|
394
394
|
var voice = xvoiceElem.find(':selected').val();
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
395
|
+
if (voice) {
|
|
396
|
+
node.voice = voice;
|
|
397
|
+
console.log(`voice dropdown changed to ${voice}`);
|
|
398
|
+
voiceElem.val(voice);
|
|
399
|
+
}
|
|
398
400
|
}
|
|
399
401
|
|
|
400
402
|
vendorElem.change(onVendorChanged);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none"><path transform ="rotate(90, 12, 12)" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.5 5H9a2 2 0 0 0-2 2v2c0 1-.6 3-3 3 1 0 3 .6 3 3v2a2 2 0 0 0 2 2h.5m5-14"/></svg>
|
|
@@ -2,7 +2,7 @@ var {createHash} = require('crypto');
|
|
|
2
2
|
const bent = require('bent');
|
|
3
3
|
var mustache = require('mustache');
|
|
4
4
|
mustache.escape = function(text) {return text;};
|
|
5
|
-
var {appendVerb, v_resolve, v_text_resolve, doLCC, doCreateCall, doCreateMessage} = require('./libs')
|
|
5
|
+
var {appendVerb, v_resolve, v_text_resolve, doLCC, doCreateCall, doCreateMessage, new_resolve} = require('./libs')
|
|
6
6
|
|
|
7
7
|
module.exports = function(RED) {
|
|
8
8
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
+
var mustacheType = {
|
|
4
|
+
value: 'mustache',
|
|
5
|
+
label: 'mustache',
|
|
6
|
+
hasvalue: true,
|
|
7
|
+
icon: 'resources/@jambonz/node-red-contrib-jambonz/icons/mustache.svg'
|
|
8
|
+
}
|
|
9
|
+
|
|
3
10
|
RED.nodes.registerType('conference',{
|
|
4
11
|
category: 'jambonz',
|
|
5
12
|
color: '#bbabaa',
|
|
@@ -26,19 +33,19 @@
|
|
|
26
33
|
},
|
|
27
34
|
oneditprepare: function() {
|
|
28
35
|
$('#node-input-conference').typedInput({
|
|
29
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
36
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
30
37
|
typeField: $('#node-input-conferenceType')
|
|
31
38
|
});
|
|
32
39
|
$('#node-input-enterHook').typedInput({
|
|
33
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
40
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
34
41
|
typeField: $('#node-input-enterHookType')
|
|
35
42
|
});
|
|
36
43
|
$('#node-input-waitHook').typedInput({
|
|
37
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
44
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
38
45
|
typeField: $('#node-input-waitHookType')
|
|
39
46
|
});
|
|
40
47
|
$('#node-input-maxParticipants').typedInput({
|
|
41
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
48
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
42
49
|
typeField: $('#node-input-maxParticipantsType')
|
|
43
50
|
});
|
|
44
51
|
}
|
package/src/nodes/conference.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var {appendVerb,
|
|
1
|
+
var {appendVerb, new_resolve} = require('./libs')
|
|
2
2
|
|
|
3
3
|
module.exports = function(RED) {
|
|
4
4
|
/** conference */
|
|
@@ -6,14 +6,12 @@ module.exports = function(RED) {
|
|
|
6
6
|
RED.nodes.createNode(this, config);
|
|
7
7
|
var node = this;
|
|
8
8
|
node.on('input', function(msg) {
|
|
9
|
-
var
|
|
10
|
-
var maxParticipants = /^\d+$/.test(val) ? parseInt(val) : val;
|
|
11
|
-
|
|
9
|
+
var maxParticipants = new_resolve(RED, config.maxParticipants, config.maxParticipantsType, node, msg)
|
|
12
10
|
appendVerb(msg, {
|
|
13
11
|
verb: 'conference',
|
|
14
|
-
name:
|
|
15
|
-
enterHook:
|
|
16
|
-
waitHook:
|
|
12
|
+
name: new_resolve(RED, config.conference, config.conferenceType, node, msg),
|
|
13
|
+
enterHook: new_resolve(RED, config.enterHook, config.enterHookType, node, msg),
|
|
14
|
+
waitHook: new_resolve(RED, config.waitHook, config.waitHookType, node, msg),
|
|
17
15
|
maxParticipants,
|
|
18
16
|
beep: config.beep,
|
|
19
17
|
startConferenceOnEnter: config.startConferenceOnEnter,
|
package/src/nodes/config.html
CHANGED
|
@@ -85,15 +85,15 @@
|
|
|
85
85
|
$('#bargeIn-options').hide()
|
|
86
86
|
|
|
87
87
|
$('#node-input-transcriptionhints').typedInput({
|
|
88
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
88
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
89
89
|
typeField: $('#node-input-transcriptionhintsType')
|
|
90
90
|
});
|
|
91
91
|
$('#node-input-recognizeraltlang').typedInput({
|
|
92
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
92
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
93
93
|
typeField: $('#node-recognizeraltlangType')
|
|
94
94
|
});
|
|
95
95
|
$('#node-input-naics').typedInput({
|
|
96
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
96
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
97
97
|
typeField: $('#node-input-naicsType')
|
|
98
98
|
});
|
|
99
99
|
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
$('#node-input-bargeIn_actionHook').typedInput({
|
|
134
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
134
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
135
135
|
typeField: $('#node-input-bargeIn_actionHookType')
|
|
136
136
|
});
|
|
137
137
|
$('#node-input-bargeIn_input').typedInput({
|
|
@@ -146,23 +146,23 @@
|
|
|
146
146
|
typeField: $('#node-input-bargeIn_inputType')
|
|
147
147
|
});
|
|
148
148
|
$('#node-input-bargeIn_finishOnKey').typedInput({
|
|
149
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
149
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
150
150
|
typeField: $('#node-input-bargeIn_finishOnKeyType')
|
|
151
151
|
});
|
|
152
152
|
$('#node-input-bargeIn_numDigits').typedInput({
|
|
153
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
153
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
154
154
|
typeField: $('#node-input-bargeIn_numDigitsType')
|
|
155
155
|
});
|
|
156
156
|
$('#node-input-bargeIn_minDigits').typedInput({
|
|
157
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
157
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
158
158
|
typeField: $('#node-input-bargeIn_minDigitsType')
|
|
159
159
|
});
|
|
160
160
|
$('#node-input-bargeIn_maxDigits').typedInput({
|
|
161
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
161
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
162
162
|
typeField: $('#node-input-bargeIn_maxDigitsType')
|
|
163
163
|
});
|
|
164
164
|
$('#node-input-bargeIn_interDigitTimeout').typedInput({
|
|
165
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
165
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
166
166
|
typeField: $('#node-input-bargeIn_interDigitTimeoutType')
|
|
167
167
|
});
|
|
168
168
|
|
|
@@ -177,27 +177,27 @@
|
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
$('#node-input-amd_actionHook').typedInput({
|
|
180
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
180
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
181
181
|
typeField: $('#node-input-amd_actionHookType')
|
|
182
182
|
});
|
|
183
183
|
$('#node-input-amd_thresholdWordCount').typedInput({
|
|
184
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
184
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
185
185
|
typeField: $('#node-input-amd_thresholdWordCountType')
|
|
186
186
|
});
|
|
187
187
|
$('#node-input-amd_timers_noSpeechTimeoutMs').typedInput({
|
|
188
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
188
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
189
189
|
typeField: $('#node-input-amd_timers_noSpeechTimeoutMsType')
|
|
190
190
|
});
|
|
191
191
|
$('#node-input-amd_timers_decisionTimeoutMs').typedInput({
|
|
192
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
192
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
193
193
|
typeField: $('#node-input-amd_timers_decisionTimeoutMsType')
|
|
194
194
|
});
|
|
195
195
|
$('#node-input-amd_timers_toneTimeoutMs').typedInput({
|
|
196
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
196
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
197
197
|
typeField: $('#node-input-amd_timers_toneTimeoutMsType')
|
|
198
198
|
});
|
|
199
199
|
$('#node-input-amd_timers_greetingCompletionTimeoutMs').typedInput({
|
|
200
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
200
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
201
201
|
typeField: $('#node-input-amd_timers_greetingCompletionTimeoutMsType')
|
|
202
202
|
});
|
|
203
203
|
|
|
@@ -225,11 +225,11 @@
|
|
|
225
225
|
typeField: $('#node-input-record_actionType')
|
|
226
226
|
});
|
|
227
227
|
$('#node-input-record_siprecServerURL').typedInput({
|
|
228
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
228
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
229
229
|
typeField: $('#node-input-record_siprecServerURLType')
|
|
230
230
|
});
|
|
231
231
|
$('#node-input-record_recordingID').typedInput({
|
|
232
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
232
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
233
233
|
typeField: $('#node-input-record_recordingIDType')
|
|
234
234
|
});
|
|
235
235
|
}
|
package/src/nodes/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var {appendVerb} = require('./libs')
|
|
1
|
+
var {appendVerb, new_resolve} = require('./libs')
|
|
2
2
|
|
|
3
3
|
module.exports = function(RED) {
|
|
4
4
|
function cfg(config) {
|
|
@@ -23,9 +23,9 @@ module.exports = function(RED) {
|
|
|
23
23
|
}
|
|
24
24
|
})
|
|
25
25
|
if (config.transcriptionvendor == 'google'){
|
|
26
|
-
obj.recognizer.hints = config.transcriptionhints
|
|
27
|
-
obj.recognizer.altLanguages = [config.altLanguages]
|
|
28
|
-
obj.recognizer.naicsCode = config.naics
|
|
26
|
+
obj.recognizer.hints = new_resolve(RED, config.transcriptionhints, config.transcriptionhintsType, node, msg)
|
|
27
|
+
obj.recognizer.altLanguages = [new_resolve(RED, config.altLanguages, config.altLanguagesType, node, msg)]
|
|
28
|
+
obj.recognizer.naicsCode = new_resolve(RED, config.naics, config.naicsType, node, msg)
|
|
29
29
|
}
|
|
30
30
|
if (config.transcriptionvendor == 'aws'){
|
|
31
31
|
obj.recognizer.vocabularyName = config.vocabularyname
|
|
@@ -37,30 +37,30 @@ module.exports = function(RED) {
|
|
|
37
37
|
if (config.bargeIn){
|
|
38
38
|
obj.bargeIn = {}
|
|
39
39
|
config.bargeIn_enable != '' ? obj.bargeIn.enable = config.bargeIn_enable : null
|
|
40
|
-
config.bargeIn_actionHook != '' ? obj.bargeIn.actionHook = config.bargeIn_actionHook : null
|
|
40
|
+
config.bargeIn_actionHook != '' ? obj.bargeIn.actionHook = new_resolve(RED, config.bargeIn_actionHook, config.bargeIn_actionHookType, node, msg) : null
|
|
41
41
|
config.bargeIn_input != '' ? obj.bargeIn.input = config.bargeIn_input.split(',') : null
|
|
42
|
-
config.bargeIn_finishOnKey != '' ? obj.bargeIn.finishOnKey = config.bargeIn_finishOnKey : null
|
|
43
|
-
config.bargeIn_numDigits != '' ? obj.bargeIn.numDigits = config.bargeIn_numDigits : null
|
|
44
|
-
config.bargeIn_minDigits != '' ? obj.bargeIn.minDigits = config.bargeIn_minDigits : null
|
|
45
|
-
config.bargeIn_maxDigits != '' ? obj.bargeIn.maxDigits = config.bargeIn_maxDigits : null
|
|
46
|
-
config.bargeIn_interDigitTimeout != '' ? obj.bargeIn.interDigitTimeout = config.bargeIn_interDigitTimeout : null
|
|
42
|
+
config.bargeIn_finishOnKey != '' ? obj.bargeIn.finishOnKey = new_resolve(RED, config.bargeIn_finishOnKey, config.bargeIn_finishOnKeyType, node, msg) : null
|
|
43
|
+
config.bargeIn_numDigits != '' ? obj.bargeIn.numDigits = new_resolve(RED, config.bargeIn_numDigits, config.bargeIn_numDigitsType, node, msg) : null
|
|
44
|
+
config.bargeIn_minDigits != '' ? obj.bargeIn.minDigits = new_resolve(RED, config.bargeIn_minDigits, config.bargeIn_minDigitsType, node, msg) : null
|
|
45
|
+
config.bargeIn_maxDigits != '' ? obj.bargeIn.maxDigits = new_resolve(RED, config.bargeIn_maxDigits, config.bargeIn_maxDigitsType, node, msg) : null
|
|
46
|
+
config.bargeIn_interDigitTimeout != '' ? obj.bargeIn.interDigitTimeout = new_resolve(RED, config.bargeIn_interDigitTimeout, config.bargeIn_interDigitTimeoutType, node, msg) : null
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (config.amd){
|
|
50
50
|
obj.amd = {timers : {}}
|
|
51
|
-
config.amd_actionHook != '' ? obj.amd.actionHook = config.amd_actionHook : null
|
|
52
|
-
config.amd_thresholdWordCount != '' ? obj.amd.thresholdWordCount = config.amd_thresholdWordCount : null
|
|
53
|
-
config.amd_timers_noSpeechTimeoutMs != '' ? obj.amd.timers.noSpeechTimeoutMs = config.amd_timers_noSpeechTimeoutMs : null
|
|
54
|
-
config.amd_timers_decisionTimeoutMs != '' ? obj.amd.timers.decisionTimeoutMs = config.amd_timers_decisionTimeoutMs : null
|
|
55
|
-
config.amd_timers_toneTimeoutMs != '' ? obj.amd.timers.toneTimeoutMs = config.amd_timers_toneTimeoutMs : null
|
|
56
|
-
config.amd_timers_greetingCompletionTimeoutMs != '' ? obj.amd.timers.greetingCompletionTimeoutMs = config.amd_timers_greetingCompletionTimeoutMs : null
|
|
51
|
+
config.amd_actionHook != '' ? obj.amd.actionHook = new_resolve(RED, config.amd_actionHook, config.amd_actionHookType, node, msg) : null
|
|
52
|
+
config.amd_thresholdWordCount != '' ? obj.amd.thresholdWordCount = new_resolve(RED, config.amd_thresholdWordCount, config.amd_thresholdWordCountType, node, msg) : null
|
|
53
|
+
config.amd_timers_noSpeechTimeoutMs != '' ? obj.amd.timers.noSpeechTimeoutMs = new_resolve(RED, config.amd_timers_noSpeechTimeoutMs, config.amd_timers_noSpeechTimeoutMsType, node, msg) : null
|
|
54
|
+
config.amd_timers_decisionTimeoutMs != '' ? obj.amd.timers.decisionTimeoutMs = new_resolve(RED, config.amd_timers_decisionTimeoutMs, config.amd_timers_decisionTimeoutMsType, node, msg) : null
|
|
55
|
+
config.amd_timers_toneTimeoutMs != '' ? obj.amd.timers.toneTimeoutMs = new_resolve(RED, config.amd_timers_toneTimeoutMs, config.amd_timers_toneTimeoutMsType, node, msg) : null
|
|
56
|
+
config.amd_timers_greetingCompletionTimeoutMs != '' ? obj.amd.timers.greetingCompletionTimeoutMs = new_resolve(RED, config.amd_timers_greetingCompletionTimeoutMs, config.amd_timers_greetingCompletionTimeoutMsType, node, msg) : null
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
if (config.record){
|
|
60
60
|
obj.record = {}
|
|
61
61
|
config.record_action != '' ? obj.record.action = config.record_action : null //TODO if multiple, split into array
|
|
62
|
-
config.record_siprecServerURL != '' ? obj.record.siprecServerURL = config.record_siprecServerURL : null
|
|
63
|
-
config.record_recordingID != '' ? obj.record.recordingID = config.record_recordingID : null
|
|
62
|
+
config.record_siprecServerURL != '' ? obj.record.siprecServerURL = new_resolve(RED, config.record_siprecServerURL, config.record_siprecServerURLType, node, msg) : null
|
|
63
|
+
config.record_recordingID != '' ? obj.record.recordingID = new_resolve(RED, config.record_recordingID, config.record_recordingIDType, node, msg) : null
|
|
64
64
|
}
|
|
65
65
|
appendVerb(msg, obj);
|
|
66
66
|
node.send(msg);
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
+
var mustacheType = {
|
|
4
|
+
value: 'mustache',
|
|
5
|
+
label: 'mustache',
|
|
6
|
+
hasvalue: true,
|
|
7
|
+
icon: 'resources/@jambonz/node-red-contrib-jambonz/icons/mustache.svg'
|
|
8
|
+
}
|
|
9
|
+
|
|
3
10
|
RED.nodes.registerType('create-call',{
|
|
4
11
|
category: 'jambonz',
|
|
5
12
|
color: '#aebfb9',
|
|
@@ -59,22 +66,22 @@
|
|
|
59
66
|
|
|
60
67
|
$('#node-input-from').typedInput({
|
|
61
68
|
default: $('#node-input-fromType').val(),
|
|
62
|
-
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
69
|
+
types: ['str','msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
63
70
|
typeField: $('#node-input-fromType')
|
|
64
71
|
});
|
|
65
72
|
$('#node-input-to').typedInput({
|
|
66
73
|
default: $('#node-input-toType').val(),
|
|
67
|
-
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
74
|
+
types: ['str','msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
68
75
|
typeField: $('#node-input-toType')
|
|
69
76
|
});
|
|
70
77
|
$('#node-input-call_hook_url').typedInput({
|
|
71
78
|
default: $('#node-input-call_hook_urlType').val(),
|
|
72
|
-
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
79
|
+
types: ['str','msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
73
80
|
typeField: $('#node-input-call_hook_urlType')
|
|
74
81
|
});
|
|
75
82
|
$('#node-input-call_status_url').typedInput({
|
|
76
83
|
default: $('#node-input-call_status_urlType').val(),
|
|
77
|
-
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
84
|
+
types: ['str','msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
78
85
|
typeField: $('#node-input-call_status_urlType')
|
|
79
86
|
});
|
|
80
87
|
|
package/src/nodes/create_call.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var {
|
|
1
|
+
var {doCreateCall, new_resolve } = require('./libs')
|
|
2
2
|
|
|
3
3
|
module.exports = function(RED) {
|
|
4
4
|
/** Create call */
|
|
@@ -19,8 +19,8 @@ module.exports = function(RED) {
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
var from =
|
|
23
|
-
var to =
|
|
22
|
+
var from = new_resolve(RED, config.from, config.fromType, node, msg)
|
|
23
|
+
var to = new_resolve(RED, config.to, config.toType, node, msg)
|
|
24
24
|
|
|
25
25
|
const opts = {
|
|
26
26
|
from,
|
|
@@ -35,11 +35,11 @@ module.exports = function(RED) {
|
|
|
35
35
|
break
|
|
36
36
|
case 'url':
|
|
37
37
|
opts.call_hook = {
|
|
38
|
-
url:
|
|
38
|
+
url: new_resolve(RED, config.call_hook_url, config.call_hook_urlType, node, msg),
|
|
39
39
|
method: config.call_hook_method
|
|
40
40
|
};
|
|
41
41
|
opts.call_status_hook = {
|
|
42
|
-
url:
|
|
42
|
+
url: new_resolve(RED, config.call_status_url, config.call_status_urlType, node, msg),
|
|
43
43
|
method: config.call_status_method
|
|
44
44
|
};
|
|
45
45
|
opts.speech_synthesis_vendor = config.vendor;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
+
var mustacheType = {
|
|
4
|
+
value: 'mustache',
|
|
5
|
+
label: 'mustache',
|
|
6
|
+
hasvalue: true,
|
|
7
|
+
icon: 'resources/@jambonz/node-red-contrib-jambonz/icons/mustache.svg'
|
|
8
|
+
}
|
|
9
|
+
|
|
3
10
|
RED.nodes.registerType('create-sms',{
|
|
4
11
|
category: 'jambonz',
|
|
5
12
|
color: '#aebfb9',
|
|
@@ -26,22 +33,22 @@
|
|
|
26
33
|
|
|
27
34
|
$('#node-input-from').typedInput({
|
|
28
35
|
default: $('#node-input-fromType').val(),
|
|
29
|
-
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
36
|
+
types: ['str','msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
30
37
|
typeField: $('#node-input-fromType')
|
|
31
38
|
});
|
|
32
39
|
$('#node-input-to').typedInput({
|
|
33
40
|
default: $('#node-input-toType').val(),
|
|
34
|
-
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
41
|
+
types: ['str','msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
35
42
|
typeField: $('#node-input-toType')
|
|
36
43
|
});
|
|
37
44
|
$('#node-input-text').typedInput({
|
|
38
45
|
default: $('#node-input-textType').val(),
|
|
39
|
-
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
46
|
+
types: ['str','msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
40
47
|
typeField: $('#node-input-textType')
|
|
41
48
|
});
|
|
42
49
|
$('#node-input-provider').typedInput({
|
|
43
50
|
default: $('#node-input-providerType').val(),
|
|
44
|
-
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
51
|
+
types: ['str','msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
45
52
|
typeField: $('#node-input-providerType')
|
|
46
53
|
});
|
|
47
54
|
}
|
package/src/nodes/create_sms.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var {
|
|
1
|
+
var {doCreateMessage, new_resolve} = require('./libs')
|
|
2
2
|
|
|
3
3
|
module.exports = function(RED) {
|
|
4
4
|
/** Create sms */
|
|
@@ -19,10 +19,10 @@ function create_sms(config) {
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
var from =
|
|
23
|
-
var to =
|
|
24
|
-
var text =
|
|
25
|
-
var provider =
|
|
22
|
+
var from = new_resolve(RED, config.from, config.fromType, node, msg)
|
|
23
|
+
var to = new_resolve(RED, config.to, config.toType, node, msg)
|
|
24
|
+
var text = new_resolve(RED, config.text, config.textType, node, msg);
|
|
25
|
+
var provider = new_resolve(RED, config.provider, config.providerType, node, msg)
|
|
26
26
|
|
|
27
27
|
const opts = {
|
|
28
28
|
from,
|
package/src/nodes/dequeue.html
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
+
var mustacheType = {
|
|
4
|
+
value: 'mustache',
|
|
5
|
+
label: 'mustache',
|
|
6
|
+
hasvalue: true,
|
|
7
|
+
icon: 'resources/@jambonz/node-red-contrib-jambonz/icons/mustache.svg'
|
|
8
|
+
}
|
|
3
9
|
RED.nodes.registerType('dequeue',{
|
|
4
10
|
category: 'jambonz',
|
|
5
11
|
color: '#bbabaa',
|
|
@@ -25,23 +31,23 @@
|
|
|
25
31
|
},
|
|
26
32
|
oneditprepare: function() {
|
|
27
33
|
$('#node-input-queue').typedInput({
|
|
28
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
34
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
29
35
|
typeField: $('#node-input-queueType')
|
|
30
36
|
});
|
|
31
37
|
$('#node-input-callSid').typedInput({
|
|
32
|
-
types: ['str', 'msg', 'flow', 'global'],
|
|
38
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
33
39
|
typeField: $('#node-input-callSidType')
|
|
34
40
|
});
|
|
35
41
|
$('#node-input-actionHook').typedInput({
|
|
36
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
42
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
37
43
|
typeField: $('#node-input-actionHookType')
|
|
38
44
|
});
|
|
39
45
|
$('#node-input-confirmHook').typedInput({
|
|
40
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
46
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
41
47
|
typeField: $('#node-input-confirmHookType')
|
|
42
48
|
});
|
|
43
49
|
$('#node-input-timeout').typedInput({
|
|
44
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
50
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
45
51
|
typeField: $('#node-input-timeoutType')
|
|
46
52
|
});
|
|
47
53
|
}
|
package/src/nodes/dequeue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var {appendVerb,
|
|
1
|
+
var {appendVerb, new_resolve} = require('./libs')
|
|
2
2
|
|
|
3
3
|
module.exports = function(RED) {
|
|
4
4
|
/** dequeue */
|
|
@@ -6,14 +6,14 @@ module.exports = function(RED) {
|
|
|
6
6
|
RED.nodes.createNode(this, config);
|
|
7
7
|
var node = this;
|
|
8
8
|
node.on('input', function(msg, send, done) {
|
|
9
|
-
const timeout =
|
|
9
|
+
const timeout = new_resolve(RED, config.timeout, config.timeoutType, node, msg);
|
|
10
10
|
appendVerb(msg, {
|
|
11
11
|
verb: 'dequeue',
|
|
12
|
-
name:
|
|
13
|
-
callSid:
|
|
12
|
+
name: new_resolve(RED, config.queue, config.queueType, node, msg),
|
|
13
|
+
callSid: new_resolve(RED, config.callSid, config.callSidType, node, msg),
|
|
14
14
|
beep: config.beep,
|
|
15
|
-
actionHook:
|
|
16
|
-
confirmHook:
|
|
15
|
+
actionHook: new_resolve(RED, config.actionHook, config.actionHookType, node, msg),
|
|
16
|
+
confirmHook: new_resolve(RED, config.confirmHook, config.confirmHookType, node, msg),
|
|
17
17
|
timeout: (/^\d+$/.test(timeout)) ? parseInt(timeout) : null,
|
|
18
18
|
});
|
|
19
19
|
node.send(msg);
|
package/src/nodes/dial.html
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
+
var mustacheType = {
|
|
4
|
+
value: 'mustache',
|
|
5
|
+
label: 'mustache',
|
|
6
|
+
hasvalue: true,
|
|
7
|
+
icon: 'resources/@jambonz/node-red-contrib-jambonz/icons/mustache.svg'
|
|
8
|
+
}
|
|
3
9
|
RED.nodes.registerType('dial',{
|
|
4
10
|
category: 'jambonz',
|
|
5
11
|
color: '#bbabaa',
|
|
6
12
|
defaults: {
|
|
7
13
|
name: {value: ''},
|
|
8
|
-
targets:{value:[{type: 'phone', dest: '', user: '', pass: '',
|
|
14
|
+
targets:{value:[{type: 'phone', dest: '', user: '', pass: '', destType: 'str', trunk: '', trunkType: 'str'}]},
|
|
9
15
|
headers: {value: []},
|
|
10
16
|
actionhook: {value: ''},
|
|
11
17
|
actionhookType: {value: 'str'},
|
|
@@ -61,67 +67,66 @@
|
|
|
61
67
|
oneditprepare: function() {
|
|
62
68
|
var node = this;
|
|
63
69
|
$('#node-input-callerid').typedInput({
|
|
64
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
70
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
65
71
|
typeField: $('#node-input-calleridType')
|
|
66
72
|
});
|
|
67
73
|
$('#node-input-target-property-trunk').typedInput({
|
|
68
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
74
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
69
75
|
typeField: $('#node-input-target-property-trunk')
|
|
70
76
|
});
|
|
71
77
|
$('#node-input-actionhook').typedInput({
|
|
72
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
78
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
73
79
|
typeField: $('#node-input-actionhookType')
|
|
74
80
|
});
|
|
75
81
|
$('#node-input-confirmhook').typedInput({
|
|
76
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
82
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
77
83
|
typeField: $('#node-input-confirmhookType')
|
|
78
84
|
});
|
|
79
85
|
$('#node-input-dialmusic').typedInput({
|
|
80
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
86
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
81
87
|
typeField: $('#node-input-dialmusicType')
|
|
82
88
|
});
|
|
83
89
|
$('#node-input-dtmfcapture').typedInput({
|
|
84
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
90
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
85
91
|
typeField: $('#node-input-dtmfcaptureType')
|
|
86
92
|
});
|
|
87
93
|
$('#node-input-dtmfhook').typedInput({
|
|
88
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
94
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
89
95
|
typeField: $('#node-input-dtmfhookType')
|
|
90
96
|
});
|
|
91
97
|
$('#node-input-transcribeurl').typedInput({
|
|
92
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
98
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
93
99
|
typeField: $('#node-input-transcribeurlType')
|
|
94
100
|
});
|
|
95
101
|
$('#node-input-listenurl').typedInput({
|
|
96
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
102
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
97
103
|
typeField: $('#node-input-listenurlType')
|
|
98
104
|
});
|
|
99
105
|
$('#node-input-transcriptionhook').typedInput({
|
|
100
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
106
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
101
107
|
typeField: $('#node-input-transcriptionhookType')
|
|
102
108
|
});
|
|
103
109
|
$('#node-input-transcriptionhints').typedInput({
|
|
104
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
110
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
105
111
|
typeField: $('#node-input-transcriptionhintsType')
|
|
106
112
|
});
|
|
107
113
|
$('#node-input-recognizeraltlang').typedInput({
|
|
108
|
-
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
114
|
+
types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
109
115
|
typeField: $('#node-recognizeraltlangType')
|
|
110
116
|
});
|
|
111
117
|
$('#node-input-diarizationmin').typedInput({
|
|
112
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
118
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
113
119
|
typeField: $('#node-input-diarizationminType')
|
|
114
120
|
});
|
|
115
121
|
$('#node-input-diarizationmax').typedInput({
|
|
116
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
122
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
117
123
|
typeField: $('#node-input-diarizationmaxType')
|
|
118
124
|
});
|
|
119
125
|
$('#node-input-naics').typedInput({
|
|
120
|
-
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env'],
|
|
126
|
+
types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
|
|
121
127
|
typeField: $('#node-input-naicsType')
|
|
122
128
|
});
|
|
123
129
|
|
|
124
|
-
console.log('oneditprepare - dial');
|
|
125
130
|
prepareSttControls(node);
|
|
126
131
|
|
|
127
132
|
$('#node-input-target-container').css('min-height','180px').css('min-width','450px').editableList({
|
|
@@ -134,7 +139,7 @@
|
|
|
134
139
|
dest: '',
|
|
135
140
|
user: '',
|
|
136
141
|
pass: '',
|
|
137
|
-
|
|
142
|
+
destType: 'str',
|
|
138
143
|
trunk: '',
|
|
139
144
|
trunkType: 'str'
|
|
140
145
|
};
|
|
@@ -159,7 +164,7 @@
|
|
|
159
164
|
}
|
|
160
165
|
var propertyName = $('<input/>', {class:"node-input-target-property-name", type:"text"})
|
|
161
166
|
.appendTo(row1)
|
|
162
|
-
.typedInput({types: ['str', 'msg', 'flow', 'global']});
|
|
167
|
+
.typedInput({types: ['str', 'msg', 'flow', 'global','jsonata', 'env', mustacheType]});
|
|
163
168
|
|
|
164
169
|
$('<label style="padding-top:8px; padding-right:20px">Auth Username:</label>')
|
|
165
170
|
.appendTo(row2);
|
|
@@ -189,7 +194,7 @@
|
|
|
189
194
|
placeholder: 'Specify the name of the trunk used for this outbound call'
|
|
190
195
|
})
|
|
191
196
|
.appendTo(row5)
|
|
192
|
-
.typedInput({types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env']});
|
|
197
|
+
.typedInput({types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType]});
|
|
193
198
|
|
|
194
199
|
selectField.on('change', function() {
|
|
195
200
|
var type = $(this).val();
|