diff --git a/lib/routes/api/accounts.js b/lib/routes/api/accounts.js index 0683b43..48ddcd6 100644 --- a/lib/routes/api/accounts.js +++ b/lib/routes/api/accounts.js @@ -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)) {