[SR-Users] ldap returning attributes list

Virmantas Variakojis virmantas.variakojis at gmail.com
Thu Sep 4 14:49:28 CEST 2014


Hi,

I'm trying to fetch attribute list with kamailio ldap_search:

ldap_search("ldap://agents/ou=Xxxxx,dc=xxxx,dc=yyyyyy,dc=zz?memberOf?sub?(sAMAccountName=$fU)");

ldap_result("memberOf/$avp(s:ldapmemberof1)");
xlog("L_INFO", "LDAP $fU memberOf = $avp(s:ldapmemberof1)");
if (ldap_result_next())
{
xlog("L_INFO", "if loop ldap_result");
           ldap_result("memberOf/$avp(s:ldapmemberof2)");
           xlog("L_INFO", "LDAP $fU memberOf = $avp(s:ldapmemberof2)");
}

There's must be seven returning attributes list of memberOf, but I can only
retrieve only one of them (looks like last of seven). First xlog output log
into my log file, but if loop didn't start. What I'm doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140904/e4eae85e/attachment.html>


More information about the sr-users mailing list