<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta name="Generator" content="Zarafa WebAccess v6.30.1-16192">
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<title>RE: Re: [Kamailio-Users] ldap_search get result URL</title>
<style type="text/css">
body
{
font-family: Arial, Verdana, Sans-Serif;
font-size: 12px;
padding: 5px 5px 5px 5px;
margin: 0px;
border-style: none;
background-color: #ffffff;
}
p, ul, li
{
margin-top: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body>
<br /><blockquote style="border-left: 2px solid rgb(50, 95, 186); padding-left: 5px; margin-left: 5px;">>> How can i access LDAP URI of ldap_search() results in routing script?<br />>> I need to do recursive search in company directory within persons that belong to groups, i need to get group id without storing groupid as person attribute, but as an element of resulting URL.<br />>> Query base name: dc=example,dc=com.<br />>> Query result is cn=user1,ou=group1,dc=example,dc=com.<br />>> I can easily get user1 attributes, but how to get ou?<br />>> <br />> You can always change the Base DN in the ldap_search string with the new base, so store the result in a variable, cut out the ou= part and change the base dn.<br />> <br />if you can get the result in a variable, then you can use <br />transformations to get the value of 'ou' -- hope i understood correctly <br />what you need:<br />http://www.kamailio.org/dokuwiki/doku.php/transformations:1.5.x</blockquote><p>Problem was my misunderstanding of LDAP concept. The answer is that 'ou' is attribute of user and can be fetched to kamailio variable as usually.</p><br />
</body>
</html>