frest
(frest)
November 4, 2024, 8:51pm
1
After Migration to FreepPBX 17 i am getting aware, that the Asterisk Phonebook has gone. Now I want do use the Contactmanager, to display Contacts on my Yealink Phones via XML.
There seems to be a script by @sorvani :
https://github.com/sorvani/freepbx-helper-scripts/blob/master/ContactManager_to_Yealink_AddressBook/cm_to_yl_ab.php
My problem: the script does not work.
I am getting an error: āUndefined variable $usernameā
Maybe the script does not work with FreePBX 17 as well?
sorvani
(Jared Busch)
November 4, 2024, 11:39pm
2
I just converted my first system to 17 a weekish ago. Iāll be testing this out soon.
1 Like
I think thatās a variation of the script I posted here:
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-1ā¦
frest
(frest)
November 6, 2024, 12:41pm
4
Great!. Until that, I am keeping my old freepbx VM online, just for the phonebook.
This solution works: ContactManager_to_Yealink_AddressBook no longer able to pull contacts Ā· Issue #25 Ā· sorvani/freepbx-helper-scripts Ā· GitHub
From experimenting, simply slipping $bootstrap_settings['freepbx_auth'] = false;
in before pulling in freepbx.conf
seems to patch things up just fine,
Iām using it at two sites with Yealinks and it works!
1 Like
vespino
(Wesley van Kuijen)
November 9, 2024, 6:43pm
6
I havenāt gotten around to testing, but could it be āmy scriptā still works?
This script works for me, hopefully it will help somebody in the future:
<?php
header("Content-type: text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<YeastarIPPhoneDirectory>';
$db = new SQLite3('/var/lib/asterisk/astdb.sqlite3');
$results = $db->query('SELECT * FROM astdb;');
while ($row = $results->fetchArray()) {
//find
$find='/cidname/';
if(strpos($row['key'], $find)!==false) {
echo '<DirectoryEntry>';
echo '<Name>'.htmlspecialchars($rā¦
system
(system)
Closed
November 16, 2024, 6:43pm
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.