@jambonz/node-red-contrib-jambonz 2.3.1 → 2.3.2
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 +4 -4
- package/src/nodes/auth.html +9 -16
- package/src/nodes/auth.js +2 -9
- package/src/nodes/conference.html +12 -15
- package/src/nodes/conference.js +0 -4
- package/src/nodes/config.js +0 -4
- package/src/nodes/create_call.html +7 -16
- package/src/nodes/create_call.js +2 -6
- package/src/nodes/create_sms.html +3 -15
- package/src/nodes/create_sms.js +0 -5
- package/src/nodes/dequeue.html +6 -8
- package/src/nodes/dequeue.js +0 -4
- package/src/nodes/dial.html +3 -8
- package/src/nodes/dial.js +0 -5
- package/src/nodes/dialogflow.html +3 -13
- package/src/nodes/dialogflow.js +0 -5
- package/src/nodes/dtmf.html +5 -11
- package/src/nodes/dtmf.js +0 -5
- package/src/nodes/enqueue.html +7 -14
- package/src/nodes/enqueue.js +0 -6
- package/src/nodes/gather.html +3 -8
- package/src/nodes/gather.js +0 -5
- package/src/nodes/get_alerts.html +5 -27
- package/src/nodes/get_alerts.js +14 -16
- package/src/nodes/get_calls.html +6 -28
- package/src/nodes/get_calls.js +36 -36
- package/src/nodes/get_recent_calls.html +25 -27
- package/src/nodes/get_recent_calls.js +21 -21
- package/src/nodes/hangup.html +5 -11
- package/src/nodes/hangup.js +2 -7
- package/src/nodes/lcc.html +12 -19
- package/src/nodes/lcc.js +0 -4
- package/src/nodes/leave.html +4 -5
- package/src/nodes/leave.js +0 -6
- package/src/nodes/lex.html +5 -3
- package/src/nodes/lex.js +0 -5
- package/src/nodes/listen.html +2 -3
- package/src/nodes/listen.js +0 -5
- package/src/nodes/message.html +5 -6
- package/src/nodes/message.js +30 -30
- package/src/nodes/pause.html +5 -8
- package/src/nodes/pause.js +0 -6
- package/src/nodes/play.html +7 -10
- package/src/nodes/play.js +0 -5
- package/src/nodes/rasa.html +5 -13
- package/src/nodes/rasa.js +1 -5
- package/src/nodes/redirect.html +4 -8
- package/src/nodes/redirect.js +0 -6
- package/src/nodes/s3-upload.html +0 -2
- package/src/nodes/s3-upload.js +1 -6
- package/src/nodes/say.html +5 -7
- package/src/nodes/say.js +0 -4
- package/src/nodes/sip-decline.html +5 -8
- package/src/nodes/sip-decline.js +0 -5
- package/src/nodes/sip-refer.html +4 -12
- package/src/nodes/sip-refer.js +1 -5
- package/src/nodes/sip-request.html +5 -11
- package/src/nodes/sip-request.js +1 -8
- package/src/nodes/tag.html +2 -4
- package/src/nodes/tag.js +0 -5
- package/src/nodes/template.html +7 -16
- package/src/nodes/userauth.html +47 -21
- package/src/nodes/userauth.js +18 -6
- package/src/nodes/webhooks.html +26 -29
- package/src/utils/http-helpers.js +5 -4
- package/src/utils/tts-utils.js +1 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jambonz/node-red-contrib-jambonz",
|
|
3
|
-
"version": "2.3.
|
|
4
|
-
"description": "Node-RED nodes for jambonz",
|
|
3
|
+
"version": "2.3.2",
|
|
4
|
+
"description": "Node-RED nodes for jambonz platform",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-red"
|
|
7
7
|
],
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"author": "Dave Horton",
|
|
54
54
|
"license": "MIT",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"aws-sdk": "^2.
|
|
56
|
+
"aws-sdk": "^2.1302.0",
|
|
57
57
|
"bent": "^7.3.12",
|
|
58
58
|
"body-parser": "^1.20.1",
|
|
59
59
|
"cookie-parser": "^1.4.6",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"on-headers": "^1.0.2",
|
|
67
67
|
"raw-body": "^2.5.1",
|
|
68
68
|
"s3-upload-stream": "^1.0.7",
|
|
69
|
-
"ws": "^8.
|
|
69
|
+
"ws": "^8.12.1"
|
|
70
70
|
}
|
|
71
71
|
}
|
package/src/nodes/auth.html
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
-
|
|
4
3
|
RED.nodes.registerType('jambonz_auth',{
|
|
5
4
|
category: 'config',
|
|
6
5
|
defaults: {
|
|
@@ -20,13 +19,16 @@
|
|
|
20
19
|
{value: 'https://api.jambonz.us', label : 'jambonz.us', hasValue: false},
|
|
21
20
|
{value: 'https://api.jambonz.xyz', label : 'jambonz.xyz', hasValue: false}],
|
|
22
21
|
typeField: $('#node-config-input-urlType')
|
|
23
|
-
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
oneditsave: function() {
|
|
25
|
+
const baseUrl = $('#node-config-input-url').val();
|
|
26
|
+
if (baseUrl.endsWith('/')) {
|
|
27
|
+
$('#node-config-input-url').val(baseUrl.slice(0, -1));
|
|
28
|
+
}
|
|
24
29
|
}
|
|
25
30
|
});
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
32
|
RED.nodes.registerType('aws_auth',{
|
|
31
33
|
category: 'config',
|
|
32
34
|
credentials: {
|
|
@@ -43,12 +45,9 @@
|
|
|
43
45
|
});
|
|
44
46
|
</script>
|
|
45
47
|
|
|
46
|
-
|
|
47
48
|
<!-- HTML -->
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<!-- aws auth -->
|
|
50
|
+
<!-- aws auth -->
|
|
52
51
|
<script type="text/html" data-template-name="aws_auth">
|
|
53
52
|
<div class="form-row">
|
|
54
53
|
<label for="node-config-input-accessKey">AWS Access Key ID</label>
|
|
@@ -60,8 +59,6 @@
|
|
|
60
59
|
</div>
|
|
61
60
|
</script>
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
62
|
<!-- jambonz auth -->
|
|
66
63
|
<script type="text/html" data-template-name="jambonz_auth">
|
|
67
64
|
<div class="form-row">
|
|
@@ -72,10 +69,9 @@
|
|
|
72
69
|
<label for="node-config-input-url">Base URL</label>
|
|
73
70
|
<input type="text" id="node-config-input-url" placeholder="http://localhost:3000">
|
|
74
71
|
<input type="hidden" id="node-config-input-urlType">
|
|
75
|
-
|
|
76
72
|
</div>
|
|
77
73
|
<div class="form-row">
|
|
78
|
-
<label for="node-config-input-accountSid">
|
|
74
|
+
<label for="node-config-input-accountSid">Account SID</label>
|
|
79
75
|
<input type="text" id="node-config-input-accountSid">
|
|
80
76
|
</div>
|
|
81
77
|
<div class="form-row">
|
|
@@ -88,8 +84,6 @@
|
|
|
88
84
|
</div>
|
|
89
85
|
</script>
|
|
90
86
|
|
|
91
|
-
|
|
92
|
-
|
|
93
87
|
<!-- Help Text -->
|
|
94
88
|
|
|
95
89
|
<!-- AWS auth-->
|
|
@@ -100,7 +94,6 @@
|
|
|
100
94
|
</script>
|
|
101
95
|
|
|
102
96
|
<!-- jambonz auth -->
|
|
103
|
-
|
|
104
97
|
<script type="text/x-red" data-help-name="jambonz_auth">
|
|
105
98
|
<p>Creates a new jambonz server credential </p>
|
|
106
99
|
<h3>Properties</h3>
|
package/src/nodes/auth.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
var {createHash} = require('crypto');
|
|
2
|
-
const bent = require('bent');
|
|
3
|
-
var mustache = require('mustache');
|
|
4
|
-
mustache.escape = function(text) {return text;};
|
|
5
|
-
var {v_resolve} = require('./libs')
|
|
6
|
-
|
|
7
1
|
module.exports = function(RED) {
|
|
8
|
-
|
|
9
2
|
function jambonz_auth(config) {
|
|
10
3
|
RED.nodes.createNode(this, config);
|
|
11
4
|
this.accountSid = config.accountSid;
|
|
@@ -18,6 +11,7 @@ module.exports = function(RED) {
|
|
|
18
11
|
this.url = config.urlType;
|
|
19
12
|
}
|
|
20
13
|
}
|
|
14
|
+
|
|
21
15
|
RED.nodes.registerType('jambonz_auth', jambonz_auth, {
|
|
22
16
|
credentials: {
|
|
23
17
|
url: {type: 'text'},
|
|
@@ -39,5 +33,4 @@ module.exports = function(RED) {
|
|
|
39
33
|
secretAccessKey: {type: 'text'}
|
|
40
34
|
}
|
|
41
35
|
});
|
|
42
|
-
|
|
43
|
-
}
|
|
36
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
-
RED.nodes.registerType('conference',{
|
|
3
|
+
RED.nodes.registerType('conference',{
|
|
4
4
|
category: 'jambonz',
|
|
5
5
|
color: '#bbabaa',
|
|
6
6
|
defaults: {
|
|
@@ -43,10 +43,8 @@ RED.nodes.registerType('conference',{
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
|
|
47
46
|
</script>
|
|
48
47
|
|
|
49
|
-
|
|
50
48
|
<!-- HTML -->
|
|
51
49
|
<script type="text/html" data-template-name="conference">
|
|
52
50
|
<div class="form-row">
|
|
@@ -95,25 +93,24 @@ RED.nodes.registerType('conference',{
|
|
|
95
93
|
<script type="text/html" data-help-name="conference">
|
|
96
94
|
<p>places a caller in a conference.</p>
|
|
97
95
|
<h3>Properties</h3>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<h3>Outputs</h3>
|
|
96
|
+
<p><code>Conference Name </code> - The name of the conference to join the caller to.</p>
|
|
97
|
+
<p><code>Enter hook </code> - A webhook to retrieve something to play or say to the caller just before they are put into a conference after waiting for it to start</p>
|
|
98
|
+
<p><code>Wait hook </code> - A webhook to retrieve commands to play or say while the caller is waiting for the conference to start</p>
|
|
99
|
+
<p><code>Beep on entry</code> - if checked, play a beep tone to the conference when caller enters </p>
|
|
100
|
+
<p><code>Start on entry</code> - if checked, start the conference only when this caller enters</p>
|
|
101
|
+
<p><code>End on exit</code> - if checked, end the conference when this caller hangs up</p>
|
|
102
|
+
<p><code>Max participants</code> - maximum number of participants that will be allowed in the conference</p>
|
|
103
|
+
<h3>Outputs</h3>
|
|
107
104
|
<dl class="message-properties">
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
<dt>jambonz<span class="property-type">object</span></dt>
|
|
106
|
+
<dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>conference</code> action appended </dd>
|
|
110
107
|
</dl>
|
|
111
108
|
|
|
112
109
|
<h3>Details</h3>
|
|
113
110
|
The conference verb places a call into a conference.
|
|
114
111
|
<h3>References</h3>
|
|
115
112
|
<ul>
|
|
116
|
-
<li><a href="https://
|
|
113
|
+
<li><a href="https://www.jambonz.org/docs/webhooks/conference/">Jambonz conference reference</a></li>
|
|
117
114
|
</ul>
|
|
118
115
|
</script>
|
|
119
116
|
|
package/src/nodes/conference.js
CHANGED
package/src/nodes/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
-
|
|
3
|
+
RED.nodes.registerType('create-call',{
|
|
4
4
|
category: 'jambonz',
|
|
5
5
|
color: '#aebfb9',
|
|
6
6
|
defaults: {
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
prepareTtsControls(node);
|
|
58
58
|
prepareSttControls(node);
|
|
59
59
|
|
|
60
|
-
|
|
61
60
|
$('#node-input-from').typedInput({
|
|
62
61
|
default: $('#node-input-fromType').val(),
|
|
63
62
|
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
@@ -125,7 +124,6 @@
|
|
|
125
124
|
});
|
|
126
125
|
</script>
|
|
127
126
|
|
|
128
|
-
|
|
129
127
|
<!-- HTML -->
|
|
130
128
|
<script type="text/html" data-template-name="create-call">
|
|
131
129
|
<div class="form-row">
|
|
@@ -254,12 +252,9 @@
|
|
|
254
252
|
</div>
|
|
255
253
|
</fieldset>
|
|
256
254
|
</div>
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
</script>
|
|
255
|
+
</script>
|
|
260
256
|
|
|
261
257
|
<!-- Help Text -->
|
|
262
|
-
|
|
263
258
|
<script type="text/html" data-help-name="create-call">
|
|
264
259
|
<p>Create an outbound call</p>
|
|
265
260
|
<h3>Properties</h3>
|
|
@@ -271,17 +266,13 @@
|
|
|
271
266
|
|
|
272
267
|
<h3>Outputs</h3>
|
|
273
268
|
<dl class="message-properties">
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
269
|
+
<dt>statusCode<span class="property-type">int</span></dt>
|
|
270
|
+
<dd> <code>msg.statusCode</code> will contain the response code from Jambomnz to the createCall request</dd>
|
|
271
|
+
<dt>callSid<span class="property-type">string</span></dt>
|
|
272
|
+
<dd> <code>msg.callSid</code> will contain the SID of the call that was created</dd>
|
|
278
273
|
</dl>
|
|
279
274
|
|
|
280
275
|
<h3>Details</h3>
|
|
281
276
|
The create call command is used to generate a new outbound call.
|
|
282
277
|
When the call is answered the specified application's call hook will be invoked.
|
|
283
|
-
|
|
284
|
-
<ul>
|
|
285
|
-
<li><a href="https://docs.jambonz.org/rest/#create-a-call">Jambonz reference</a></li>
|
|
286
|
-
</ul>
|
|
287
|
-
</script>
|
|
278
|
+
</script>
|
package/src/nodes/create_call.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
var {createHash} = require('crypto');
|
|
2
|
-
var mustache = require('mustache');
|
|
3
|
-
const { toNamespacedPath } = require('path');
|
|
4
|
-
mustache.escape = function(text) {return text;};
|
|
5
1
|
var {v_resolve, doCreateCall, } = require('./libs')
|
|
6
2
|
|
|
7
3
|
module.exports = function(RED) {
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
/** Create call */
|
|
5
|
+
function create_call(config) {
|
|
10
6
|
RED.nodes.createNode(this, config);
|
|
11
7
|
var node = this;
|
|
12
8
|
const server = RED.nodes.getNode(config.server);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
-
|
|
3
|
+
RED.nodes.registerType('create-sms',{
|
|
4
4
|
category: 'jambonz',
|
|
5
5
|
color: '#aebfb9',
|
|
6
6
|
defaults: {
|
|
@@ -46,12 +46,9 @@
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
|
|
50
49
|
</script>
|
|
51
50
|
|
|
52
|
-
|
|
53
51
|
<!-- HTML -->
|
|
54
|
-
|
|
55
52
|
<script type="text/html" data-template-name="create-sms">
|
|
56
53
|
<div class="form-row">
|
|
57
54
|
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
|
@@ -81,11 +78,9 @@
|
|
|
81
78
|
<input type="text" id="node-input-provider">
|
|
82
79
|
<input type="hidden" id="node-input-providerType">
|
|
83
80
|
</div>
|
|
84
|
-
|
|
81
|
+
</script>
|
|
85
82
|
|
|
86
|
-
|
|
87
83
|
<!-- Help Text -->
|
|
88
|
-
|
|
89
84
|
<script type="text/html" data-help-name="create-sms">
|
|
90
85
|
<p>Send an SMS</p>
|
|
91
86
|
<h3>Properties</h3>
|
|
@@ -94,13 +89,6 @@
|
|
|
94
89
|
<p><code>To</code> - Destination phone number</p>
|
|
95
90
|
<p><code>Text</code> - Text message</p>
|
|
96
91
|
|
|
97
|
-
|
|
98
92
|
<h3>Details</h3>
|
|
99
93
|
The create message command is used to send an SMS message.
|
|
100
|
-
|
|
101
|
-
<h3>References</h3>
|
|
102
|
-
<ul>
|
|
103
|
-
<li><a href="https://docs.jambonz.org/rest/#create-a-call">Jambonz reference</a></li>
|
|
104
|
-
</ul>
|
|
105
|
-
-->
|
|
106
|
-
</script>
|
|
94
|
+
</script>
|
package/src/nodes/create_sms.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
var {createHash} = require('crypto');
|
|
2
|
-
const bent = require('bent');
|
|
3
|
-
var mustache = require('mustache');
|
|
4
|
-
mustache.escape = function(text) {return text;};
|
|
5
1
|
var {v_resolve, doCreateMessage} = require('./libs')
|
|
6
2
|
|
|
7
|
-
|
|
8
3
|
module.exports = function(RED) {
|
|
9
4
|
/** Create sms */
|
|
10
5
|
function create_sms(config) {
|
package/src/nodes/dequeue.html
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
-
RED.nodes.registerType('dequeue',{
|
|
3
|
+
RED.nodes.registerType('dequeue',{
|
|
4
4
|
category: 'jambonz',
|
|
5
5
|
color: '#bbabaa',
|
|
6
6
|
defaults: {
|
|
@@ -42,7 +42,6 @@ RED.nodes.registerType('dequeue',{
|
|
|
42
42
|
});
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
|
-
|
|
46
45
|
<!-- HTML -->
|
|
47
46
|
<script type="text/html" data-template-name="dequeue">
|
|
48
47
|
<div class="form-row">
|
|
@@ -73,9 +72,8 @@ RED.nodes.registerType('dequeue',{
|
|
|
73
72
|
<input type="text" id="node-input-timeout" placeholder="seconds to wait if queue is empty">
|
|
74
73
|
<input type="hidden" id="node-input-timeoutType">
|
|
75
74
|
</div>
|
|
76
|
-
|
|
75
|
+
</script>
|
|
77
76
|
|
|
78
|
-
|
|
79
77
|
<!-- Help Text -->
|
|
80
78
|
<script type="text/html" data-help-name="dequeue">
|
|
81
79
|
<p>removes the a call from the front of a queue and bridges that call to the current caller.</p>
|
|
@@ -89,14 +87,14 @@ RED.nodes.registerType('dequeue',{
|
|
|
89
87
|
|
|
90
88
|
<h3>Outputs</h3>
|
|
91
89
|
<dl class="message-properties">
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
<dt>jambonz<span class="property-type">object</span></dt>
|
|
91
|
+
<dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>dequeue</code> action appended </dd>
|
|
94
92
|
</dl>
|
|
95
93
|
|
|
96
94
|
<h3>Details</h3>
|
|
97
95
|
The dequeue verb removes the a call from the front of a specified queue and bridges that call to the current caller.
|
|
98
96
|
<h3>References</h3>
|
|
99
97
|
<ul>
|
|
100
|
-
<li><a href="https://
|
|
98
|
+
<li><a href="https://www.jambonz.org/docs/webhooks/dequeue/">Jambonz dequeue reference</a></li>
|
|
101
99
|
</ul>
|
|
102
|
-
|
|
100
|
+
</script>
|
package/src/nodes/dequeue.js
CHANGED
package/src/nodes/dial.html
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
-
RED.nodes.registerType('dial',{
|
|
3
|
+
RED.nodes.registerType('dial',{
|
|
4
4
|
category: 'jambonz',
|
|
5
5
|
color: '#bbabaa',
|
|
6
6
|
defaults: {
|
|
@@ -363,13 +363,9 @@ RED.nodes.registerType('dial',{
|
|
|
363
363
|
console.log(`saved headers ${JSON.stringify(node.headers)}`);
|
|
364
364
|
},
|
|
365
365
|
});
|
|
366
|
-
|
|
367
|
-
|
|
368
366
|
</script>
|
|
369
367
|
|
|
370
|
-
|
|
371
368
|
<!-- HTML -->
|
|
372
|
-
|
|
373
369
|
<script type="text/html" data-template-name="dial">
|
|
374
370
|
<style>
|
|
375
371
|
ol#node-input-target-container .red-ui-typedInput-container {
|
|
@@ -569,7 +565,7 @@ RED.nodes.registerType('dial',{
|
|
|
569
565
|
</div>
|
|
570
566
|
</fieldset>
|
|
571
567
|
</div>
|
|
572
|
-
|
|
568
|
+
</script>
|
|
573
569
|
|
|
574
570
|
<!-- Help Text -->
|
|
575
571
|
<script type="text/html" data-help-name="dial">
|
|
@@ -614,7 +610,6 @@ RED.nodes.registerType('dial',{
|
|
|
614
610
|
<p><code>Send interim transcriptions</code> -
|
|
615
611
|
<dd>if true interim transcriptions are sent.</p>
|
|
616
612
|
|
|
617
|
-
|
|
618
613
|
<h3>Outputs</h3>
|
|
619
614
|
<dl class="message-properties">
|
|
620
615
|
<dt>jambonz<span class="property-type">object</span></dt>
|
|
@@ -624,6 +619,6 @@ RED.nodes.registerType('dial',{
|
|
|
624
619
|
<h3>Details</h3>
|
|
625
620
|
The dial verb is used to create a new call by dialing out to a number, a registered sip user, or sip endpoint
|
|
626
621
|
<ul>
|
|
627
|
-
<li><a href="https://
|
|
622
|
+
<li><a href="https://www.jambonz.org/docs/webhooks/dial/">Jambonz dial reference</a></li>
|
|
628
623
|
</ul>
|
|
629
624
|
</script>
|
package/src/nodes/dial.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var {createHash} = require('crypto');
|
|
2
|
-
const bent = require('bent');
|
|
3
1
|
var {appendVerb, v_resolve} = require('./libs')
|
|
4
2
|
|
|
5
3
|
module.exports = function(RED) {
|
|
@@ -8,7 +6,6 @@ module.exports = function(RED) {
|
|
|
8
6
|
var node = this;
|
|
9
7
|
|
|
10
8
|
node.on('input', function(msg) {
|
|
11
|
-
|
|
12
9
|
node.log(`dial config: ${JSON.stringify(config)}, msg.call: ${JSON.stringify(msg.call)}`);
|
|
13
10
|
var target = config.targets.map((t) => {
|
|
14
11
|
const obj = Object.assign({}, t);
|
|
@@ -56,7 +53,6 @@ module.exports = function(RED) {
|
|
|
56
53
|
dtmfHook: v_resolve(config.dtmfhook, config.dtmfhookType, this.context(), msg)
|
|
57
54
|
};
|
|
58
55
|
|
|
59
|
-
|
|
60
56
|
// headers
|
|
61
57
|
var headers = {};
|
|
62
58
|
config.headers.forEach(function(h) {
|
|
@@ -129,7 +125,6 @@ module.exports = function(RED) {
|
|
|
129
125
|
delete data.dtmfHook;
|
|
130
126
|
}
|
|
131
127
|
|
|
132
|
-
|
|
133
128
|
node.log(`dial verb: ${JSON.stringify(data)}`);
|
|
134
129
|
|
|
135
130
|
appendVerb(msg, data);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
2
|
<script type="text/javascript">
|
|
3
|
-
RED.nodes.registerType('dialogflow',{
|
|
3
|
+
RED.nodes.registerType('dialogflow',{
|
|
4
4
|
category: 'jambonz',
|
|
5
5
|
color: '#bbabaa',
|
|
6
6
|
defaults: {
|
|
@@ -107,10 +107,8 @@ RED.nodes.registerType('dialogflow',{
|
|
|
107
107
|
recLangElem.val(node.recognizerlang);
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
-
|
|
111
110
|
</script>
|
|
112
111
|
|
|
113
|
-
|
|
114
112
|
<!-- HTML -->
|
|
115
113
|
<script type="text/html" data-template-name="dialogflow">
|
|
116
114
|
<div class="form-row">
|
|
@@ -215,9 +213,7 @@ RED.nodes.registerType('dialogflow',{
|
|
|
215
213
|
</script>
|
|
216
214
|
|
|
217
215
|
<!-- Help Text -->
|
|
218
|
-
|
|
219
|
-
<script type="text/html" data-help-name="audio in">
|
|
220
|
-
<script type="text/html" data-help-name="dialogflow">
|
|
216
|
+
<script type="text/html" data-help-name="dialogflow">
|
|
221
217
|
<p>Run a Google dialogflow bot on the call</p>
|
|
222
218
|
<h3>Properties</h3>
|
|
223
219
|
<p><code>Dialogflow Project ID</code> -
|
|
@@ -236,7 +232,6 @@ RED.nodes.registerType('dialogflow',{
|
|
|
236
232
|
Webhook to call when an intent, transcription or other dialogflow event is received. Optional.</p>
|
|
237
233
|
<p><code>Action Hook</code> -
|
|
238
234
|
Webhook to call when the dialogflow bot interaction concludes. Optional.</p>
|
|
239
|
-
|
|
240
235
|
|
|
241
236
|
<h3>Outputs</h3>
|
|
242
237
|
<dl class="message-properties">
|
|
@@ -250,11 +245,6 @@ RED.nodes.registerType('dialogflow',{
|
|
|
250
245
|
|
|
251
246
|
<h3>References</h3>
|
|
252
247
|
<ul>
|
|
253
|
-
<li><a href="https://
|
|
248
|
+
<li><a href="https://www.jambonz.org/docs/webhooks/dialogflow/">Jambonz dialogflow reference</a></li>
|
|
254
249
|
</ul>
|
|
255
|
-
</script>
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
250
|
</script>
|
package/src/nodes/dialogflow.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
var {createHash} = require('crypto');
|
|
2
|
-
const bent = require('bent');
|
|
3
|
-
var mustache = require('mustache');
|
|
4
|
-
mustache.escape = function(text) {return text;};
|
|
5
1
|
var {appendVerb, v_resolve} = require('./libs')
|
|
6
2
|
|
|
7
3
|
module.exports = function(RED) {
|
|
@@ -44,7 +40,6 @@ function dialogflow(config) {
|
|
|
44
40
|
voice: config.voice
|
|
45
41
|
};
|
|
46
42
|
}
|
|
47
|
-
|
|
48
43
|
appendVerb(msg, obj);
|
|
49
44
|
node.send(msg);
|
|
50
45
|
});
|
package/src/nodes/dtmf.html
CHANGED
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
icon: "font-awesome/fa-cubes",
|
|
14
14
|
label: function() { return this.name || 'dtmf';},
|
|
15
15
|
oneditprepare: function() {
|
|
16
|
-
|
|
17
16
|
$('#node-input-dtmf').typedInput({
|
|
18
17
|
default: $('#node-input-dtmfType').val(),
|
|
19
18
|
types: ['str','msg', 'flow', 'global', 'jsonata', 'env'],
|
|
@@ -26,10 +25,8 @@
|
|
|
26
25
|
})
|
|
27
26
|
}
|
|
28
27
|
});
|
|
29
|
-
|
|
30
28
|
</script>
|
|
31
29
|
|
|
32
|
-
|
|
33
30
|
<!-- HTML -->
|
|
34
31
|
<script type="text/html" data-template-name="dtmf">
|
|
35
32
|
<div class="form-row">
|
|
@@ -49,26 +46,23 @@
|
|
|
49
46
|
</script>
|
|
50
47
|
|
|
51
48
|
<!-- Help Text -->
|
|
52
|
-
<script type="text/html" data-help-name="
|
|
49
|
+
<script type="text/html" data-help-name="dtmf">
|
|
53
50
|
<p>generates a string of dtmf digit signals</p>
|
|
54
51
|
<h3>Properties</h3>
|
|
55
52
|
<p><code>DTMF</code> - a string containing a sequence of dtmf digits (0-9,*,#)</p>
|
|
56
53
|
<p><code>Duration</code> - the length of each digit, in milliseconds, Defaults to 500</p>
|
|
57
|
-
|
|
58
54
|
|
|
59
55
|
<h3>Outputs</h3>
|
|
60
56
|
<dl class="message-properties">
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
<dt>jambonz<span class="property-type">object</span></dt>
|
|
58
|
+
<dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>play</code> action appended </dd>
|
|
63
59
|
</dl>
|
|
64
60
|
|
|
65
61
|
<h3>Details</h3>
|
|
66
62
|
The dtmf action generates a string of dtmf digit signals. These are sent as RTP payloads using RFC 2833.
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
|
|
70
64
|
<h3>References</h3>
|
|
71
65
|
<ul>
|
|
72
|
-
<li><a href="https://www.jambonz.org/docs/webhooks/dtmf/">Jambonz
|
|
66
|
+
<li><a href="https://www.jambonz.org/docs/webhooks/dtmf/">Jambonz dtmf reference</a></li>
|
|
73
67
|
</ul>
|
|
74
|
-
|
|
68
|
+
</script>
|
package/src/nodes/dtmf.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
var {createHash} = require('crypto');
|
|
2
|
-
const bent = require('bent');
|
|
3
|
-
var mustache = require('mustache');
|
|
4
|
-
mustache.escape = function(text) {return text;};
|
|
5
1
|
var {appendVerb} = require('./libs')
|
|
6
2
|
|
|
7
|
-
|
|
8
3
|
module.exports = function(RED) {
|
|
9
4
|
function dtmf(config) {
|
|
10
5
|
RED.nodes.createNode(this, config);
|
package/src/nodes/enqueue.html
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<!-- Javascript -->
|
|
2
|
-
|
|
3
|
-
|
|
4
2
|
<script type="text/javascript">
|
|
5
3
|
RED.nodes.registerType('enqueue',{
|
|
6
4
|
category: 'jambonz',
|
|
@@ -35,12 +33,9 @@
|
|
|
35
33
|
});
|
|
36
34
|
}
|
|
37
35
|
});
|
|
38
|
-
|
|
39
36
|
</script>
|
|
40
37
|
|
|
41
|
-
|
|
42
38
|
<!-- HTML -->
|
|
43
|
-
|
|
44
39
|
<script type="text/html" data-template-name="enqueue">
|
|
45
40
|
<div class="form-row">
|
|
46
41
|
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
|
@@ -64,27 +59,25 @@
|
|
|
64
59
|
</script>
|
|
65
60
|
|
|
66
61
|
<!-- Help Text -->
|
|
67
|
-
|
|
68
62
|
<script type="text/html" data-help-name="enqueue">
|
|
69
63
|
<p>places a caller in a queue.</p>
|
|
70
64
|
<h3>Properties</h3>
|
|
71
65
|
<p><code>Queue name</code> -
|
|
72
|
-
|
|
66
|
+
The name of the queue</p>
|
|
73
67
|
<p><code>Action hook</code> -
|
|
74
|
-
|
|
68
|
+
A webhook invoke when operation completes.</p>
|
|
75
69
|
<p><code>Wait hook</code> -
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
A webhook to invoke while the caller is in queue. The only allowed verbs in the application returned from this webhook are say, play, pause, and leave,.</p>
|
|
78
71
|
<h3>Outputs</h3>
|
|
79
72
|
<dl class="message-properties">
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
<dt>jambonz<span class="property-type">object</span></dt>
|
|
74
|
+
<dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>enqueue</code> action appended </dd>
|
|
82
75
|
</dl>
|
|
83
76
|
|
|
84
77
|
<h3>Details</h3>
|
|
85
78
|
The enqueue command is used to place a caller in a queue.
|
|
86
79
|
<h3>References</h3>
|
|
87
80
|
<ul>
|
|
88
|
-
<li><a href="https://
|
|
81
|
+
<li><a href="https://www.jambonz.org/docs/webhooks/enqueue/">Jambonz enqueue reference</a></li>
|
|
89
82
|
</ul>
|
|
90
|
-
|
|
83
|
+
</script>
|