How to get Contacts Information to display on A30 phone?

I have recently acquired some A30 phones and they work very nicely with FreePBX. However, I haven’t been able to find out how to ge them to display the FreePBX contacts information. It looks like I need to point the phones at a file on the PBX but I can’t find such a file. I have done some research on-line and found that some peopel have used a PHP script to make it happen but that was a long time ago and I wondered if the feature is now built into FreePBX somewhere?

I know that these phones don’t use DPMA but I thought that PhoneApps might have something.


You’d need to ask Sangoma about the A series support, I do not see it listed.

I have been doing more research on this and now have solutions for the Asterisk Phonebook and the Contacts database. I thought I would report it here in case others find it useful.

Firstly you have to write PHP scripts to extract the data from the databases and convert it to XML to send to the phones. Here’s the one for the Asterisk Phonebook:

header("Content-type: text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<AsteriskIPPhoneDirectory>';

$db = new SQLite3('/var/lib/asterisk/astdb.sqlite3');

$results = $db->query('SELECT * FROM astdb;');

while ($row = $results->fetchArray()) {
    if(strpos($row['key'], $find)!==false) {
        echo '<DirectoryEntry>';
            echo '<Name>'.htmlspecialchars($row['value']).'</Name>';
            echo '<Telephone>'.str_replace($find, '', $row['key']).'</Telephone>';
        echo '</DirectoryEntry>';

echo '</AsteriskIPPhoneDirectory>';

That was based on a script from vespino (Wesley van Kuijen) which was published in this thread:

The script for accessing the Contacts database is written by sorvani (Jared Busch ). It did not require any changes. It can be found here:

Once you have those two PHP files, copy them into /var/www/html on your FreePBX system. There are many ways of doing this; I used WinSCP. I called one file phonebook.php and the other one contacts.php.

You can test the XML generation by pointing your browser at the files. Modern browsers seem to be able to check and display XML. You then have to tell the phones where to get the data. There are several ways of doing that; I chose to use the web GUI for the phones. Once logged in, go to Phonebook | Cloud Phonebook and enter the Name and URL (e.g.

One the A20 phone, the phonebooks will appear on the Dir menu under Cloud Phonebook. The A30 phone is quite different and the data is found via Menu | Phonebook | Cloud Contacts. That’s a bit tedious so I reprogrammed the tick button to go straight there.

I hope this is useful to someone.

Thanks to vespino and sorvani for their work in the past which made it easy once I’d figured out how to use the information.


1 Like