[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
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 


Messages In This Thread
XML phonebook with photos - tikky - 02-15-2017, 12:11 PM
RE: XML phonebook with photos - cptjack - 02-15-2017 07:53 PM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  T46S Remote phonebook update to local phonebook. T9 Search UCUC 5 2,406 06-30-2021 02:50 PM
Last Post: UCUC
  Public Phonebook on incomming call Oliaargau 3 7,065 04-16-2021 05:34 PM
Last Post: Oliaargau
  Remote Phonebook Ringtone joshua@itstel.com 17 21,979 03-03-2020 12:58 PM
Last Post: sebastiaan
  Remote phonebook generator? kogarahchiro 2 3,817 01-17-2020 04:38 AM
Last Post: kogarahchiro
  Using a shared phonebook managed bij phones johandezwaan 1 2,831 09-30-2019 01:32 PM
Last Post: mara
  Yealink Firebird Database phonebook IT-Risch_Support 3 4,997 04-13-2018 03:41 AM
Last Post: Travis_Yealink
  T48G Remote PhoneBook photo problem Co-GEM 1 3,250 04-11-2018 07:04 AM
Last Post: Co-GEM
  T42G: BLF visual alert not showing callee name from LDAP phonebook Lasse 5 8,735 12-11-2017 11:21 AM
Last Post: Lasse
  online (www) phonebook Hubert 2 4,790 09-26-2017 02:17 PM
Last Post: Manni
  Search phonebook n1cks21 2 5,029 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