Hello good afternoon I have updated to Freepbx 17, I have two Cisco phones and now with 17 I do not access the personal directory, I have everything configured in the same way and the same XML files, and now when I pulse the button only one white screen comes out. You throw me a hand. Thank you.
español:
Hola buenas tardes he actualizado a freepbx 17, tengo dos telefonos cisco y ahora con 17 no accedo al directorio personal , tengo todo configurado de la misma manera y los mismos archivos xml, y ahora cuando pulso el boton solo sale una pantalla blanca. me echais una mano.gracias.
With those phones you may need to do the following fix with the .htaccess documented here:
I use the following script to generate the directory.xml file for my Cisco phones. Its a mod of a script that’s been posted here before. I refirect output to directory.xml then edit directory.xml and remove all the test extensions I don’t want the phones displaying.
root@phony:/var/www/html/cisco# cat /var/www/html/cisco/directory.php
<?php
// File: gs_phonebook.php
// version: 1.1
// Date: 2011-03-16
// Modified: 2015-06/26
// Author: Yves Menge ([email protected])
// Modified
// Description: Generating a XML Phonebook from FreePBX MySQL DB
// Modification: Use 'users' table instead of devices allowing exclusion of some devices
// Populated both first and last name fields, changed output filename
//!!Enable for Debug only!!
// error_reporting(E_ALL);
// ini_set("display_errors", 'ON');
// Database settings
$DBhost = "localhost"; //** Insert your host here
$DBuser = "root"; //** Insert your DB user here
$DBpass = "asterisk"; //** Insert your password here
$DBdatabase = "asterisk"; //** change only when installed Free PBX in a non-common way!
// Connect to the Database and get all users
$DBlink = mysqli_connect($DBhost, $DBuser, $DBpass) or die("Could not connect to host.");
mysqli_select_db($DBlink, $DBdatabase) or die("Could not find database.");
session_start();
$DBquery = "SELECT extension, name FROM users ORDER BY name ASC";
$QUERYresult = mysqli_query($DBlink, $DBquery) or die("Data not found.");
//Setup XMLWriter
$writer = new XMLWriter();
// $writer->openURI('/var/www/html/cisco/phonebook.xml'); //** If your TFTP server is using another root directory as /tfptboot, chang the path here!
// comment the following line and uncomment above line if output to file
$writer->openMemory();
$writer->openURI('php://output');
$writer->setIndent(4);
//Begin output
$writer->startDocument('1.0');
$writer->startElement('CiscoIPPhoneDirectory');
$writer->startElement('Title');
$writer->writeRaw('IP Telephone Directory');
$writer->endElement();
$writer->startElement('Prompt');
$writer->writeRaw('Beach House Extensions');
$writer->endElement();
//Add extensions / contacts from devices to the xml phonebook
while ($contact=mysqli_fetch_array($QUERYresult)){
list($fn,$ln) = explode(' ',$contact['name'],2); //** Separate first name by space. Last name = remainder of field
//!!Enable for Debug only!!
// print $fn . $ln . $contact['extension'] . '<br>';
$writer->startElement('DirectoryEntry');
$writer->writeElement('Name',$ln);
$writer->writeElement('Telephone',$contact['extension']);
$writer->endElement();
}
$writer->endElement();
$writer->endDocument();
$writer->flush();
// remove following if output to file
$writer->outputMemory();
?>
root@phony:/var/www/html/cisco#