Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
Community Member

phone book appliction for ip phone

i have been working on a phone book type application for the cisco ip phones. idea is - website where a user goes to to add/edit/delete names & phone numbers. the site is written in php and stores data in a mysql database. then from the ip phone, configure a service that allows the phone user to pull up the phone book and dial entries in it. sorta recreating the speed-dial functionality of the callmanager i know but you gotta start somewhere.

so far i have the website part done - no problems there. on the phone end of things i have managed to get the xml browser on the phone to actually connect to the webserver (apache) and pull down a php page. the php does the database query and outputs xml to the phone. my problem is that only the last entry of database shows up. in a standard xml browser all the entries show up so im guessing its something to do with the phone.

just wondering if anyone might have any ideas on this. in case anyone is interested, here is the code i have so far


$database = "VoIP";

$user_database = "********";

$db_query = "name,phone_number";

mysql_connect("localhost","root","*********") or die ("Unable to connect to server");

mysql_select_db("$database") or die ("Unable to select database");

$sql = "SELECT $db_query FROM $user_database";

$sql_result = mysql_query($sql);

header("Content-Type: text/xml");



<Title>neXband Communications</Title>

<Prompt>Speed Dials</Prompt>



if ($row = mysql_fetch_array($sql_result)) {

do {


} while ($row = mysql_fetch_array($sql_result));

} else {

echo "<Text>No Records Found</Text>";





if i manage to get this working, i will be more than happy to share it with anyone who wants it - including the php part for the webstuff.


Re: phone book appliction for ip phone

try like this;

neXband Communications

Speed Dials

You see? You need a DirectoryEntry for every entry....

Hope this works for you,



Community Member

Re: phone book appliction for ip phone


Have you managed to get this working??



Re: phone book appliction for ip phone

I'm writing a similar application and I think the problem is that you can only show 32 items...

So I ended up splitting the result in "pages" of 30 names each.

I also used CiscoIPPhoneMenu instead of CiscoIPPhoneDirectory to have more flexibility using softkeys.

I this can help I'll attach the example

Re: phone book appliction for ip phone

w.r.t. the first post: the reason you don't get all names (in fact I'm quite surprised that the phone can handle the XML since it doesn't conform to the specs for a CiscoIPPhoneDirectory tag) is because while you look through your resultset and print out each name and phone number, each name and phone number needs to be a . You only have one , but a lot of and entries.

And then, as fsarzana has mentioned, you have to limit the results to show 32 entries per page.

CreatePlease to create content