@jambonz/node-red-contrib-jambonz 2.4.9 → 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/sip-request.html +13 -13
- package/src/nodes/sip-request.js +3 -3
package/package.json
CHANGED
|
@@ -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)
|