Skip to content

Commit

Permalink
fix: llc validation and missing break (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
avoylenko authored Aug 23, 2024
1 parent 6162d9e commit bc38d04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/nodes/lcc.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,16 @@
return action !== 'send_dtmf' || v.length > 0;
}},
dtmfDigitType: {value: 'str'},
dtmfDuration: {value: ''},
dtmfDuration: {value: '', validate: function(v) {
const action = $('#node-input-action').val();
return action !== 'send_dtmf' || v.length > 0;
}},
dtmfDurationType: {value: 'str'},
tag: {value: ''},
tagType: {value: 'str'},
tag: {value: '{}', validate: function(v) {
const action = $('#node-input-action').val();
return action !== 'tag' || v.length > 0;
}},
tagType: {value: 'json'},
},
inputs:1,
outputs:1,
Expand Down Expand Up @@ -118,7 +124,7 @@
});
$('#node-input-sipRequestHeaders').typedInput({
default: $('#node-input-sipRequestHeadersType').val(),
types: ['json','msg', 'flow', 'global'],
types: ['msg', 'flow', 'global', 'json', 'jsonata'],
typeField: $('#node-input-sipRequestHeadersType')
});
$('#node-input-siprecServerURL').typedInput({
Expand All @@ -143,7 +149,7 @@
});
$('#node-input-tag').typedInput({
default: $('#node-input-tagType').val(),
types: ['json', 'msg', 'flow', 'global', 'jsonata', 'env', mustacheType],
types: ['msg', 'flow', 'global', 'json', 'jsonata', 'env', mustacheType],
typeField: $('#node-input-tagType')
});

Expand Down
1 change: 1 addition & 0 deletions src/nodes/lcc.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function lcc(config) {
break;
case 'unhold_conf':
opts.conf_hold_status = 'unhold';
break;
case 'whisper':
Object.assign(opts, {
whisper: {
Expand Down

0 comments on commit bc38d04

Please sign in to comment.