mirror of
https://github.com/jambonz/jambonz-node.git
synced 2025-12-19 05:17:49 +00:00
Merge pull request #21 from jambonz/feat/media-path
add support for media-path in updateCall
This commit is contained in:
@@ -16,7 +16,8 @@ const validateCallUpdate = (opts) => {
|
||||
whisper,
|
||||
conf_hold_status,
|
||||
sip_request,
|
||||
dub
|
||||
dub,
|
||||
media_path
|
||||
} = opts;
|
||||
|
||||
assert.ok(call_hook || child_call_hook || call_status ||
|
||||
@@ -32,6 +33,9 @@ const validateCallUpdate = (opts) => {
|
||||
if (conf_hold_status) assert.ok(['hold', 'unhold'].includes(conf_hold_status),
|
||||
`invalid mute_status: ${mute_status}, must be 'mute' or 'unmute'`);
|
||||
|
||||
if (media_path) assert.ok(['no-media', 'partial-media', 'full-media'].includes(media_path),
|
||||
`invalid media_path: ${media_path}, must be 'no-media', 'partial-media' or 'full-media'`);
|
||||
|
||||
if (whisper) assert.ok(whisper.verb,
|
||||
`invalid whisper: ${JSON.stringify(whisper)}, must be a 'play' or 'say' verb`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user