Greetings All.
I have managed to set up OpenSER with LDAP authentication. Now I would
like it to create memory cached aliases each time a user registers. I
do not wan to use any persistent storage because I have it already it
is my LDAP directory. However, I would like OpenSER to cache those
aliases as doing ldap lookup for every message does not look too apealing
to me.
Let me explain how I see it:
if (is_method("REGISTER"))
{
if(is_present_hf("Proxy-Authorization"))
{
if
(!ldap_search("ldap://sipaccounts/ou=dept,o=TELMARK,c=PL?uid,mail,uidNumber,userPassword?one?(uid=$f))
{ #error handling }
ldap_result("uid/$avp(s:username)");
ldap_result("userPassword/$avp(s:password)");
ldap_result("mail/$avp(s:longalias)");
ldap_result("uidNumber/$avp(s:numalias)");
if(pv_proxy_authorize("telmark"))
{
proxy_challenge("telmark", "1");
exit;
}
} else {
proxy_challenge("telmark", "1");
exit;
}
if(!save("location"))
sl_reply_error();
# And here the big thing!
}
What to do to make
save("aliases");
(called twice) save uidNumber and mail (without @domain, these are
transformations, I know) as aliases in usrloc?
PS. Please cc answers I am not a subscriber.
--
Best regards,
Ćukasz<