QUESTION Yealink Remote Phonebook meets Asteridex

teqie

New Member
Joined
Jan 27, 2009
Messages
13
Reaction score
0
Greetings all.
Thought I might post this as I've been working on it a few days, might be useful to someone.

It's only a PHP page which makes your Asteridex accessible by Yealink (Dreamwave? Are they the same thing?) phones, for your viewing pleasure :biggrin5:

OK some of it is stolen and butchered from Yealink's instructions, but Asteridex is so cool and simple, this gives a more end-to-end solution I think.

INSTRUCTIONS (for medium-range idiots):
1. Place the file in your web server, eg /var/www/html/pbook/
or I suppose you could put it in /var/www/html/Asteridex4/

2. Rename to PHP:
mv YealinkAsteridexSearch.txt YealinkAsteridexSearch.php

3. edit the file - i like Nano:
nano -w /var/www/html/pbook/YealinkAsteridexSearch.php

You need to update the first line $URL to reflect your server's address - IE where the phone will be looking for this script again. This could be just http://192.168.0.10/pbook/Yealink.....

4. Get the IP address of your phone via Menu > Status, and type that bad boy into your browser. default username and password are both admin
5. Go to Contacts tab, and then choose Remote Phonebook
6. In the Remote Phonebook URL entry, put in the same thing you put in step 2, adding ?name=#search to the end of the URL; eg http://192.168.0.10/pbook/YealinkAsteridexSearch.php?name=#search
7. Give the phonebook a name, I like 'Asteridex' but you can call it 'speeddials' etc.

8. Hit save, then go to the phone and hit Dir and then 3 for remote phonebook - you can now;
> press Search, and start typing name, then press OK for matches
> press Enter or OK or do a quick-dial (ie DIR-3-1) for a list of all entries. You can now press 0 or 1 or 2... to get pages of 10 entries at a time.
> Incoming calls should also be CID matched to the Asteridex, if you aren't already using Asteridex in the CallerID Superfecta.

Steps 4-7 can be replaced by using Endpointman and specifying the remote phonebook URL.

This has been tested with latest firmware of today on a T26P (v6.60.23.5).

Future development may include pressing 2 for entries a-czz, press 3 for entries d-fzz, 4 for entries g-izz etc. Not sure why pages of 10 would be helpful but that's what Yealink give you as an example.

Welcome some feedback, just don't expect incredible responses from a PHP newbie :p
 

Attachments

  • YealinkAsteridexSearch.txt
    4.6 KB · Views: 125

teqie

New Member
Joined
Jan 27, 2009
Messages
13
Reaction score
0
Yealink are pretty cool - they are great value for money in terms of features vs ease of use vs documentation vs everything else. They also pass the wife test, at least aesthetically.

I can't really claim all rights of ownership, most of it was pinched from Yealink (I've sent the UK support guy a link to this post for him to take a look). I was so excited about posting something useful for a change that I forgot all about licensing :)

Instructions yes could go in the PHP.

The IP address can't be 127.0.0.1 because - the URL is used to generate URLs which the phone will then access again. The softkey entries reference a URL that the phone then accesses, and this is also how the search is passed in, so that URL has to be valid.

Cheers
 

ukstevef

Guru
Joined
Sep 20, 2009
Messages
134
Reaction score
0
To speed things up you may want to change
Code:
      print("<SoftKeyItem>\n"); 
      print("\t<Name>"); 
      print($index); 
      print("</Name>\n"); 
      print("\t<URL>"); 
      print($URL."?FROM=".$from."&TO=".$to); 
      print("</URL>\n"); 
      print("</SoftKeyItem>\n");
to
Code:
      print("<SoftKeyItem>\n\t<Name>{$index}</Name>\n\t<URL>{$URL}?FROM={$from}&TO={$to}</URL>\n</SoftKeyItem>\n");
Just a suggestion, not sure if speed is an issue or not ?

/Steve
 

tslacks

New Member
Joined
Aug 1, 2013
Messages
1
Reaction score
0
Does anybody know if this extension is still working, and how to migrate Asteridex from an older IncrediblePBX version?

Under IncrediblePBX11 (PIAF2.0.6.5) this was working great with our Yealink T26, T28 and T38 phones.

I recently migrated everything to IncrediblePBX11-12.2, including this php text file and asteridex db, and the Remote Phonebook no longer seems to be processing these Asteridex entries:

Viewing "YealinkAsteridexSearch.php" ends up with a bunch of empty values:
$per_page) { $start = 0; $index = 0; $total = $howmany[0]; $remain = $per_page; print("\n"); print("\n"); while ($start < ($total + 1)) { $limitstart = 'LIMIT '.$start.','.$per_page; $result = mysql_query("SELECT name,`out` FROM user1 WHERE name LIKE '$NAME%' ORDER BY name $limitstart", $mysql_conn); $row = mysql_fetch_row($result); $from = $row[0]; if (($total - $start) < $per_page) { $remain = $total - $start; } for ($i = 1; $i < $remain; ++$i) { $row = mysql_fetch_row($result); } $to = $row[0]; print("\n"); print("\t"); print($index); print("\n"); print("\t"); print($URL."?FROM=".$from."&TO=".$to); print("\n"); print("\n"); $start = $start + $per_page; $index = $index+1; } //softkeys done - now list all entries for browsing $result = mysql_query("SELECT name,`out` FROM user1 ORDER BY name ASC ", $mysql_conn); while($row = mysql_fetch_row($result)) { print("\n"); print("\t"); print($row[0] ); print("\n"); print("\t"); print($row[1]); print("\n"); print("\n"); } print("\n"); } else { $result = mysql_query("SELECT name,`out` FROM user1 WHERE user1.name LIKE '$NAME%' ORDER BY name ", $mysql_conn); print("\n"); // print("Finding a Name"); print("\n"); while($row = mysql_fetch_row($result)) { print("\n"); print("\t"); print($row[0] ); print("\n"); print("\t"); print($row[1]); print("\n"); print("\n"); } print("\n"); } } else { //check to see how many softkeys $result= mysql_query("SELECT count(user1.name) as total FROM user1 WHERE user1.name LIKE '$NAME%' ", $mysql_conn); $howmany = mysql_fetch_row($result); if ($howmany[0] > $per_page) { $start = 0; $index = 0; $total = $howmany[0]; $remain = $per_page; print("\n"); print("\n"); while ($start < ($total + 1)) { $limitstart = 'LIMIT '.$start.','.$per_page; $result = mysql_query("SELECT name,`out` FROM user1 WHERE name LIKE '$NAME%' ORDER BY name $limitstart", $mysql_conn); $row = mysql_fetch_row($result); $from = $row[0]; if (($total - $start) < $per_page) { $remain = $total - $start; } for ($i = 1; $i < $remain; ++$i) { $row = mysql_fetch_row($result); } $to = $row[0]; print("\n"); print("\t"); print($index); print("\n"); print("\t"); print($URL."?FROM=".$from."&TO=".$to); print("\n"); print("\n"); $start = $start + $per_page; $index = $index+1; } } $result = mysql_query("SELECT name,`out` FROM user1 WHERE name>='$FROM' AND name<='$TO' ORDER BY name", $mysql_conn); while($row = mysql_fetch_row($result)) { print("\n"); print("\t"); print($row[0] ); print("\n"); print("\t"); print($row[1]); print("\n"); print("\n"); } print("\n"); } ?>
 

Members online

Forum statistics

Threads
25,825
Messages
167,856
Members
19,250
Latest member
mark-curtis
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top