Skip to content

Commit

Permalink
Merge pull request #21 from jambonz/feat/media-path
Browse files Browse the repository at this point in the history
add support for media-path in updateCall
  • Loading branch information
davehorton authored Nov 17, 2024
2 parents 53ca19d + dfc2a94 commit 83d9715
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 83d9715

Please sign in to comment.