Command line for DPMA to refresh phonebook contacts-1.xml


(France) #1

Hi all,

I have a script that pushes every night new entries to a Phonebook in the DPMA module. But the phonebook is not actually refreshed to the contacts-1.xml file.

How is it possible to force the file refresh in ssh ?

Thanks.


(Malcolm Davenport) #2

There are a couple of different ways. There’s:

https://wiki.asterisk.org/wiki/display/DIGIUM/DPMA+and+the+Asterisk+CLI#DPMAandtheAsteriskCLI-ReconfiguringPhones

This causes the server to send the phone a digium.config.update event, which alerts the phone that it needs to request a new config. The phone requests a new config. The new config specifies contacts. The phone will re-retrieve the contacts. …along with everything else.

and the Remote Reconfigure (in spite of it saying that it’s only for phones not using DPMA) heading here:

https://wiki.asterisk.org/wiki/display/DIGIUM/Digium+Phones+Remote+Restart+and+Reconfigure

The latter is dependent on the phones option enable_check_sync being set to yes.

Both are dependent on getting an updated config file from the server that doesn’t include an identical md5 parameter for the contacts file compared to what the phone has. I don’t think that DPMA will ever set that when the key-value pair config option “contacts” is used. If you’re writing your own config files (probably not applicable to this poster), take heed. The note above about the phone retrieving “everything else” is why the use of the md5sum parameter is something that one should use…if you’re going to roll your own config files - and it’s something that we use in SWVX to cut down on the traffic between the phone and the server(s) and to speed things up for the phone, since it only has to parse things that have changed.


(France) #3

Thanks Malcom.

I understand what you are saying (and actually already use your recommendations), but it is not exactly what I am looking for.

The MD5 will stay the same until FreePBX creates a new contact file based on the new input I insert through SQL request inside the asterisk databases.

So what I would really like to know is what command should I use to “provoke” that order from FreePBX to create the new contact file. Like “blf_generator.php” in the conf directory for blf items.

I do not really want to go through the Asterisk CLI in FreePBX but rather in SSH through a script.

Thanks !!


(Malcolm Davenport) #4

No clue, sorry. My knowledge stops at the level of the phone.


(France) #5

Up !

Anybody ?


(system) closed #6

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