@jambonz/node-red-contrib-jambonz 2.6.1 → 2.6.3

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.6.1",
3
+ "version": "2.6.3",
4
4
  "description": "Node-RED nodes for jambonz platform",
5
5
  "keywords": [
6
6
  "node-red"
package/src/nodes/dial.js CHANGED
@@ -73,8 +73,12 @@ module.exports = function(RED) {
73
73
  data.boostAudioSignal = await new_resolve(RED, config.boostaudiosignal, config.boostaudiosignalType, node, msg)
74
74
  }
75
75
 
76
- if (config.forwardPAI != 'default') {
77
- data.forwardPAI = JSON.parse(config.forwardPAI);
76
+ if (config.forwardPAI !== undefined && config.forwardPAI !== 'default') {
77
+ if (config.forwardPAI === 'true' || config.forwardPAI === 'false') {
78
+ data.forwardPAI = config.forwardPAI === 'true';
79
+ } else {
80
+ node.warn(`Invalid forwardPAI value: ${config.forwardPAI}`);
81
+ }
78
82
  }
79
83
  // headers
80
84
  const headers = {};
package/src/nodes/lcc.js CHANGED
@@ -172,6 +172,7 @@ function lcc(config) {
172
172
  if (err.statusCode) {
173
173
  msg.statusCode = err.statusCode;
174
174
  msg.errorMessage = err.statusText;
175
+ msg.payload = err.body;
175
176
  } else {
176
177
  const errorMessage = `Error sending LCC ${err.message}`;
177
178
  if (done) done(errorMessage);