mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-07-05 03:31:56 +00:00
support inband dtmf
This commit is contained in:
@@ -224,7 +224,8 @@ function validateUpdateCall(opts) {
|
||||
'conf_mute_status',
|
||||
'mute_status',
|
||||
'sip_request',
|
||||
'record'
|
||||
'record',
|
||||
'inband_dtmf',
|
||||
]
|
||||
.reduce((acc, prop) => (opts[prop] ? ++acc : acc), 0);
|
||||
|
||||
@@ -266,6 +267,9 @@ function validateUpdateCall(opts) {
|
||||
if (opts.record && !opts.record.action) {
|
||||
throw new DbErrorBadRequest('record requires action property');
|
||||
}
|
||||
if (opts.inband_dtmf && !['digit'].includes(opts.inband_dtmf)) {
|
||||
throw new DbErrorBadRequest('invalid inband_dtmf');
|
||||
}
|
||||
if ('startCallRecording' === opts.record?.action && !opts.record.siprecServerURL) {
|
||||
throw new DbErrorBadRequest('record requires siprecServerURL property when starting recording');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user