• Welcome to SAIL Community Supported PBX . Please login or sign up.
 

Yealink templates: LDAP lookup by default

Started by davidiwharper, April 27, 2017, 06:48:06 PM

Previous topic - Next topic

davidiwharper

Hi all

I've been playing around with Yealink provisioning, and noticed that although LDAP supported is enabled in the default templates, we can't set up LDAP as an enabled directory without further changes.

First, we'll need to add the following to the yealink.Common template:


# turn on ldap
ldap.enable = 1

# customise directory lookups
directory_setting.url = http://$localip/provisioning/favorite_setting.xml
super_search.url = http://$localip/provisioning/super_search.xml


We'll now need to create these two templates, each by clicking the + sign (top right of the Templates screen) and entering the following:


  • Device: filename (see below)
  • Technology: Custom
  • Copy: New
  • Description: (see below)

We'll need two extra files.

1. favorite_setting.xml - Yealink Favourite Template


<root_favorite_set>
        <item id_name="ldap" display_name="LDAP" priority="1" enable="1" dev="common" />
        <item id_name="localdirectory" display_name="Local Directory" priority="2" enable="1" dev="common" />
        <item id_name="history" display_name="History" priority="3" enable="0" dev="common" />
        <item id_name="networkcalllog" display_name="Network CallLog" priority="4" enable="0" dev="common" />
        <item id_name="remotedirectory" display_name="Remote Phone Book" priority="5" enable="0" dev="common" />
        <item id_name="networkdirectory" display_name="Network Directories" priority="6" enable="0" dev="common" />
</root_favorite_set>


This file controls the "DIR" button on your phone's home screen. By default, only the local directory is shown. This adds the LDAP directory as the first entry.

2. super_search.xml - Yealink Search Template


<root_super_search>
        <item id_name="ldap_search" display_name="LDAP" priority="1" enable="1" />
<item id_name="local_directory_search" display_name="Local Contacts" priority="2" enable="1" />
<item id_name="calllog_search" display_name="History" priority="3" enable="1" />
<item id_name="remote_directory_search" display_name="Remote Phone book" priority="4" enable="0" />
<item id_name="Network_directory_search" display_name="Network Directories" priority="5" enable="0" />
</root_super_search>


This file controls the instant search which is available while dialling. By default, the phone's dial history and the local directory are shown. This adds the LDAP directory into the source list as well.

sysadmin

Hi David

Thanks for this.  I suspect you know the Yealink units better than we do.  Let me look at this and come back to you.

davidiwharper

Necessity is the mother of all invention 8)

The good thing about the Yealinks is that when the documentation isn't clear, you can input the desired settings into the phone's web interface and then export the configuration file to reveal the correct syntax.

compsos

Hi David
When we enter the Super Search and try to past the code, we get back "extensave : Row ( ) doesn't exist!"

We assume it is a DB issue. Have not found any logs that reflect the issue.

Is yours working?

davidiwharper

Very odd. I'm not sure why you're seeing an extension save error, because all the work is done in the templates. Selintra, any clues?

sysadmin

I'm confused as to why you need to send xml to the phone, but as I've said, I'm not a Yealink expert by any means.   Our Yealinks work just fine from the existing 5.x templates.   I had occasion to play around with a T19 last week and as long as it has the latest firmware (.81 or higher) it just works.  You do need to allocate a pkey or fkey to the LDAP directory but other than that it seems fine.  These are the settings we provision.  You can also add an ldap-enable if you don't do it elsewhere.


ldap.name_filter = (|(name=%)(sn=%))
ldap.number_filter = (|(telephoneNumber=%)(mobile=%)(homePhone=%))

ldap.host = $localip
ldap.port = 389

ldap.base = $ldapbase
ldap.user =
ldap.password =

#Specify the maximum of the displayed search results. It ranges from 1 to 32000, the default value is 50.
ldap.max_hits =

ldap.name_attr = displayName cn sn
ldap.numb_attr =  mobile telephoneNumber
ldap.display_name = %cn

#Configure the LDAP version. The valid value is 2 or 3 (default).
ldap.version =

#Conifugre the search delay time. It ranges from 0 (default) to 2000.
ldap.search_delay =

#Enable or disable the phone to query the contact name from the LDAP server when receiving an incoming call; 0-Disabled (default), 1-Enabled;
ldap.call_in_lookup = 1

#Enable or disable the phone to sort the search results in alphabetical order; 0-Disabled (default), 1-Enabled;
ldap.ldap_sort =  1

#Enable or disable the phone to query the LDAP server when in the pre-dialing or the dialing state; 0-Disabled (default), 1-Enabled;
ldap.dial_lookup =  1