allow startrecording without siprecm url for cloud

This commit is contained in:
Sam Machin
2025-12-30 11:35:40 +00:00
parent 3f1e756467
commit da4b8c190d
+1 -1
View File
@@ -344,7 +344,7 @@ function validateUpdateCall(opts) {
if (opts.dtmf && !opts.dtmf.digit) {
throw new DbErrorBadRequest('invalid dtmf');
}
if ('startCallRecording' === opts.record?.action && !opts.record.siprecServerURL) {
if (opts.record?.action && !opts.record.siprecServerURL && (!opts.record.type || opts.record.type !== 'cloud')) {
throw new DbErrorBadRequest('record requires siprecServerURL property when starting recording');
}
if (opts.tag && (typeof opts.tag !== 'object' || Array.isArray(opts.tag) || opts.tag === null)) {