@jambonz/node-red-contrib-jambonz 2.4.6 → 2.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/node-red-contrib-jambonz",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
4
4
  "description": "Node-RED nodes for jambonz platform",
5
5
  "keywords": [
6
6
  "node-red"
@@ -1,29 +1,33 @@
1
1
  <!-- Javascript -->
2
2
  <script type="text/javascript">
3
- var mustacheType = {
3
+ var mustacheType = {
4
4
  value: 'mustache',
5
5
  label: 'mustache',
6
6
  hasvalue: true,
7
7
  icon: 'resources/@jambonz/node-red-contrib-jambonz/icons/mustache.svg'
8
8
  }
9
- RED.nodes.registerType('dial',{
9
+ RED.nodes.registerType('dial', {
10
10
  category: 'jambonz',
11
11
  color: '#bbabaa',
12
12
  defaults: {
13
13
  name: {value: ''},
14
- targets:{value:[{type: 'phone', dest: '', user: '', pass: '', varType: 'str', trunk: '', trunkType: 'str'}]},
14
+ targets: {value:[{type: 'phone', dest: '', user: '', pass: '', varType: 'str', trunk: '', trunkType: 'str'}]},
15
15
  headers: {value: []},
16
16
  actionhook: {value: ''},
17
17
  actionhookType: {value: 'str'},
18
18
  answeronbridge: {value: false},
19
19
  callerid: {value: ''},
20
20
  calleridType: {value: ''},
21
+ callername: {value: ''},
22
+ callernameType: {value: ''},
21
23
  confirmhook: {value: ''},
22
24
  confirmhookType: {value: 'str'},
23
25
  dialmusic: {value: ''},
24
26
  dialmusicType: {value: 'str'},
25
27
  dtmfcapture: {value: ''},
26
28
  dtmfcaptureType: {value: 'str'},
29
+ referhook: {value: ''},
30
+ referhookType: {value: 'str'},
27
31
  dtmfhook: {value: ''},
28
32
  dtmfhookType: {value: 'str'},
29
33
  timelimit: {validate:RED.validators.regex(/^\d*$/) },
@@ -70,6 +74,10 @@
70
74
  types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
71
75
  typeField: $('#node-input-calleridType')
72
76
  });
77
+ $('#node-input-callername').typedInput({
78
+ types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
79
+ typeField: $('#node-input-callernameType')
80
+ });
73
81
  $('#node-input-target-property-trunk').typedInput({
74
82
  types: ['num', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
75
83
  typeField: $('#node-input-target-property-trunk')
@@ -90,6 +98,10 @@
90
98
  types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
91
99
  typeField: $('#node-input-dtmfcaptureType')
92
100
  });
101
+ $('#node-input-referhook').typedInput({
102
+ types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
103
+ typeField: $('#node-input-referhookType')
104
+ });
93
105
  $('#node-input-dtmfhook').typedInput({
94
106
  types: ['str', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
95
107
  typeField: $('#node-input-dtmfhookType')
@@ -382,7 +394,7 @@
382
394
  <input type="text" id="node-input-name" placeholder="Name">
383
395
  </div>
384
396
  <div class="form-row" style="margin-bottom:0;">
385
- <label><i class="fa fa-list"></i><span>Dial Targets</span></label>
397
+ <label><i class="fa fa-list"></i> <span>Dial Targets</span></label>
386
398
  </div>
387
399
  <div class="form-row node-input-target-container-row">
388
400
  <ol id="node-input-target-container"></ol>
@@ -398,9 +410,14 @@
398
410
  </div>
399
411
  <div class="form-row">
400
412
  <label for="node-input-callerid">Caller ID</label>
401
- <input type="text" id="node-input-callerid" placeholder="Caller ID to place on outbound call">
413
+ <input type="text" id="node-input-callerid" placeholder="caller id to place on outbound call">
402
414
  <input type="hidden" id="node-input-calleridType">
403
415
  </div>
416
+ <div class="form-row">
417
+ <label for="node-input-callername">Caller name</label>
418
+ <input type="text" id="node-input-callername" placeholder="caller name to place on outbound call">
419
+ <input type="hidden" id="node-input-callernameType">
420
+ </div>
404
421
  <div class="form-row">
405
422
  <label for="node-input-confirmhook">Confirm hook</label>
406
423
  <input type="text" id="node-input-confirmhook" placeholder="webhook to run on called party after answer">
@@ -416,6 +433,11 @@
416
433
  <input type="text" id="node-input-dtmfcapture" placeholder="comma-separated list of dtmf captures">
417
434
  <input type="hidden" id="node-input-dtmfcaptureType">
418
435
  </div>
436
+ <div class="form-row">
437
+ <label for="node-input-referhook">Refer hook</label>
438
+ <input type="text" id="node-input-referhook" placeholder="webhook to call when sip refer is received">
439
+ <input type="hidden" id="node-input-referhookType">
440
+ </div>
419
441
  <div class="form-row">
420
442
  <label for="node-input-dtmfhook">Dtmf hook</label>
421
443
  <input type="text" id="node-input-dtmfhook" placeholder="webhook to call when dtmf is captured">
package/src/nodes/dial.js CHANGED
@@ -46,9 +46,11 @@ module.exports = function(RED) {
46
46
  timeLimit: config.timelimit ? parseInt(config.timelimit) : null,
47
47
  timeout: config.timeout ? parseInt(config.timeout) : null,
48
48
  callerId: new_resolve(RED, config.callerid, config.calleridType, node, msg),
49
+ callerName: new_resolve(RED, config.callername, config.callernameType, node, msg),
49
50
  actionHook: new_resolve(RED, config.actionhook, config.actionhookType, node, msg),
50
51
  confirmHook: new_resolve(RED, config.confirmhook, config.confirmhookType, node, msg),
51
52
  dialMusic: new_resolve(RED, config.dialmusic, config.dialmusicType, node, msg),
53
+ referHook: new_resolve(RED, config.referhook, config.referhookType, node, msg),
52
54
  dtmfHook: new_resolve(RED, config.dtmfhook, config.dtmfhookType, node, msg),
53
55
  };
54
56