[Kamailio-Users] ldap_search get result URL

Daniel-Constantin Mierla miconda at gmail.com
Thu Dec 10 13:26:09 CET 2009



On 12/10/09 1:20 PM, Olle E. Johansson wrote:
> 10 dec 2009 kl. 12.57 skrev Andrey Utkin:
>
>    
>> How can i access LDAP URI of ldap_search() results in routing script?
>> 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.
>> Query base name: dc=example,dc=com.
>> Query result is cn=user1,ou=group1,dc=example,dc=com.
>> I can easily get user1 attributes, but how to get ou?
>>      
> 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.
>    
if you can get the result in a variable, then you can use 
transformations to get the value of 'ou' -- hope i understood correctly 
what you need:
http://www.kamailio.org/dokuwiki/doku.php/transformations:1.5.x

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
* http://www.asipto.com/




More information about the Users mailing list