FreePBX phone book with yealink phones

Experts,

Is there any way to adopt phone book with yealink phones? I have over hundred extensions and don’t know if there is a manual way to add these ext to phone book or there is a easier way. Thank you

So I have find that code:

      <?php
################################################
#    COMDIF INNOVATION Christian-Zeler@2019    #
# Dynamic XML from Free-PBX Asterisk Phonebook #
################################################
header("Content-Type: text/xml");
// Connect Asterisk Sqlite database
$db = new SQLite3('/var/lib/asterisk/astdb.sqlite3');
// Search cidname datas
$results=$db->query('SELECT * FROM astdb WHERE key like "/cidname/%";');
// make header for XML format
echo'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n';
// XML doc start
echo'<contactIPPhoneDirectory>\n';
$index = 0;
// Loop to print Directory 
while ($row = $results->fetchArray())
	{
    $num = explode('/',$row[0]);
	$index= $index + 1;
	echo "    <DirectoryEntry>\n";
	echo "        <Name>" . $row[1] . "</Name>\n";
	echo "        <Telephone>" . $num[2] . "</Telephone>\n";
	echo "    </DirectoryEntry>\n";
	}
// End XML doc
echo "</contactIPPhoneDirectory>\n";
// That's all folks :-)
?>

Enjoy

In remote phone book I have choose: PBX IP/var/www/html/book.php

and seem that does not work

for some reason freepbxuser and password from /etc/freepbx does not work

The database is ACLed to just recognize the localhost. If you want to open the database up to contacts within your local network, you’ll need to set up an username and password in the database that allows for the entire local LAN (or specific phone IPs within your LAN).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.