<div dir="ltr"><font color="#3366ff"><font><font face="tahoma,sans-serif">Hi Saul,</font></font></font><div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">username_avp_spec was previously a AUTH module parameter to specify a variable that was passed to pv_www_authorize implicitly (the function doesn't take arguments). </font></font></font><span style="font-family:tahoma,sans-serif;color:rgb(51,102,255)">Now you should use the new pv_www_authenticate and pass to it explicitly the credentials as arguments.</span></div>
<div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">So forget about username_avp_spec since it doesn't exist as module param anymore (this is why you are getting the error). Store the result of ldap_search in the avps as in the tutorial using ldap_result, and pass them to pv_www_authenticate as parameters. pv_www_authenticate takes the following arguments:</font></font></font></div>
<div><font color="#3366ff"><font><font face="tahoma,sans-serif">- realm: which you can get from "to domain" using $td</font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">- password: $avp(s:password)</font></font></font></div>
<div><font color="#3366ff"><font><font face="tahoma,sans-serif">- flag: set it to 0 as a first test</font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div>
<div><font color="#3366ff"><font><font face="tahoma,sans-serif">example:</font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">pv_www_authorize("$td", "$avp(s:password)", 0)</font></font></font></div>
<div><font color="#3366ff"><font><font face="tahoma,sans-serif"><br></font></font></font></div><div><font color="#3366ff"><font><font face="tahoma,sans-serif">This function takes the username from the authentication header, so no need to pass it anymore as argument.</font></font></font></div>
<div dir="ltr"><font color="#3366ff" face="tahoma, sans-serif"><br>
</font><div><font color="#3366ff" face="tahoma, sans-serif">Reda</font></div></div><br>
<br><br><div class="gmail_quote">On Thu, May 3, 2012 at 8:47 PM, Saul Waizer <span dir="ltr"><<a href="mailto:saulwaizer@gmail.com" target="_blank">saulwaizer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello List,<div><br></div><div>I am trying to incorporate an existing LDAP directory with our Kamailio installation for SIP authentication. A good friend suggested to checkout this tutorial and adapt it to fit my needs (and current version)</div>
<div><br></div><div><a href="http://www.kamailio.org/dokuwiki/doku.php/tutorials:openser-auth-ldap" target="_blank">http://www.kamailio.org/dokuwiki/doku.php/tutorials:openser-auth-ldap</a></div><div><br></div><div><div>
It seems like the AUTH module does not contain the function username_spec (which I believe is not used anymore) but the username_avp_spec which is not part of the AUTH module but the H350 module <a href="http://kamailio.org/docs/modules/3.2.x/modules_k/h350.html" style="color:rgb(17,85,204)" target="_blank">http://kamailio.org/docs/modules/3.2.x/modules_k/h350.html</a></div>
<div><br></div><div>I enabled the h350 module and tried setting the params as described in the documentation:</div><div><br></div><div><div>modparam("auth", "username_spec", "$avp(s:username)")</div>
<div>modparam("auth", "password_spec", "$avp(s:password)")</div><div>modparam("auth", "calculate_ha1", 1)</div></div><div><br></div><div>I got the following error after checking the configuration:</div>
<div><br></div><div>ERROR: <core> [modparam.c:151]: set_mod_param_regex: parameter <username_spec> not found in module <auth></div></div><div><br></div><div>I am running kamailio 3.2.3 (i386/linux) Ubuntu</div>
<div><br></div><div><font color="#222222" face="arial, sans-serif">Thank you in advance!</font></div><div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif"><br>
</font></div><div><font color="#222222" face="arial, sans-serif"> </font></div><div><br></div><div><br></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>