mirror of
https://github.com/jambonz/sbc-sip-sidecar.git
synced 2026-10-04 02:04:20 +00:00
fix registration hook
This commit is contained in:
+6
-4
@@ -68,10 +68,12 @@ const checkAccountLimits = async(req, res, next) => {
|
||||
...req.locals,
|
||||
account_sid: account.account_sid,
|
||||
webhook_secret: account.webhook_secret,
|
||||
registration_hook_url: account.registration_hook.url,
|
||||
registration_hook_method: account.registration_hook.method,
|
||||
registration_hook_username: account.registration_hook.username,
|
||||
registration_hook_password: account.registration_hook.password
|
||||
...(account.registration_hook && {
|
||||
registration_hook_url: account.registration_hook.url,
|
||||
registration_hook_method: account.registration_hook.method,
|
||||
registration_hook_username: account.registration_hook.username,
|
||||
registration_hook_password: account.registration_hook.password
|
||||
})
|
||||
};
|
||||
debug(account, `checkAccountLimits: retrieved account for realm: ${realm}`);
|
||||
}
|
||||
|
||||
@@ -189,10 +189,7 @@ const digestChallenge = async(req, res, next) => {
|
||||
const {stats} = req.srf.locals;
|
||||
const {
|
||||
account_sid,
|
||||
registration_hook_url,
|
||||
registration_hook_method,
|
||||
registration_hook_username,
|
||||
registration_hook_password,
|
||||
registration_hook,
|
||||
webhook_secret
|
||||
} = req.locals;
|
||||
// Cannot detect account, reject register request
|
||||
|
||||
Reference in New Issue
Block a user