D40 phone configuration using FreePBX

I have a new asterisk Now 3.0 installation and a bunch of D40 handsets.
DPMA works a treat for provisioning but I can’t get my head around making some basic changes to the phone configuration.
I have read the DPMA tutorials and I understand the settings in res_digium_phone.conf however as we are using FreePBX the files get generated automatically, also overwriting any tweaks I make.

res_digium_phone_additional.conf which is included in res_digium_phone.conf doesn’t appear to get overwritten so I guess I can put stuff in there, however if I want to tweak things that are common to every extension added through FreePBX it would involve a lot of manually tweaking.
Is there a basic template that FreePBX uses to generate the phone config that can be tweaked?

Things I am looking to change are:
Default ringtone
Alert_Info for distinctive ring.


Having switched Easy mode off I can now see lots more setting and can tweak ringtones and set up alerts etc on a phone by phone basis.
Doing this for 200 handsets will be quite time consuming so I could still do with knowing where the basic template is stored so that timezone etc can be set, then add all of the handsets with Easy Mode On.


I think the _additional file is an ordering that’s going to throw things off. So, I’d change /etc/asterisk/res_digium_phone.conf so it looks like:


#include res_digium_phone_general.conf

#include res_digium_phone_additional.conf

#include res_digium_phone_devices.conf

#include res_digium_phone_applications.conf

#include res_digium_phone_firmware.conf

Then, I’d edit /var/www/html/admin/modules/digium_phones/functions.inc.php. You’re looking for:

foreach ($this->digium_phones->get_devices() as $deviceid=>$device) {
                                $doutput[] = "[{$deviceid}]";
                                $doutput[] = "type=phone";
                                $doutput[] = "full_name={$device['name']}";

Change it to:

foreach ($this->digium_phones->get_devices() as $deviceid=>$device) {
                                $doutput[] = "[{$deviceid}](mytemplate)";
                                $doutput[] = "type=phone";
                                $doutput[] = "full_name={$device['name']}";

See where I’ve dropped in “(mytemplate)” for the creation of the deviceid.

Next, go into /etc/asterisk/res_digium_phone_additional.conf and create a template called “mytemplate,” and drop your stuff in there - e.g.


And, let me know if that works.

Thanks for the comprehensive reply Malcolm.
I will give that a go and get back to you.

No problem. Please do :smile:

If it works for you, then I’ll probably put in a ticket to get things modified upstream so you don’t have to do as much hand-editing.