support for llc tag (#262)

This commit is contained in:
Anton Voylenko
2023-11-17 15:48:34 +02:00
committed by GitHub
parent dcfe6cc05d
commit 1d69457ddc

View File

@@ -224,7 +224,8 @@ function validateUpdateCall(opts) {
'conf_mute_status',
'mute_status',
'sip_request',
'record'
'record',
'tag'
]
.reduce((acc, prop) => (opts[prop] ? ++acc : acc), 0);
@@ -269,6 +270,9 @@ function validateUpdateCall(opts) {
if ('startCallRecording' === opts.record?.action && !opts.record.siprecServerURL) {
throw new DbErrorBadRequest('record requires siprecServerURL property when starting recording');
}
if (opts.tag && (typeof opts.tag !== 'object' || Array.isArray(opts.tag) || opts.tag === null)) {
throw new DbErrorBadRequest('invalid tag data');
}
}
function validateTo(to) {