Skip to content

Commit

Permalink
add support for media-path in updateCall
Browse files Browse the repository at this point in the history
  • Loading branch information
davehorton committed Nov 17, 2024
1 parent 53ca19d commit dfc2a94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand All @@ -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`);

Expand Down

0 comments on commit dfc2a94

Please sign in to comment.