allow startrecording without siprec url for cloud (#530)

* allow startrecording without siprecm url for cloud

* update dependencies
This commit is contained in:
Sam Machin
2026-01-29 23:21:31 +00:00
committed by GitHub
parent bc26651cdb
commit f5fa3bdffb
3 changed files with 30 additions and 15 deletions

View File

@@ -354,7 +354,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)) {