<!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;">&gt;&gt; How can i access LDAP URI of ldap_search() results in routing script?<br />&gt;&gt; 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 />&gt;&gt; Query base name: dc=example,dc=com.<br />&gt;&gt; Query result is cn=user1,ou=group1,dc=example,dc=com.<br />&gt;&gt; I can easily get user1 attributes, but how to get ou?<br />&gt;&gt; &nbsp; &nbsp; &nbsp;<br />&gt; 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 />&gt; &nbsp; &nbsp;<br />if you can get the result in a variable, then you can use <br />transformations to get the value of &#39;ou&#39; -- 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 &#39;ou&#39; is attribute of user and can be fetched to kamailio variable as usually.</p><br />
</body>
</html>