On Tue, 8 Jan 2008, liu york wrote:
I want to restrict invite when regiest
unsuccessful even the invite
request have right authentication. actually,i just want to only one
person can call to pstn,others cant call even have sipid and
password.now i has set by modparam("registrar", "max_contacts",
10).but
cant restrict the invite by the sipphone no need regiestion.
Are you authenticating INVITEs differently than you are authenticating
registrations? In other words, are the authentication realm and required
credentials different for your proxy_challenge() than they are for
your www_challenge() for handling REGISTER requests?
If they are, it seems that all you should have to do is do a lookup()
and see if it fails. Presumably, you are doing a save() into your
registrar/usrloc only on valid REGISTER challenges?
i.e.
if(is_method("INVITE")) {
if(!lookup("location")) {
if(!registered("location")) {
is sufficient
btw: this does not give you any security
regards
klaus
sl_send_reply("403",
"Forbidden -- REGISTER invalid.");
exit;
}
}
--
Alex Balashov
Evariste Systems
Web :
http://www.evaristesys.com/
Tel : +1-678-954-0670
Direct : +1-678-954-0671
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users