On Mon, 2004-03-01 at 22:09, Andreas Anderson wrote: > Hi, > > does anyone has an LDAP based directory for the Cisco 7900 Series? I found > some directorys based on > sql, but an ldap directory would allow syncronisation with evolution, > mozilla, multisync (Palm, OPIE, Mobile phones etc...) > > Greez Andreas
Here's a simple one: <?php $ds=ldap_connect("ldapserver"); // must be a valid LDAP server! if ($ds) { $r=ldap_bind($ds); // this is an "anonymous" bind, typically // read-only access // Search surname entry $sr=ldap_search($ds, "ou=People,dc=domainname,dc=com", "telephoneNumber=*"); echo "<CiscoIPPhoneDirectory>\n"; echo "<Title>IP Telephony Directory</Title>\n"; echo "<Prompt>People reachable via VoIP</Prompt>\n"; $info = ldap_get_entries($ds, $sr); for ($i=0; $i<$info["count"]; $i++) { echo "<DirectoryEntry>\n"; echo "<Name>" . $info[$i]["cn"][0] . "</Name>\n"; # print_r($info); echo "<Telephone>" . $info[$i]["telephonenumber"][0] . "</Telephone>\n"; echo "</DirectoryEntry>\n"; } echo "</CiscoIPPhoneDirectory>"; ldap_close($ds); } else { echo "error"; } ?> _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users