From 8fd7fa81aebffb2ff3094791ed12d15b0110296f Mon Sep 17 00:00:00 2001 From: Quan HL Date: Wed, 15 Nov 2023 16:15:31 +0700 Subject: [PATCH] wip --- lib/routes/api/accounts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/api/accounts.js b/lib/routes/api/accounts.js index 12e37c6..edd3fd2 100644 --- a/lib/routes/api/accounts.js +++ b/lib/routes/api/accounts.js @@ -225,7 +225,7 @@ function validateUpdateCall(opts) { 'mute_status', 'sip_request', 'record', - 'inband_dtmf', + 'dtmf', ] .reduce((acc, prop) => (opts[prop] ? ++acc : acc), 0); @@ -267,8 +267,8 @@ function validateUpdateCall(opts) { if (opts.record && !opts.record.action) { throw new DbErrorBadRequest('record requires action property'); } - if (opts.inband_dtmf && !opts.inband_dtmf.digit) { - throw new DbErrorBadRequest('invalid inband_dtmf'); + if (opts.dtmf && !opts.dtmf.digit) { + throw new DbErrorBadRequest('invalid dtmf'); } if ('startCallRecording' === opts.record?.action && !opts.record.siprecServerURL) { throw new DbErrorBadRequest('record requires siprecServerURL property when starting recording');