Good morning,
I am looking to add an LDAP directory for directory search but in reverse to do the name of the callers.
On WAzo UI, I see Directory > Source
I add an LDAP:
Now apart from the fact that I am not at all sure that it is correctly configured, how do I assign it to the positions?
Thanks
You need to activate the feature you want to do with this directory and map the field correctly in the interface. Also check the log on wazo-dird to debug the request.
The features are search contact in phone, reverse the caller id number to a name, or make a contact favorite (by API, you need to dev an app to use it). Check the profiles to finish your configuration and add the source âannuaireâ.
Information here: https://wazo-platform.org/uc-doc/administration/contact_directories/general
Good morning,
thank you for your return
So on the principle if we base wazo-ui:
we configure in : Directory > source > ldap , the directory
andâŠafter?
For phones, I guess I need to add this source? If yes, how do I add it?
The ldap exists and I have an independent interface which manages this directory
Thanks
hello,
french:
tu as créé ton annuaire LDAP, en supposant que les champs correspondent bien.
Maintenant, il te faut lâajouter dans les sources.
Pour cela:
Directory / profiles
du sĂ©lectionne le âdefaultâ et tu le modifie.
tu clique sur le petit + en bas Ă droite du tableau
et tu pourras choisir ton annuaire ldap dans la liste déroulante.
ensuite, il te faut faire des requĂȘtes dessus.
je nâai pas testĂ© lâannuaire LDAP, mais voilĂ un code reactJs qui pourrait fonctionner (Ă modifier au besoin):
const contactsPhonebooksGet = async () => {
const phonebookSources = await Wazo.dird.fetchSourcesFor("default")
const filteredPhonebookSources = phonebookSources.items.filter(
(source) => source.backend === "ldap"
);
const results = await Promise.all(
filteredPhonebookSources.map(async (source) => {
const phonebookContacts = await Wazo.dird.fetchPhonebookContacts(source);
const itemsWithSource = phonebookContacts.items.map((item) => ({
...item,
backend: source.backend,
source: source.name,
sourceId: item.id,
name: item.firstname + ' ' + item.lastname,
favorited: false
}));
return { source, phonebookContacts: { ...phonebookContacts, items: itemsWithSource } };
})
);
const allItems = results.reduce((accumulator, currentItem) => {
accumulator.push(...currentItem.phonebookContacts.items);
return accumulator;
}, []);
setContactsPhonebook(allItems)
}
au résultat du auras un tableau de tous les contacts de tous les annuaires ayant la valeur:
backend = âldapâ
(Ă voir si câest la bonne valeur
on peut la trouver avec un console.log de phonebookSources)
Dans ce code, tu peux donc avoir plusieurs annuaires LDAP.
cheers
Thanks a lot in fact I donât really know what was blocking it but I tried again and it worked without a problem.
thank you
Just a follow-up question:
in my LDAP, for a user, I have a fixed field (telephonenumber), and mobile (mobile)
When I search for a name from the post, I only get a return on the fixed field. The mobile field does not appear. How can I have 2 lines for the name to search for and be able to distinguish them (one fixed, the other mobile for example)?
THANKS
hello florent,
as you speak french, my answer will be in french
dans ta source annuaire LDAP, tu dois avoir un champ âcolumnsâ dans lequel tu renseigne tes champs Ă retourner, avec un nom correspondant
tu peux Ă©diter ton annuaire
et ajouter
mobile {mobile}
tu peux ajouter autant de champs que tu veux, comme
company
departement
CN
displayName
mail
tu peux facilement retrouver les champs disponibles dans lâAD en recherchant:
active directory user attributes list
sur google
ensuite, tu pourras Ă©diter âsearch columnsâ
pour dĂ©finir quels sont les champs requĂ©tĂ©s lors dâune recherche
cheers !
This allows me to work on my English
So I had already tried to add this field and unfortunately it didnât work
I always only have the landline number (telephone number) which is displayed
thanks
displayed where ?
if you try to get this contact with the API
you should have all columns in a json
can we have more explaination or a screenshot ?
because, with this API, what you want is what you get
cheers
I donât use an API (too noob for now)
Yes indeed I did not specify, but my tests are only on telephone terminals. I do a simple directory search in my Mitel or Yealink terminals (the result is the same)
Well,
i think this is a template related issue.
i donât use phone for call, thatâs so 2000
maybe, you have to name the desired columns to make it match the directory.xml for your phone
example, you yealink is configured, from factory to display
name
telephone
number
etc
so, on your ldap source, you must have the same name to match the device configuration.
As i donât know how to change the default phonebook.xml, i canât answer your question.
google find it for me:
<DirectoryEntry>
<Name>Chris Wild</Name>
<Telephone>5053</Telephone>
<Telephone>5553</Telephone>
</DirectoryEntry>
<DirectoryEntry>
<Name>Door Intercom</Name>
<Telephone>sip:123@10.10.0.200</Telephone>
</DirectoryEntry>
<DirectoryEntry>
<Name>Provu</Name>
<Telephone>01484840048</Telephone>
</DirectoryEntry>
looks like default phonebook.xml only check for Name and Telephone entries.
hope it helps you.
cheers
edit,
looks like you can have multiple Telephone columns
maybe thatâs the fix.
name all related number columns to telephone and it will match !
Good morning
thanks for your return.
However, it is not the search for the position that poses a problem. In fact the station is configured to search in the wazo directory and additional sources
It will request the address : http://addresswazo:9498/0.1/lookup/default
The result appears to be JSON which is then retrieved by the post.
It is this search for JSON that should be adapted.
thanks
I just need to post this message to find the solution:
it was a syntax problem: mobile no but phone_mobile yes
In columns, I just had to put phone_mobile in name opposite my associated ldap field. And from now on in my directory search for my station (Mitel and Yealink identically) I have a line marked âname (mobile)â which appears
thank you
1 Like