[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:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XML phonebook with photos
Author Message
tikky Offline
Junior Member
**

Posts: 13
Joined: Mar 2015
Reputation: 0
Post: #1
XML phonebook with photos
Hello,

I am using PHP script to generate XML phonebook from our CRM.
This file is in all the phones as a remote phonebook and works great.

How Can I add a link to the photo into XML phonebook.
I would like to see a face photo when person calling.

Files are on local server and stored like: http:\\192.168.0.1\pictires\john_doe

Can I link the photos in XML, or do I need to upload the photos somewhere or convert them into specific format / resolution?
02-15-2017 12:11 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: #2
RE: XML phonebook with photos
Hi tikky,

I don't think you can do it in the XML phonebook directly.

We use this header in our dialplan to remotely fetch the picture on an incoming phone call. This answers half of your question.
Code:
SIPAddHeader(Call-Info: <http://server/voip/callerid.php?num=${CALLERID(num)}>\;purpose=icon)

Then a small callerid.php script fetches the appropriate picture from a database or serves a generic one:
PHP Code:
<?php
    $db 
= new PDO('mysql:host=server;port=1234;dbname=phonebook;charset=utf8''username''password');
    
$number $_GET['num'];
    
    
$query $db->prepare("SELECT * from callerid where number=:number AND not isnull(picture);");
    
$query->execute(':number'=>$number));
    
$data $query->fetchAll(PDO::FETCH_ASSOC);

    if (
count($data)>0) {
        
$ImageDataLength strlen($data[0]['picture']);
        
header("Content-type: image/jpeg") ;
        
header("Content-Length: ".$ImageDataLength);
        echo 
$data[0]['picture'];
    } else {
        
header("location:generic.jpg");
    }
php?>

As for the other half of the solution:

The only way I have found to display the picture of an outgoing call is to add all the pictures and corresponding numbers in the local phonebook. As long as the number matches the one in your XML phonebook, it should work. Loading the local addressbook can be done via provisioning. In that case you strictly would not need the script above, as long as the incoming number is in the local addressbook...

Hope this helps
/CJ

Please use the reputation button below if you like this post.
(This post was last modified: 02-15-2017 07:56 PM by cptjack.)
02-15-2017 07:53 PM
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
  T46S Remote phonebook update to local phonebook. T9 Search UCUC 5 4,253 06-30-2021 02:50 PM
Last Post: UCUC
  Public Phonebook on incomming call Oliaargau 3 8,613 04-16-2021 05:34 PM
Last Post: Oliaargau
  Remote Phonebook Ringtone joshua@itstel.com 17 25,514 03-03-2020 12:58 PM
Last Post: sebastiaan
  Remote phonebook generator? kogarahchiro 2 4,786 01-17-2020 04:38 AM
Last Post: kogarahchiro
  Using a shared phonebook managed bij phones johandezwaan 1 3,503 09-30-2019 01:32 PM
Last Post: mara
  Yealink Firebird Database phonebook IT-Risch_Support 3 5,912 04-13-2018 03:41 AM
Last Post: Travis_Yealink
  T48G Remote PhoneBook photo problem Co-GEM 1 3,810 04-11-2018 07:04 AM
Last Post: Co-GEM
  T42G: BLF visual alert not showing callee name from LDAP phonebook Lasse 5 10,039 12-11-2017 11:21 AM
Last Post: Lasse
  online (www) phonebook Hubert 2 5,445 09-26-2017 02:17 PM
Last Post: Manni
  Search phonebook n1cks21 2 5,692 08-25-2017 03:07 PM
Last Post: n1cks21

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

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