add support for verifying jambonz signature

This commit is contained in:
Dave Horton committed 2021-04-19 10:52:20 -04:00
1 parent 93b29f51d8
commit 64fd092ae5
4 files changed
+30 -8

No files matched your search

+2 -2
View File
@@ -74,9 +74,9 @@ function validate(name, data) {
* Validate the payload for an updateCall request
*/
const validateCallUpdate = (opts) => {
const {call_hook, call_status, listen_status, mute_status, whisper} = opts;
const {call_hook, child_call_hook, call_status, listen_status, mute_status, whisper} = opts;
assert.ok(call_hook || call_status || listen_status || mute_status || whisper,
assert.ok(call_hook || child_call_hook || call_status || listen_status || mute_status || whisper,
`calls.update: invalid request ${JSON.stringify(opts)}`);
if (call_status) assert.ok(['completed', 'no-answer'].includes(call_status),