<div dir="ltr">Hi guys,<br><div>I have tried to integrate kamailio and ldap.It seems like both are taking to each other.<br>Here the purpose of ldap is for back-end support for sip user authentication rather than kamailio database.However i am able to log in but could not make call between sip users.I could not figure out what i am missing.</div><div><br></div><div>Here is the routing block for ldap in my kamailio.cfg<br><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">request_route {<br>        route(LDAPAUTH);<br>        <br>}</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">--- </blockquote></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">route[LDAPAUTH] <br>{<br>    if(is_method("REGISTER"))<br>    {<br>        if(is_present_hf("Authorization"))<br>        {<br><span class="" style="white-space:pre">   </span>    if (!ldap_search("ldap://sipaccounts/ou=MyUsers,dc=example,dc=com?cn,userPassword?one?(cn=$fU)"))<br>            {<br>                switch ($retcode)<br>                {<br>                    case -1:<br>                       sl_send_reply("404", "User Not Found");<br>                       exit;<br>                    case -2:<br>                       sl_send_reply("500", "Internal server error");<br>                       exit;<br>                    default:<br>                       exit;<br>                }<br>            }<br>            ldap_result("cn/$avp(username)");<br>            ldap_result("userPassword/$avp(password)");<br><span class="" style="white-space:pre">           </span>route(REGISTRAR);<br>            if (!pv_www_authenticate("$td", "$avp(password)", "4")) <br><span class="" style="white-space:pre">        </span>    {<br>                 www_challenge("$td", "1");<br>             <span class="" style="white-space:pre">   </span>exit;    <br>            }<br>            sl_send_reply("200", "ok");<br>            exit; <br>        } <br>        else <br>        {<br>            www_challenge("$td", "1");<br>            exit;<br>        }<br>    } <br>}</blockquote><br></div></div>