Registration lookup on Invite
smartin114--- via sr-users <[email protected]>
| Newsgroups | gmane.comp.voip.ser |
|---|---|
| Message-ID | <[email protected]> |
Hi, very new to this and trying to add some security for inbound invites. We only want to allow invites from users that are in the registration table, but everything gets a 403, not just an Invite from an unregistered user.
if (KSR.is_INVITE()) {
if (KSR.registrar.lookup("location", KSR.pv.get("$fu") < 0 )) {
KSR.info("Check user registation before passing invite: " + username + KSR.pv.get("$f"));
KSR.sl.send_reply(403, "Forbidden");
KSR.x.exit();
}
}
Any help is appreciated.
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!