Cisco 79xx phones directory services?
as promised here are the files for the phone directory thingy , i have modded the fies slightly for my needs, so they are not the orig that come with TB server but i beleave they will still work on any TB server ...
http://www.phillip-cooper.co.uk/cisco/cisco-phone.zip
this pulls the info from the Sugar CRM package on the TB serve so if you dont have any contacts configured there then this will not work ..
I'm experiencing the same issue. This used to work. I upgraded to v2.0 and now it's broken for me.
I'm using a Cisco 7960 (but i also upgrade the firmware to 8.4 at the same time.)
I see the script (include/xmlservices_libs.php) is attempting to detect the browsers user_string in order to format the xml properly... this is the code I get back when hitting it with a netscape browser. I can't figure out how to customize my user_agent string on firefox mac to see what it should return for cisco.
It's possible that my new 8.4 firmware is sending a different user_agent string -- thus breaking the else if tree -- and not the new trixbox 2.0 build ??
−
−
−
−
OK -- that reply got pretty mangled. Let me try that again...
I'm experiencing the same issue.
This used to work. I upgraded to v2.0 and now it's broken for me. I'm using a Cisco 7960 (but i also upgrade the firmware to 8.4 at the same time.)
I see the script (include/xmlservices_libs.php) is attempting to detect the browsers user_string in order to format the xml properly... this is the code I get back when hitting it with a netscape browser. I can't figure out how to customize my user_agent string on firefox mac to see what it should return for cisco.
It's possible that my new 8.4 firmware is sending a different user_agent string -- thus breaking the else if tree -- and not the new trixbox 2.0 build ??
(Unrelated, but I noticed the xml files have a mix of both dos and linux end-of-line markers. The one uri entry with the tags on their own lines is a mystery too...they are all coded the same in index.php)
hi the files should look something like
##########################################
# Config section
$Server = "http://$SERVER_ADDR/cisco/services"; # don't add a trailing slash!
##########################################
#
# Set content type
header("Content-Type: text/xml");
$menu .= "
$menu .= "\n";
$menu .= "\n";
$menu .= "
\n";echo $menu;
?>
this is for the cisco phones ...
the other was for astra phones .....
can you confirm that this is for extensions and not as a phone book for users located with in the company of is this for people out side the company as well?
not sure if there are any hacks out there for this ... people of the forum please help me out here...
if there are no hacks for this currently, i will create one, as i do a lot of php,xml and database work, but i will only do this is there are no hacks out there currently...
I found that that the phone was being sent the wrong info so it was looking in the wrong spot for the data try changing the SIPDefault.cnf you send your phone so that the following lines are correct, they are wrong by default I think
services_url: http://YOUR_SERVERS_ADDRESS/cisco/services/index_cisco.php
directory_url: http://YOUR_SERVERS_ADDRESS/cisco/services/PhoneDirectory.php
After changing those settings and rebooting my phone it now pulls the data correctly from SugarCRM
You could edit the files so it pulled the info from another DB if you show choose
I was trying to get this to work and I get XML Error [4]: Parse Error. I first tried the cisco/services that came on my box then tried Phillip's and still receive the same error when I try and query the database.
Using a batch of 7941s with SIP 8-2-2SR1 firmware if that helps
On the default Trixbox 2.0 install there is an errant code snippet that needs to be changed.
In the file:xmlservices/include/xmlservices_lib.php lines 40 & 41 need to be commented out.
Change:
$browser = "Aastra";
$content_format = "aastraxml";
To:
// $browser = "Aastra";
// $content_format = "aastraxml";
What they are doing is saying regardless of what type of browser you are act like you are an astra phone.
Thanks Pkaplan!
Its working. Only problem now is its putting 91 in front the contacts, I'm guessing that's in SugarCRM.... no?
//edit - Found its the $LongDistanceExtension = "91" at the beginning of a few of the PHP files
Anyhow, now how does one query the database to return a listing that is simply users under a certain account?
Thank You pkaplan, this worked for me. I only have one other "issue". The contact from SugarCRM is displayed, however, the Office Number wont display. Home, Mobile, and Other will list in the 7960G directory, but not the office number. I am running trixbox 2.2. Any help is appreciated.
Does anyone have any specific information on getting this to work with a Cisco 7912G with the SIP firmware? The phone did used to request XMLDefault.cnf.xml from my TFTP server before I updated the firmware, but it no longer asks for the file since I upgraded to 8.0.1, which has me very confused!
Found the fix for this.
Go to /var/www/html/xmlservices/templates and replace all instances of phone_office with phone_work
There should be three files that need to have this change made:
PhoneDirectory_entry_html.tpl
PhoneDirectory_entry_ciscoxml3.tpl
PhoneDirectory_entry_ciscoxml4.tpl
Took some debugging to find, but the changes are simple to do with vi:
%s/phone_office/phone_work/g
Works like a charm for me now using 7970 phones with 8.0.2s firmware.
Also, thanks again pkaplan for your help. It got me started on getting all of this services stuff working and now my customers are much happier!
One other thing I found was that the WSJ feed did not work under the xmlservices directory even though it diffs out to be the same as what is under the cisco/services directory. I modified the rssfeeds.php in the xmlservices directory as follows:
Change
$Server = "http://$SERVER_ADDR/xmlservices"; # don't add a trailing slash!
to
$Server = "http://$SERVER_ADDR/cisco/services"; # don't add a trailing slash!
Obviously this only works for the cisco phones, but there must be a difference between the two rss directories in /xmlservices and /cisco/services... it must be hidden deep down in the DOMIT stuff because I diffed everywhere else.
If you changed the default password of your mysql database, you'll **may** need to xmlservices_lib.php file with that info as well. (I didn't change it on my inhouse build. YMMV)
near the bottom of the file:xmlservices/include/xmlservices_lib.php you can find two functions which have the password hard coded in them.
function getRowSQL($querytxt,$database) {
$db = DB::connect('mysql://root:passw0rd@localhost/'.$database);
$db->setFetchMode(DB_FETCHMODE_ASSOC);
$query = $db->getRow($querytxt);
return $query;
}
In configuring the cisco 7970 directory i found a line flaw in the following file which doesnt allow the office code to display as someone mistakenly renamed the appropriate file.
/var/www/html/xmlservices/templates --> PhoneDirectory_entry_ciscoxml4.tpl
office directory should read: (ignore my comments to side marked comment: and brackets; also i had to place a space immediately each < in order to have it show up on forum, so if you cut and paste, remove the spaces)
(comment: what follows MUST SAY phone_work as it comes from the Database)
{if $ContactNumbers.phone_work}
< DirectoryEntry>
< Name>Work:< /Name> (comment: THIS CAN BE ANYTHING INSTEAD OF WORK:)
< Telephone>{$ContactNumbers.phone_work|regex_replace:"/[\s()-]+/":""}< /Telephone>
Once this one little detail is resolved, the work number should begin showing up.
There is a flaw in the text code of the search directory preventing the phones from searching the directory. The following should be changed to have it function:
var/www/html/cisco/services
searchDirectory.php
the querystring parameter should read:
$menu .= "< QueryStringParam>LastName< /QueryStringParam>\n";
(please remove the spaces after each < if you cut and paste)

Member Since:
2007-01-25