@jambonz/node-red-contrib-jambonz 2.3.0 → 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.
Files changed (67) hide show
  1. package/package.json +4 -4
  2. package/src/nodes/auth.html +9 -16
  3. package/src/nodes/auth.js +2 -9
  4. package/src/nodes/conference.html +12 -15
  5. package/src/nodes/conference.js +0 -4
  6. package/src/nodes/config.js +0 -4
  7. package/src/nodes/create_call.html +7 -16
  8. package/src/nodes/create_call.js +2 -6
  9. package/src/nodes/create_sms.html +3 -15
  10. package/src/nodes/create_sms.js +0 -5
  11. package/src/nodes/dequeue.html +6 -8
  12. package/src/nodes/dequeue.js +0 -4
  13. package/src/nodes/dial.html +20 -15
  14. package/src/nodes/dial.js +3 -5
  15. package/src/nodes/dialogflow.html +3 -13
  16. package/src/nodes/dialogflow.js +0 -5
  17. package/src/nodes/dtmf.html +5 -11
  18. package/src/nodes/dtmf.js +0 -5
  19. package/src/nodes/enqueue.html +7 -14
  20. package/src/nodes/enqueue.js +0 -6
  21. package/src/nodes/gather.html +7 -8
  22. package/src/nodes/gather.js +0 -5
  23. package/src/nodes/get_alerts.html +5 -27
  24. package/src/nodes/get_alerts.js +14 -16
  25. package/src/nodes/get_calls.html +6 -28
  26. package/src/nodes/get_calls.js +36 -36
  27. package/src/nodes/get_recent_calls.html +25 -27
  28. package/src/nodes/get_recent_calls.js +21 -21
  29. package/src/nodes/hangup.html +5 -11
  30. package/src/nodes/hangup.js +2 -7
  31. package/src/nodes/lcc.html +12 -19
  32. package/src/nodes/lcc.js +0 -4
  33. package/src/nodes/leave.html +4 -5
  34. package/src/nodes/leave.js +0 -6
  35. package/src/nodes/lex.html +5 -3
  36. package/src/nodes/lex.js +0 -5
  37. package/src/nodes/libs.js +2 -1
  38. package/src/nodes/listen.html +2 -3
  39. package/src/nodes/listen.js +0 -5
  40. package/src/nodes/message.html +5 -6
  41. package/src/nodes/message.js +30 -30
  42. package/src/nodes/pause.html +5 -8
  43. package/src/nodes/pause.js +0 -6
  44. package/src/nodes/play.html +7 -10
  45. package/src/nodes/play.js +0 -5
  46. package/src/nodes/rasa.html +5 -13
  47. package/src/nodes/rasa.js +1 -5
  48. package/src/nodes/redirect.html +4 -8
  49. package/src/nodes/redirect.js +0 -6
  50. package/src/nodes/s3-upload.html +0 -2
  51. package/src/nodes/s3-upload.js +1 -6
  52. package/src/nodes/say.html +9 -7
  53. package/src/nodes/say.js +0 -4
  54. package/src/nodes/sip-decline.html +5 -8
  55. package/src/nodes/sip-decline.js +0 -5
  56. package/src/nodes/sip-refer.html +4 -12
  57. package/src/nodes/sip-refer.js +1 -5
  58. package/src/nodes/sip-request.html +5 -11
  59. package/src/nodes/sip-request.js +1 -8
  60. package/src/nodes/tag.html +2 -4
  61. package/src/nodes/tag.js +0 -5
  62. package/src/nodes/template.html +7 -16
  63. package/src/nodes/userauth.html +47 -21
  64. package/src/nodes/userauth.js +18 -6
  65. package/src/nodes/webhooks.html +26 -29
  66. package/src/utils/http-helpers.js +5 -4
  67. package/src/utils/tts-utils.js +1 -0
@@ -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 hangup(config) {
10
5
  RED.nodes.createNode(this, config);
@@ -15,6 +10,6 @@ module.exports = function(RED) {
15
10
  });
16
11
  node.send(msg);
17
12
  });
18
- }
19
- RED.nodes.registerType('hangup', hangup);
13
+ }
14
+ RED.nodes.registerType('hangup', hangup);
20
15
  }
@@ -1,6 +1,6 @@
1
1
  <!-- Javascript -->
2
2
  <script type="text/javascript">
3
- RED.nodes.registerType('lcc',{
3
+ RED.nodes.registerType('lcc',{
4
4
  category: 'jambonz',
5
5
  color: '#aebfb9',
6
6
  defaults: {
@@ -142,10 +142,8 @@ RED.nodes.registerType('lcc',{
142
142
  voiceElem.change(onVoiceChanged);
143
143
  }
144
144
  });
145
-
146
145
  </script>
147
146
 
148
-
149
147
  <!-- HTML -->
150
148
  <script type="text/html" data-template-name="lcc">
151
149
  <div class="form-row">
@@ -220,37 +218,32 @@ RED.nodes.registerType('lcc',{
220
218
  <input type="hidden" id="node-input-waitHookType">
221
219
  </div>
222
220
  </div>
223
- </script>
221
+ </script>
224
222
 
225
223
  <!-- Help Text -->
226
-
227
224
  <script type="text/html" data-help-name="lcc">
228
225
  <p>Perform Live Call Control</p>
229
226
  <h3>Properties</h3>
230
227
  <p><code>Server</code> -
231
- jambonz server to connect to</p>
228
+ jambonz server to connect to</p>
232
229
  <p><code>CallSid</code> -
233
- Call identifier</p>
230
+ Call identifier</p>
234
231
  <p><code>Action</code> -
235
- Action to perform on the call</p>
232
+ Action to perform on the call</p>
236
233
  <p><code>Text</code> -
237
- Text to speak, only if action is 'whisper'</p>
234
+ Text to speak, only if action is 'whisper'</p>
238
235
  <p><code>Vendor</code> -
239
- TTS vendor to use for whisper</p>
236
+ TTS vendor to use for whisper</p>
240
237
  <p><code>Language</code> -
241
- TTS language to use for whisper</p>
238
+ TTS language to use for whisper</p>
242
239
  <p><code>Voice</code> -
243
- TTS voice to use for whisper</p>
244
-
240
+ TTS voice to use for whisper</p>
245
241
 
246
242
  <h3>Details</h3>
247
243
  The lcc command is used to perform live call control on a call in progress.
248
244
  The call can be terminated, the caller can be muted or unmuted, or the live
249
- audio feed that is being sent via a <a href="https://docs.jambonz.org/jambonz/#listen">listen</a> verb can be paused or resumed.
245
+ audio feed that is being sent via a <a href="https://www.jambonz.org/docs/webhooks/listen/">listen</a> verb can be paused or resumed.
250
246
  <br/><br/>
251
- A common use case is to use dtmf captures in a <a href="https://docs.jambonz.org/jambonz/#dial">dial</a> verb to call a webhook
247
+ A common use case is to use dtmf captures in a <a href="https://www.jambonz.org/docs/webhooks/dial/">dial</a> verb to call a webhook
252
248
  that then uses lcc to modify the state of the call.
253
- <h3>References</h3>
254
- <ul>
255
- <li><a href="https://docs.jambonz.org/rest/#updating-a-call">Jambonz reference</a></li>
256
- </script>
249
+ </script>
package/src/nodes/lcc.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 {v_resolve, doLCC} = require('./libs')
6
2
 
7
3
  module.exports = function(RED) {
@@ -13,7 +13,6 @@
13
13
  });
14
14
  </script>
15
15
 
16
-
17
16
  <!-- HTML -->
18
17
  <script type="text/html" data-template-name="leave">
19
18
  <div class="form-row">
@@ -28,13 +27,13 @@
28
27
 
29
28
  <h3>Outputs</h3>
30
29
  <dl class="message-properties">
31
- <dt>jambonz<span class="property-type">object</span></dt>
32
- <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>leave</code> action appended </dd>
30
+ <dt>jambonz<span class="property-type">object</span></dt>
31
+ <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>leave</code> action appended </dd>
33
32
  </dl>
34
33
 
35
34
  <h3>Details</h3>
36
35
  The leave verb transfers a call out of a queue. The call then returns to the flow of execution following the enqueue verb that parked the call, or the document returned by that verbs actionHook property, if provided.<h3>References</h3>
37
36
  <ul>
38
- <li><a href="https://docs.jambonz.org/jambonz/#leave">Jambonz leave reference</a></li>
37
+ <li><a href="https://www.jambonz.org/docs/webhooks/leave/">Jambonz leave reference</a></li>
39
38
  </ul>
40
- </script>
39
+ </script>
@@ -1,11 +1,5 @@
1
-
2
- var {createHash} = require('crypto');
3
- const bent = require('bent');
4
- var mustache = require('mustache');
5
- mustache.escape = function(text) {return text;};
6
1
  var {appendVerb} = require('./libs')
7
2
 
8
-
9
3
  module.exports = function(RED) {
10
4
  function leave(config) {
11
5
  RED.nodes.createNode(this, config);
@@ -100,7 +100,6 @@
100
100
  });
101
101
  </script>
102
102
 
103
-
104
103
  <!-- HTML -->
105
104
  <script type="text/html" data-template-name="lex">
106
105
  <div class="form-row">
@@ -234,7 +233,7 @@
234
233
 
235
234
  <!-- Help Text -->
236
235
  <script type="text/html" data-help-name="lex">
237
- <p>Connects a call to a lex bot</p>
236
+ <p>Connects a call to a Amazon lex bot</p>
238
237
 
239
238
  <h3>Properties</h3>
240
239
  <p><code>Name</code> - Label for the node</p>
@@ -260,5 +259,8 @@
260
259
  <p><code> </code> - </p>
261
260
  <p><code> </code> - </p>
262
261
 
263
-
262
+ <h3>References</h3>
263
+ <ul>
264
+ <li><a href="https://www.jambonz.org/docs/webhooks/lex/">Jambonz lex reference</a></li>
265
+ </ul>
264
266
  </script>
package/src/nodes/lex.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, v_resolve} = require('./libs')
6
2
 
7
-
8
3
  module.exports = function(RED) {
9
4
  /** lex */
10
5
  function lex(config) {
package/src/nodes/libs.js CHANGED
@@ -71,7 +71,8 @@ exports.appendVerb = (msg, obj) => {
71
71
  }
72
72
  return '${' + b + '}';
73
73
  });
74
- return newString;
74
+ data = {'global' : glob, 'flow' : flow, 'msg' : msg}
75
+ return mustache.render(newString, data);
75
76
  }
76
77
 
77
78
 
@@ -107,7 +107,6 @@ RED.nodes.registerType('listen',{
107
107
  });
108
108
  </script>
109
109
 
110
-
111
110
  <!-- HTML -->
112
111
  <script type="text/html" data-template-name="listen">
113
112
  <div class="form-row">
@@ -336,6 +335,6 @@ RED.nodes.registerType('listen',{
336
335
  <h3>Details</h3>
337
336
  The listen verb establishes a connection to a websocket server and sends live audio for the current call.<h3>References</h3>
338
337
  <ul>
339
- <li><a href="https://docs.jambonz.org/jambonz/#listen">Jambonz listen reference</a></li>
338
+ <li><a href="https://www.jambonz.org/docs/webhooks/listen/">Jambonz listen reference</a></li>
340
339
  </ul>
341
- </script>
340
+ </script>
@@ -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, v_resolve} = require('./libs')
6
2
 
7
-
8
3
  module.exports = function(RED) {
9
4
  function listen(config) {
10
5
  RED.nodes.createNode(this, config);
@@ -1,6 +1,6 @@
1
1
  <!-- Javascript -->
2
2
  <script type="text/javascript">
3
- RED.nodes.registerType('message', {
3
+ RED.nodes.registerType('message', {
4
4
  category: 'jambonz',
5
5
  color: '#bbabaa',
6
6
  defaults: {
@@ -47,7 +47,6 @@ RED.nodes.registerType('message', {
47
47
  });
48
48
  </script>
49
49
 
50
-
51
50
  <!-- HTML -->
52
51
  <script type="text/html" data-template-name="message">
53
52
  <div class="form-row">
@@ -82,14 +81,14 @@ RED.nodes.registerType('message', {
82
81
 
83
82
  <h3>Outputs</h3>
84
83
  <dl class="message-properties">
85
- <dt>jambonz<span class="property-type">object</span></dt>
86
- <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>message</code> action appended </dd>
84
+ <dt>jambonz<span class="property-type">object</span></dt>
85
+ <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>message</code> action appended </dd>
87
86
  </dl>
88
87
 
89
88
  <h3>Details</h3>
90
89
  The message verb sends an SMS message.
91
90
  <h3>References</h3>
92
91
  <ul>
93
- <li><a href="https://docs.jambonz.org/jambonz/#message">Jambonz redirect reference</a></li>
92
+ <li><a href="https://www.jambonz.org/docs/webhooks/message/">Jambonz message reference</a></li>
94
93
  </ul>
95
- </script>
94
+ </script>
@@ -1,32 +1,32 @@
1
- var {createHash} = require('crypto');
2
- const bent = require('bent');
3
- var mustache = require('mustache');
4
- mustache.escape = function(text) {return text;};
5
- var {appendVerb, v_resolve} = require('./libs')
1
+ var { appendVerb, v_resolve } = require("./libs");
6
2
 
7
-
8
- module.exports = function(RED) {
9
- function message(config) {
10
- RED.nodes.createNode(this, config);
11
- var node = this;
12
- node.on('input', function(msg, send, done) {
13
- var from = v_resolve(config.from, config.fromType, this.context(), msg);
14
- var to = v_resolve(config.to, config.toType, this.context(), msg);
15
- var text = v_resolve(config.text, config.textType, this.context(), msg);
16
- var provider = v_resolve(config.provider, config.providerType, this.context(), msg);
17
- if ((!provider || 0 === provider.length) && msg.sms.provider) {
18
- provider = msg.sms.provider;
19
- }
20
-
21
- appendVerb(msg, {
22
- verb: 'message',
23
- from,
24
- to,
25
- text,
26
- provider
27
- });
28
- node.send(msg);
29
- });
3
+ module.exports = function (RED) {
4
+ function message(config) {
5
+ RED.nodes.createNode(this, config);
6
+ var node = this;
7
+ node.on("input", function (msg, send, done) {
8
+ var from = v_resolve(config.from, config.fromType, this.context(), msg);
9
+ var to = v_resolve(config.to, config.toType, this.context(), msg);
10
+ var text = v_resolve(config.text, config.textType, this.context(), msg);
11
+ var provider = v_resolve(
12
+ config.provider,
13
+ config.providerType,
14
+ this.context(),
15
+ msg
16
+ );
17
+ if ((!provider || 0 === provider.length) && msg.sms.provider) {
18
+ provider = msg.sms.provider;
30
19
  }
31
- RED.nodes.registerType('message', message);
32
- }
20
+
21
+ appendVerb(msg, {
22
+ verb: "message",
23
+ from,
24
+ to,
25
+ text,
26
+ provider,
27
+ });
28
+ node.send(msg);
29
+ });
30
+ }
31
+ RED.nodes.registerType("message", message);
32
+ };
@@ -1,13 +1,12 @@
1
1
  <!-- Javascript -->
2
2
  <script type="text/javascript">
3
- RED.nodes.registerType('pause',{
3
+ RED.nodes.registerType('pause',{
4
4
  category: 'jambonz',
5
5
  color: '#bbabaa',
6
6
  defaults: {
7
7
  name: {value: ''},
8
8
  len: {required: true},
9
9
  lenType: {value: 'num'},
10
-
11
10
  },
12
11
  inputs:1,
13
12
  outputs:1,
@@ -21,10 +20,8 @@
21
20
  });
22
21
  }
23
22
  });
24
-
25
23
  </script>
26
24
 
27
-
28
25
  <!-- HTML -->
29
26
  <script type="text/html" data-template-name="pause">
30
27
  <div class="form-row">
@@ -36,7 +33,7 @@
36
33
  <input type="text" id="node-input-len" placeholder="number of seconds to pause">
37
34
  <input type="hidden" id="node-input-lenType">
38
35
  </div>
39
- </script>
36
+ </script>
40
37
 
41
38
  <!-- Help Text -->
42
39
  <script type="text/html" data-help-name="pause">
@@ -45,7 +42,7 @@
45
42
  <dl class="message-properties">
46
43
  <dt>Duration<span class="property-type">object</span></dt>
47
44
  <dd>Number of seconds pause</dd>
48
- </dl>
45
+ </dl>
49
46
 
50
47
  <h3>Outputs</h3>
51
48
  <dl class="message-properties">
@@ -57,6 +54,6 @@
57
54
  The pause verb waits a specified number of seconds before continuing to execute the application.
58
55
  <h3>References</h3>
59
56
  <ul>
60
- <li><a href="https://docs.jambonz.org/jambonz/#pause">Jambonz pause reference</a></li>
57
+ <li><a href="https://www.jambonz.org/docs/webhooks/pause/">Jambonz pause reference</a></li>
61
58
  </ul>
62
- </script>
59
+ </script>
@@ -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, v_resolve} = require('./libs')
6
2
 
7
-
8
3
  module.exports = function(RED) {
9
4
  /** pause */
10
5
  function pause(config) {
@@ -21,5 +16,4 @@ module.exports = function(RED) {
21
16
  });
22
17
  }
23
18
  RED.nodes.registerType('pause', pause);
24
-
25
19
  }
@@ -22,10 +22,8 @@ RED.nodes.registerType('play',{
22
22
  });
23
23
  }
24
24
  });
25
-
26
25
  </script>
27
26
 
28
-
29
27
  <!-- HTML -->
30
28
  <script type="text/html" data-template-name="play">
31
29
  <div class="form-row">
@@ -52,17 +50,16 @@ RED.nodes.registerType('play',{
52
50
  <p>Play a wav or mp3 file</p>
53
51
  <h3>Properties</h3>
54
52
  <p><code>Url</code> -
55
- a single url or array of urls (will play in sequence) to a wav or mp3 file</p>
53
+ a single url or array of urls (will play in sequence) to a wav or mp3 file</p>
56
54
  <p><code>Early media</code> -
57
- if checked, play the url over an early media connection</p>
55
+ if checked, play the url over an early media connection</p>
58
56
  <p><code>Loop</code> -
59
- number of times to play the url</p>
60
-
57
+ number of times to play the url</p>
61
58
 
62
59
  <h3>Outputs</h3>
63
60
  <dl class="message-properties">
64
- <dt>jambonz<span class="property-type">object</span></dt>
65
- <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>play</code> action appended </dd>
61
+ <dt>jambonz<span class="property-type">object</span></dt>
62
+ <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>play</code> action appended </dd>
66
63
  </dl>
67
64
 
68
65
  <h3>Details</h3>
@@ -71,6 +68,6 @@ RED.nodes.registerType('play',{
71
68
 
72
69
  <h3>References</h3>
73
70
  <ul>
74
- <li><a href="https://docs.jambonz.org/jambonz/#play">Jambonz play reference</a></li>
71
+ <li><a href="https://www.jambonz.org/docs/webhooks/play/">Jambonz play reference</a></li>
75
72
  </ul>
76
- </script>
73
+ </script>
package/src/nodes/play.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, v_resolve} = require('./libs')
6
2
 
7
-
8
3
  module.exports = function(RED) {
9
4
  function play(config) {
10
5
  RED.nodes.createNode(this, config);
@@ -1,8 +1,6 @@
1
1
  <!-- Javascript -->
2
-
3
-
4
2
  <script type="text/javascript">
5
- RED.nodes.registerType('rasa',{
3
+ RED.nodes.registerType('rasa',{
6
4
  category: 'jambonz',
7
5
  color: '#bbabaa',
8
6
  defaults: {
@@ -41,13 +39,9 @@
41
39
  });
42
40
  }
43
41
  });
44
-
45
-
46
42
  </script>
47
43
 
48
-
49
44
  <!-- HTML -->
50
-
51
45
  <script type="text/html" data-template-name="rasa">
52
46
  <div class="form-row">
53
47
  <label for="node-input-name"><i class="icon-tag"></i> Name</label>
@@ -77,7 +71,6 @@
77
71
  </script>
78
72
 
79
73
  <!-- Help Text -->
80
-
81
74
  <script type="text/html" data-help-name="rasa">
82
75
  <p>The rasa verb is used to connect a call to a Rasa assistant.
83
76
 
@@ -89,10 +82,10 @@
89
82
  <p><code>actionHook </code> - A webhook that is called when the rasa verb completes </p>
90
83
 
91
84
  <h3>Outputs</h3>
92
- <dl class="message-properties">
93
- <dt>payload<span class="property-type">object</span></dt>
94
- <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>rasa</code> action appended </dd>
95
- </dl>
85
+ <dl class="message-properties">
86
+ <dt>payload<span class="property-type">object</span></dt>
87
+ <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>rasa</code> action appended </dd>
88
+ </dl>
96
89
 
97
90
  <h3>Details</h3>
98
91
  The rasa verb performs speech recognition on the caller audio stream and sends it as text input to the rasa assistant using the rasa RestInput channel. Text returned from the assistant is played to the caller using text-to-speech. As the conversation proceeds, webhook events can be sent to notify of all of the messages being exchanged between the user and the bot, allowing your application to intercede at any point, e.g. to transfer the call to an agent.
@@ -102,5 +95,4 @@
102
95
  <li><a href="https://www.jambonz.org/docs/webhooks/rasa/">Jambonz rasa reference</a></li>
103
96
  </ul>
104
97
  </script>
105
-
106
98
  </script>
package/src/nodes/rasa.js CHANGED
@@ -1,8 +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 {appendVerb, v_resolve, v_text_resolve, doLCC, doCreateCall, doCreateMessage} = require('./libs')
1
+ var {appendVerb} = require('./libs')
6
2
 
7
3
  module.exports = function(RED) {
8
4
  function rasa(config) {
@@ -37,8 +37,7 @@
37
37
  </script>
38
38
 
39
39
  <!-- Help Text -->
40
- <script type="text/html" data-help-name="audio in">
41
- <script type="text/html" data-help-name="redirect">
40
+ <script type="text/html" data-help-name="redirect">
42
41
  <p>Redirect a call to a new application URL</p>
43
42
  <h3>Inputs</h3>
44
43
  <dl class="message-properties">
@@ -48,17 +47,14 @@
48
47
 
49
48
  <h3>Outputs</h3>
50
49
  <dl class="message-properties">
51
- <dt>jambonz<span class="property-type">object</span></dt>
52
- <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>redirect</code> action appended </dd>
50
+ <dt>jambonz<span class="property-type">object</span></dt>
51
+ <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>redirect</code> action appended </dd>
53
52
  </dl>
54
53
 
55
54
  <h3>Details</h3>
56
55
  The redirect verb retrieves a new URL to execute for the current call.
57
56
  <h3>References</h3>
58
57
  <ul>
59
- <li><a href="https://docs.jambonz.org/jambonz/#redirect">Jambonz redirect reference</a></li>
58
+ <li><a href="https://www.jambonz.org/docs/webhooks/redirect/">Jambonz redirect reference</a></li>
60
59
  </ul>
61
- </script>
62
-
63
-
64
60
  </script>
@@ -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, v_resolve} = require('./libs')
6
2
 
7
-
8
3
  module.exports = function(RED) {
9
4
  /** redirect */
10
5
  function redirect(config) {
@@ -20,5 +15,4 @@ module.exports = function(RED) {
20
15
  });
21
16
  }
22
17
  RED.nodes.registerType('redirect', redirect);
23
-
24
18
  }
@@ -48,7 +48,6 @@
48
48
  </dd>
49
49
  </dl>
50
50
 
51
-
52
51
  <h3>Details</h3>
53
52
  <dl>
54
53
  <dt>node-input-path</dt>
@@ -56,5 +55,4 @@
56
55
  <dt>S3 Bucket Access Point </dt>dt>
57
56
  <dd>The access point of an S3 bucket to upload recording to. This must allow public access.</dd>
58
57
  </dl>
59
-
60
58
  </script>
@@ -1,13 +1,9 @@
1
- const { notDeepStrictEqual } = require('assert');
2
- const { memoryStorage } = require('multer');
3
-
4
1
  module.exports = function(RED) {
5
2
  var WebSocket = require('ws');
6
3
  var url = require('url');
7
- var AWS = require('aws-sdk') ;
4
+ var AWS = require('aws-sdk') ;
8
5
  var S3Stream = require('s3-upload-stream');
9
6
 
10
-
11
7
  var serverUpgradeAdded = false;
12
8
  function handleServerUpgrade(request, socket, head) {
13
9
  const pathname = url.parse(request.url).pathname;
@@ -22,7 +18,6 @@ module.exports = function(RED) {
22
18
  }
23
19
  var listenerNodes = {};
24
20
 
25
-
26
21
  // A node red node that sets up a local websocket server
27
22
  function WebSocketListenerNode(n) {
28
23
  // Create a RED node
@@ -23,10 +23,8 @@
23
23
  prepareTtsControls(node);
24
24
  }
25
25
  });
26
-
27
26
  </script>
28
27
 
29
-
30
28
  <!-- HTML -->
31
29
  <script type="text/html" data-template-name="say">
32
30
  <div class="form-row">
@@ -79,7 +77,7 @@
79
77
  </select>
80
78
  </div>
81
79
  </fieldset>
82
- </script>
80
+ </script>
83
81
 
84
82
  <!-- Help Text -->
85
83
  <script type="text/html" data-help-name="say">
@@ -102,14 +100,18 @@
102
100
 
103
101
  <h3>Outputs</h3>
104
102
  <dl class="message-properties">
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>say</code> action appended </dd>
103
+ <dt>jambonz<span class="property-type">object</span></dt>
104
+ <dd> <code>msg.jambonz</code> will contain any previous actions provided to the input with the new <code>say</code> action appended </dd>
107
105
  </dl>
108
106
 
109
107
  <h3>Details</h3>
110
108
  The say command is used to send synthesized speech to the remote party.
111
109
  The text provided may be either plain text or may use SSML tags.
110
+
111
+ Within the text field you can use mustache syntax to insert properties of the msg, flow or global objects.
112
+ For example if you wanted to insert the value of msg.payload into the text you could put
113
+ <code>The payload is {{msg.payload}}</code>
112
114
  <h3>References</h3>
113
115
  <ul>
114
- <li><a href="https://docs.jambonz.org/jambonz/#say">Jambonz say reference</a></li>
115
- </script>
116
+ <li><a href="https://www.jambonz.org/docs/webhooks/say/">Jambonz say reference</a></li>
117
+ </script>
package/src/nodes/say.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_text_resolve} = require('./libs')
6
2
 
7
3
  module.exports = function(RED) {