[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LDAP picture attribute
Author Message
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #11
RE: LDAP picture attribute
While an LDAP attribute query would definitely by nice, I would suggest Yealink provided a way to query a photo URL like hpp://server/direcoty/photo.php?q=555-123456
This way, the server can pull the corresponding photo from anywhere you want and hand it to the phone in the appropriate .jpg/.png/.bmp format.

Something like: remote_contact.data_photo.url = hpp://server/direcoty/photo.php?q=

Please use the reputation button below if you like this post.
08-01-2014 03:39 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Yealink Support Offline
Administrator
*******

Posts: 2,683
Joined: Dec 2012
Reputation: 25
Post: #12
RE: LDAP picture attribute
Thanks for your suggestion. Currently our phones don't support this. It maybe be added in the future.
08-21-2014 05:03 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #13
RE: LDAP picture attribute
Snom phones support this feature for some time via SIP Header, maybe Yealink can provide something similar:

Code:
The SIP INVITE should contain the following SIP Header:
Call-Info: <http://192.168.1.2:8080/images/extensions1.bmp>;purpose=icon
or
Call-Info: icon="http://192.168.10.14:80/snom/photo/DirectoryEntry1.png"

That would be just awesome!

Please use the reputation button below if you like this post.
09-30-2014 04:13 AM
Find all posts by this user    like1    dislike0 Quote this message in a reply
e_herrera_99@hotmail.com Offline
Junior Member
**

Posts: 1
Joined: Oct 2014
Reputation: 0
Post: #14
RE: LDAP picture attribute
Hi, I'm new in the post.
You can help please, i'm using LDAP in phone T48G working only (displayName and ipPhone) but i need use the "thumbnailPhoto" or jpegPhoto) How to make this?
My LDAP on Windows SErver 2008

Thanks for you help
10-03-2014 04:55 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #15
RE: LDAP picture attribute
Here is a PowerShell script that will export the Users in an OU that have a thumbnailPhoto attribute set. The resulting Contact.tar and ContactData.xml files are saved to an IIS folder where the phones can download them during provisioning. The script requires 7-Zip to be installed and IIS (or another webserver) to host the 2 files. I tested it on Server 2012 R2, but I guess this will work on 2008 also.

Contacts are displayed with their photo if one of the 3 numbers match.

YealinkContacts.ps1
Code:
Import-Module ActiveDirectory  

# Full Pathnames are needed for 7-Zip. Do NOT use relative pathnames or it will not work!
$photoTempDir = "C:\Yealink\photo\"
$tarFile = "C:\Yealink\photo.tar"
$zipExe = "C:\Program Files\7-Zip\7z.exe"
$OU = "OU=Yealink,DC=testdomain,DC=int"
$xmlContactData = "C:\inetpub\wwwroot\ContactData.xml"

#### Warning: this will delete all *.jpg files in the photoTempDir
Get-Item $photoTempDir -Include "*.jpg" | Remove-Item -force

# Find all AD Users with a thumbnailPhoto
$users = Get-ADUser -Filter * -SearchBase $OU -Properties thumbnailPhoto,telephoneNumber,mobile,ipPhone | ? {$_.thumbnailPhoto}

# ContactData.xml Headers
'<?xml version="1.0" encoding="UTF-8"?>' | Out-File -FilePath $xmlContactData
'<root_contact>' | Out-File -FilePath $xmlContactData -Append


# Create the photos and ContactData files
foreach ($user in $users) {
    $name = $photoTempDir + $user.SamAccountName + ".jpg"  
    $user.thumbnailPhoto | Set-Content $name -Encoding byte

    $strLine = '    <contact'
    $strLine+= ' display_name="' + $user.name + '" '
    $strLine+= ' mobile_number="' + $user.mobile + '" '
    $strLine+= ' office_number="' + $user.telephoneNumber + '" '
    $strLine+= ' other_number="' + $user.ipPhone + '" '
    $strLine+= ' default_photo="Config:' + $user.SamAccountName + '.jpg" '
    $strLine+= 'line="0" ring="" group_id_name="" selected_photo="0" />'
    $strLine | Out-File -FilePath $xmlContactData -Append
}
'</root_contact>' | Out-File -FilePath $xmlContactData -Append


#Build the 7-Zip Command to archive the photos into photo.tar
$command = 'cmd /C "' + $zipExe + '" a "' + $tarFile + '" "' + $photoTempDir + '\*.jpg"'
Invoke-Expression -Command:$command

Included these 3 lines in your autoprovision file:
Code:
local_contact.data.url = http://192.168.0.1/ContactData.xml
local_contact.image.url = http://192.168.0.1/photo.tar
local_contact.icon.url = http://192.168.0.1/photo.tar

Please use the reputation button below if you like this post.
(This post was last modified: 10-10-2014 04:12 AM by cptjack.)
10-04-2014 01:31 AM
Find all posts by this user    like3    dislike0 Quote this message in a reply
bsanders Offline
Junior Member
**

Posts: 31
Joined: May 2014
Reputation: 0
Post: #16
RE: LDAP picture attribute
cptjack,

Thanks for sharing. How is image clean up done on the Yealink? To my knowledge there is no automated "delete" photo function.
10-04-2014 04:51 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  LDAP server is unavailable Andrei9385 2 11,550 07-16-2021 08:34 PM
Last Post: nolto
  No LDAP entries from "objectClass = contact" MaksimKa 0 4,187 01-28-2020 01:35 PM
Last Post: MaksimKa
  LDAP configuration issue Vadim Volkov 1 7,081 12-04-2019 04:21 PM
Last Post: anonymous1718628087441
  No results using LDAP argh 8 25,716 10-04-2019 09:28 PM
Last Post: justingoldberg
  LDAP T23P and Yeastar ? Atontel 1 11,050 03-30-2017 01:01 PM
Last Post: Kevin_Yealink
  LDAP configuraton for Yealink T48G in Ubuntu sani390 2 9,628 03-09-2017 07:01 AM
Last Post: sani390
  LDAP only some results DeepB 2 11,725 07-10-2015 01:43 PM
Last Post: DeepB
  T46G Disable Contact Picture tsukraw 10 40,874 05-13-2015 01:11 AM
Last Post: MiKeDaDoC
  ldaps (ldap+ssl) support? tangledhelix 3 14,405 05-14-2014 03:29 PM
Last Post: Yealink Support
  LDAP No results danieljr 4 24,012 03-31-2014 07:15 PM
Last Post: CWR

Forum Jump:


User(s) browsing this thread:

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication