Digium Phones - How to implement BLF

Hello,

I included in res_digium_phone_devices.conf the following 3 lines:

contact=contacts-internal.xml
blf_items=myBlfFile.xml
blf_contact_group=PBX Directory

My Digium D50 manages to pull the directory and display correctly all the contacts.(I have a script running a PHP module to update regularly the phone directory)

Now I would like to have phone keys (side) atributed to some of the contacts. Say contact_id: 189 which is:

<contact

        id="189"
        first_name="Noemie"
        last_name="Arrivale"
        contact_type="sip"
        organization="foobar"
        job_title="Manager"
    >
		<actions>
            <action id="primary" dial="03457XXXX" dial_prefix="" label="" name="Direct" />
         </actions>
 
 </contact>

So I created my myBlfFile.xml which I posted in the same directory as the contacts file.

<config>
<smart_blf>
    <blf_items>
        <blf_item location="side" index="0" paging="1" contact_id="189">
            <behaviors>
                <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" />
                <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" />
            </behaviors>
            <indicators>
                <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" line_label_fgcolor="#BDBDBD" line_label_bgcolor="#212121" />
                <indicator target_status="ringing" ring="1" ringtone_id="Techno" led_color="red" led_state="fast" line_label_fgcolor="#FFFFFF" line_label_bgcolor="#308030" />
            </indicators>
        </blf_item>
    </blf_items>
</smart_blf>

I simply copied pasted the example found on the wiki, changing the id with the correct one.

Now, when I press the side key, a number is dialed, but not the right number… the phone pulls the 1st contact listed in my phone directory (id = 1) and not id = 189.

Anybody to help me understand what is wrong here ?

Thanks

This is probably the issue. The phones have a legacy capability to pull contacts directly from the file_directory. We wound down the docs on this so that people wouldn’t do it, but it would explain why the phone gets contacts but not BLF items. BLF Items are only retrieved by cURL (file_url_prefix), not from the file_directory.

Hi,

Thanks much for the fast answer. So I know how not to do it. Could you elaborate on how to implenent the solution with a simple example ?

Best regards

Find file_url_prefix in your type=network definition. Make sure the myBlfFile.xml and contacts-internal.xml files are accessible via that location. Don’t put either of them in a location that’s accessible from file_directory.

From:
https://wiki.asterisk.org/wiki/display/DIGIUM/Smart+BLF

“Where the XML sheet…is retrieved from the file_url_prefix according to the phone’s current network.”

Thanks again. I had seen the wiki, but what I do not get where to find the file_url_prefix. Which config file ?

Edit: the goal is to use DPMA. I do not see how to attribute Smart BLF through DPMA. The best for me would be able to edit the config that DPMA sends to the phones, and not create a specific manual XML that the phone would go and grab for the entire config.

A bit of mystery hunt here.

BR

With the purchase of Digium by Sangoma, I’d expect DPMA to die off relatively quickly. I’m not saying anything about anyone personally or corporately, but we know that commercial EPM already does a lot of what DPMA did and spending a lot of time and money supporting a product that is overcome by events doesn’t seem like a good choice in terms of fiduciary responsibility. Having two products, one that supports everything and one that supports a small subset of the hardware you manufacture, doesn’t seem like a tenable long-term plan.

Either way, it sounds like you are straying into “non-open” code that may need corporate support. I think you should submit a Feature Request for EPM to support whatever it is on this phone you are trying to get working so that you have a long-term support path.

Of course, if it was me ten years ago, I’d be inclined to play around with this for a couple of weeks too, but I don’t have the patience for the time for that kind of tomfoolery any more. Do your thing, but remember there’s an old guy out there somewhere that would really like this thing to “just work”, so the two-pronged approach might be in the best interest of the community at large.

I understand perfectly your position (and the company one). Makes sense.
And the price is not a barrier.

For my knowledge, on the website, it says that “DPMA uses Asterisk Config files to configure the phone”
Where are those files stored ?

Just to play around one last time with those configs files. It may come handy if something bad happen.

DPMA is the Digium Phone Module for Asterisk, res_digium_phone.so, that is used as a secure configurator and middleware between D-Series Phones and Asterisk. DPMA is used by all D-Series phones and Switchvox Mobile softphones when connecting to Switchvox, and can also be used when connecting to Asterisk. DPMA isn’t going anywhere.

The Digium Phones Add-On for FreePBX, the collection of PHP code that’s available as an add-on, has less forward-moving utility in a world where EPM allows you to use DPMA as the configuration mechanism for D-Series phones. I wrote this (https://wiki.asterisk.org/wiki/display/DIGIUM/Advanced+DPMA+Configuration) with that in mind…given that Switchvox also is merely generating XML-styled config files for D-Series phones and is using DPMA as the transport for getting those configs to the telephones. Key-value pairs is a rougher way to go about things.

3 Likes

Asterisk’s config files are (almost all) stored in /etc/asterisk. They are usually text configuration files and there are a s-ton of them.

(Almost - some are stored under other directories in /etc, like /etc/dahdi or /etc/asterisk.conf)

I’ll try to be more verbose. There’s a wealth of information already, which does fully describe this, and which should be consumed first, and should be followed, at:
https://wiki.asterisk.org/wiki/display/DIGIUM/Digium+D-Series+Phones

If your goal is to have things loaded on keys on D-Series phones, then first load contacts onto the phone.

Contacts are loaded onto the phone using either the DPMA key “contact” which is a type=phone option, or, if your phone is configured using XML config files, the contacts element (https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=41454017#XMLConfiguration2.7.2+-ContactsElement). What those references is a sheet (formatted according to https://wiki.asterisk.org/wiki/display/DIGIUM/Contacts) that the phone loads because it’s directed to.

Ideally, the phone is going to cURL down the file from a web URL. If you’re using the XML-style configuration, you’re specifying a web URL. If you’re using the DPMA contact option, that’s not necessarily true.

There exists within DPMA a legacy ability, that we don’t document anymore, for DPMA itself to transport the contacts file to the phone, where it’s loaded from the “general” section option “file_directory”. There’s also a legacy ability, for older-style contacts, to be laid out on the BLF keys in order. Since 1.4 firmware (October of 2013), this isn’t the preferred or documented way of doing things. So, if the contacts file is in file_directory, DPMA will try to send that to the phone. If it’s not there, then DPMA is going to assume that you’re trying to send the contacts file from the type=network file_url_prefix instead. In that case, DPMA will take whatever you put in file_url_prefix and prepend that to what you put in the contact key - unless what you put in the contact key is actually an http or https URL itself (in which case DPMA sends just that URL).

Your trouble is that your config is probably using the legacy stuff that we don’t document anymore. Thus, your contacts file is probably stored in the file_directory. I suggest this, because it’s the only thing that makes sense. The D-Series phones and DPMA do not transport BLF Items sheets using DPMA as a transport. The phones are only capable of receiving those via cURL. Since your phone has contacts and it’s got something on the key (the wrong thing), that’s probably what’s happened.

If you want to use BLF Items for things, which is a really good idea, it’s very flexible, then you’ll have to store your BLF items sheet in a place the phone can cURL it in. So, if you’re doing DPMA config, which you must, then you’ll have to be cognizant of the file_url_prefix for the type=network on which the phone finds itself, and you’ll have to put the BLF items file on-disk in the location that’ll get served up.

I recommend you put your contacts files there, too.

Older versions of the Digium Phones Add-on for FreePBX used all of the legacy stuff. Newer versions generate contacts and BLF Items files on-the-fly and serve them up via the file_url_prefix.

1 Like

Woahhh, OK, that is a lot to absorb and it is fascinating. Let me read that carefully before I post back.

Best regards (and this is great)

I recently set up a Digium D65 with freePBX 14. First I tested the Endpointmanager. Tried everything, including the base file edit. Problem is that the EPM is not compatible with newer firmware (tested 2.7.2 back to 2.6.6). I always received a phone apps not licensed message (=Sangoma phone apps). Digium D65 firmware 2.2.1.7 worked (regarding Sangoma phone apps), but it is relatively old…and there were other issues with freePBX EPM.
So the solution was to deactivate the EPM and phone app module in freePBX and activate the Digium-phone-config-module. Malcolm helped me a lot (community_asterisk_org) and posted a link to his advanced DPMA tutorial.
This is the ideal solution for Digium phones connected to a freePBX server. You can use a XML-config file to adjust EVERY little setting of the phone and at the same time use the DPMA features to reload your phone through the webgui and populate your digium phone books.

I already ordered several Digium D65 phones and will soon configure a Digium-D65-freePBX system. I became a fan of Digium-phones and freePBX…because of DPMA…and its advanced config features. So it is not dead…at all.

If you use the advanced DPMA feature and the XML config you can do powerful things…and yes, you can autopopulate your BLF-Line-buttons…or create a xml-file…everything is possible with Digium :slight_smile:

On a freePBX 14 machine, you have to add this to your res_digium_phone_additional.conf

[ext#]
type=phone
config_file=000FD30D2ABB.cfg
line=ext#
full_name=Viktor Orban
show_call_parking=yes

If you want to use Queues, you have to add a little more text, which is outlined in Malcolm’s advanced DPMA tutorial.
Do not edit res_digium_phone_devices.conf (freePBX distro), because it gets overwritten … but you might know it already…

Hi Malcom,

This is exactly what I do as you describe as “legacy way”. Let me rephrase.

  1. I extract from my ERP the full list of my contacts which I format through a PHP script in a xml file that respects the D-phones format.

  2. After some investigation, I noticed that DPMA uses res_digium_phone_general.conf and res_digium_phone_devices.conf to use respectively:
    a) the file_directory. Here in my case, file_directory=/etc/asterisk/digium_phones/. This is where I store the logos, the contacts, and … the BLF file
    b) the phone configs. For example
    [111]
    type=phone
    full_name=XXX
    parking_exten=70
    parking_transfer_type=blind
    active_locale=fr_FR
    application=voicemail-fr_FR
    line=111
    send_to_vm=yes
    accept_local_calls=host
    active_locale=fr_FR
    call_waiting_tone=yes
    display_mc_notification=yes
    lock_preferences=no
    name_format=first_last
    parking_exten=70
    record_own_calls=yes
    timezone=Europe/Paris
    web_ui_enabled=no
    use_local_storage=yes
    contact=contacts-internal.xml
    blf_items=myBlfFile.xml
    blf_contact_group=PBX Directory
    network=network–1
    8021x_method=
    d40_logo_file=user_image_3.png
    application=status-available
    application=status-chat
    application=status-away
    application=status-dnd
    application=status-xa
    application=status-unavailable

    You will notice here contacts-internal.xml which is the file that DPMA creates and that I replace with a Cron on a regular basis to make sure the phones have the latest version of the phonebook.

So you are spot on with your assumptions.

Now, if I look at my network file which is res_digium_phone_network.conf and is auto-generated by FreePBX (which is an issue…), I had no “file_url_prefix”. I then added “file_url_prefix=/etc/asterisk/digium_phones/” to fetch the files (contacts and BLF).

For the BLF, as understood on the web, I created a 000000000001.cfg file which includes

<?xml version="1.0" ?> <blf_items url="http://192.168.120.90/etc/asterisk/digium_phones/myBlfFile.xml /> </smart_blf> </config> <p>So in theory, according to your explanation and the info found on the wiki, the phones should load the cfg and then the contacts and BLF.</p> <p>BUT (there is always a but), the phone boots, reconfigures, loads the contacts, but not the BLF.</p> <p>I feel that I am nearly there and need an extra eye to correct my mistake. Thanks for the support. Much appreciated.</p>

Hi rein_hard1,

Thanks for jumping in. Every help is appreciated, especially when you go my way :slight_smile:

I agree with your statement: “Do not edit res_digium_phone_devices.conf (freePBX distro), because it gets overwritten”. I circumvent that by using the same names and format as DPMA when it gets overwritten, so what ever DPMA does, my file are intact. Note that by changing permissions on the file, it creates an error in Freepbx and the system bugs, so do not go that way…

Where is Malcom’s adavnced DPM tutorial ? My issue is that there is a lot of info on Freepbx and stuff on Digium phones but most of them are outdated and do not point to the correct files.

I edited my res_digium_phone_additional.conf file for my test phone:

[113]
type=phone
config_file=000000000001.cfg
line=113

000000000001.cfg being the file outlined in my previous post.

The result is the same, no BLF keys :frowning:
I am not sure about the url though.

Is it url=http://192.168.120.90/etc/asterisk/digium_phones/contacts-internal.xml />
or url=/etc/asterisk/digium_phones/contacts-internal.xml or something else.

Of course http://192.168.120.90 is my VOIP server where the file are stored.

Best

No, the config file I list in the res_digium_phone_additional-file is actually the main xml-config file of the phone.
mine looks like this:

> <?xml version="1.0" ?>
> <config>
>   <setting id="active_ringtone" value="Chimes" />
>   <setting id="locale" value="de_DE" />
>   <setting id="default_fontsize" value="13" />
>   <setting id="idle_screen_clock_format" value="{0} EEE, d.MMM" />
>   <setting id="login_password" value="xxxxx" />
>   <setting id="time_zone" value="Europe/Vienna" />
>   <setting id="time_source" value="ntp" />
>   <setting id="ntp_server" value="0.at.pool.ntp.org" />
>   <setting id="ntp_resync" value="86400" />
>   <setting id="accept_local_calls" value="any" />
>   <setting id="transport_udp_enabled" value="1" />
>   <setting id="transport_udp_port" value="5060" />
>   <setting id="transport_tcp_enabled" value="1" />
>   <setting id="transport_tcp_port" value="5060" />
>   <setting id="logo_file" value="user" path="/user_image.png" url="" md5="" />
>   <setting id="display_mc_notification" value="1" />
>   <setting id="hide_completed_elsewhere" value="1" />
>   <setting id="brightness" value="10" />
>   <setting id="contrast" value="10" />
>   <setting id="dim_backlight" value="1" />
>   <setting id="backlight_timeout" value="60" />
>   <setting id="backlight_dim_level" value="0" />
>   <setting id="ringer_volume" value="5" />
>   <setting id="speaker_volume" value="5" />
>   <setting id="handset_volume" value="5" />
>   <setting id="headset_volume" value="5" />
>   <setting id="reset_call_volume" value="0" />
>   <setting id="headset_answer" value="0" />
>   <setting id="enable_blf_on_unused_line_keys" value="0" />
>   <setting id="name_format" value="last_first" />
>   <setting id="contacts_max_subscriptions" value="40" />
>   <setting id="blf_contact_group" value="Internal Phonebook" />
>   <setting id="allow_insecure_ssl" value="1" />
>   <setting id="sip_qos" value="3" />
>   <setting id="rtp_qos" value="6" />
>   <setting id="pc_qos" value="1" />
>   <setting id="log_level" value="debug" />
>   <setting id="enable_logging" value="0" />
>   <setting id="log_server" value="10.1.2.3" />
>   <setting id="log_port" value="514" />
>   <setting id="web_ui_enabled" value="1" />
>   <setting id="sip_dscp" value="24" />
>   <setting id="rtp_dscp" value="46" />
>   <setting id="in_switchvox_environment" value="0" />
>   <setting id="config_server_url" value="sip:[email protected]:5060;transport=udp" />
>   <setting id="server_environment" value="DPMA" />
>   <setting id="udp_ka_interval" value="60" />
>   <setting id="enable_check_sync" value="1" />
>   <setting id="ehs" value="auto" />
>   <setting id="ring_headset_only" value="0" />
>   <setting id="call_waiting_tone" value="1" />
>   <setting id="pc_vlan_id" value="" />
>   <setting id="lan_port_mode" value="auto" />
>   <setting id="pc_port_mode" value="auto" />
>   <setting id="8021x_passthrough" value="0" />
>   <setting id="8021x_eapol_on_disconnect" value="0" />
>   <setting id="8021x_method" value="" />
>   <setting id="8021x_identity" value="" />
>   <setting id="8021x_anonymous_identity" value="" />
>   <setting id="8021x_password" value="" />
>   <setting id="8021x_client_cert" url="" value="" />
>   <setting id="8021x_root_cert" url="" value="" />
>   <setting id="8021x_debug" value="" />
>   <setting id="parking_lot_extension" value="70" />
>   <setting id="parking_lot_enable_blind_transfer" value="1" />
>   <events>
>     <event id="digium.incomingCall.voicemail" action="app" />
>     <event id="digium.parkingLot.parked" action="app" />
>   </events>
>   <keymap>
>         <state id="idle">
>             <softkeys>
>              <key id="0" action="missed_or_call_log" />                            
>              <key id="1" action="show_application" label1="_CONTACTS">                      
>                 <arg>contacts</arg>                                              
>              </key>                                                                  
>              <key id="2" action="show_application" label1="_PARKED_CALLS">
>                 <arg>parking</arg>                                           
>              </key>                                                            
>              <key id="3" action="show_application" label1="_STATUS">
>                 <arg>status</arg>              
>              </key>                                                                                                                          
>              <key id="4" action="forward_calls" label1="_FORWARD" />
>              <key id="5" action="menu" /> 
>             </softkeys>
>         </state>
>         <state id="hold">
>             <softkeys>
>                 <key id="0" action="resume"/>
>                 <key id="1" action="none"/>
>                 <key id="2" action="none"/>
>                 <key id="3" action="end_call"/>
>             </softkeys>
>         </state>
>         <state id="hold/transfer">
>             <softkeys>
>                 <key id="0" action="resume"/>
>                 <key id="1" action="show_application" label1="_CONTACTS">
>                     <arg>contacts</arg>
>                 </key>
>                 <key id="2" action="none"/>
>                 <key id="3" action="cancel_call"/>
>             </softkeys>
>         </state>
>         <state id="hold/conference">
>             <softkeys>
>                 <key id="0" action="resume"/>
>                 <key id="1" action="split_conference"/>
>                 <key id="2" action="none"/>
>                 <key id="3" action="end_call"/>
>             </softkeys>
>         </state>
>         <state id="hold/preconference">
>             <softkeys>
>                 <key id="0" action="resume"/>
>                 <key id="1" action="show_application" label1="_CONTACTS">
>                     <arg>contacts</arg>
>                 </key>
>                 <key id="2" action="none"/>
>                 <key id="3" action="end_call"/>
>             </softkeys>
>         </state>
>         <state id="incoming">
>             <softkeys>
>                 <key id="0" action="accept_call"/>
>                 <key id="1" action="reject_call"/>
>                 <key id="2" action="transfer_call"/>
>                 <key id="3" action="send_to_vmail"/>
>             </softkeys>
>         </state>
>         <state id="incoming/transfer">
>             <softkeys>
>                 <key id="0" action="show_application" label1="_CONTACTS">
>                     <arg>contacts</arg>
>                 </key>
>                 <key id="1" action="none"/>
>                 <key id="2" action="none"/>
>                 <key id="3" action="cancel_call"/>
>             </softkeys>
>         </state>
>         <state id="connected">
>             <softkeys>
>                <key id="0" action="conference" />                          
>                <key id="1" action="park_call" />                           
>                <key id="2" action="record_call" />                              
>                <key id="3" action="end_call" /> 
>             </softkeys>
>         </state>
>         <state id="connected/conference">
>             <softkeys>
>                 <key id="0" action="none"/>
>                 <key id="1" action="split_conference"/>
>                 <key id="2" action="record_call"/>
>                 <key id="3" action="end_call"/>
>             </softkeys>
>         </state>
>         <state id="connected/transfer">
>             <softkeys>
>                 <key id="0" action="transfer_call"/>
>                 <key id="1" action="none"/>
>                 <key id="2" action="none"/>
>                 <key id="3" action="end_call"/>
>             </softkeys>
>         </state>
>         <state id="dial">
>             <softkeys>
>                 <key id="0" action="toggle_url_number"/>
>                 <key id="1" action="show_application" label1="_CONTACTS">
>                     <arg>contacts</arg>
>                 </key>
>                 <key id="2" action="none"/>
>                 <key id="3" action="cancel_call"/>
>             </softkeys>
>         </state>
>         <state id="dial/conference">
>             <softkeys>
>                 <key id="0" action="none"/>
>                 <key id="1" action="show_application" label1="_CONTACTS">
>                     <arg>contacts</arg>
>                 </key>
>                 <key id="2" action="none"/>
>                 <key id="3" action="cancel_call"/>
>             </softkeys>
>         </state>
>         <state id="dial/transfer">
>             <softkeys>
>                 <key id="0" action="none"/>
>                 <key id="1" action="show_application" label1="_CONTACTS">
>                     <arg>contacts</arg>
>                 </key>
>                 <key id="2" action="none"/>
>                 <key id="3" action="cancel_call"/>
>             </softkeys>
>         </state>
>         <state id="dialing">
>             <softkeys>
>                 <key id="0" action="make_call"/>
>                 <key id="1" action="backspace"/>
>                 <key id="2" action="none"/>
>                 <key id="3" action="cancel_call"/>
>             </softkeys>
>         </state>
>         <state id="dialing/conference">
>             <softkeys>
>                 <key id="0" action="make_call"/>
>                 <key id="1" action="show_application" label1="_CONTACTS">
>                     <arg>contacts</arg>
>                 </key>
>                 <key id="2" action="backspace"/>
>                 <key id="3" action="cancel_call"/>
>             </softkeys>
>         </state>
>         <state id="dialing/transfer">
>             <softkeys>
>                 <key id="0" action="transfer_call"/>
>                 <key id="1" action="make_call"/>
>                 <key id="2" action="backspace"/>
>                 <key id="3" action="cancel_call"/>
>             </softkeys>
>         </state>
>         <state id="failed">
>             <softkeys>
>                 <key id="0" action="none"/>
>                 <key id="1" action="none"/>
>                 <key id="2" action="none"/>
>                 <key id="3" action="clear_call"/>
>             </softkeys>
>         </state>
>         <state id="calling">
>             <softkeys>
>                 <key id="0" action="none"/>
>                 <key id="1" action="none"/>
>                 <key id="2" action="none"/>
>                 <key id="3" action="end_call"/>
>             </softkeys>
>         </state>
>   </keymap> 
>   <contacts url ="http://192.168.0.34/digium_phones/contacts-internal.xml" id="internal" />
>   <contacts url ="http://192.168.0.34/digium_phones/contacts-1.xml" id="1" />  
>   <smart_blf>
>         <blf_items url="http://192.168.0.34/digium_phones/blf.xml" />
>   </smart_blf> 
>   <accounts>
>     <account index="0" status="1" register="1" account_id="17" username="17" authname="17" password="xxx" passcode="xxx" line_label="Reinhard" caller_id="Reinhard" dial_plan="x.T|*xx.T" subscription_extension="auto_hint_17" visual_voicemail="1" needMwiSubscription="1">
>     <host_primary server="192.168.0.34" port="5060" transport="udp" reregister="300" retry="25" />
>     <permission id="use_voicemail" value="1" />
>     <permission id="send_to_voicemail" value="1" />
>     <permission id="record_own_calls" value="1"/>
>     <setting id="parking_lot_extension" value="70" />
>     <setting id="parking_lot_enable_blind_transfer" value="1" />
>     <permission id="ignore_calls" value="1" />
>     <setting id="call_log_fetch_entries" value="50" />
>     </account>
>   </accounts>
>   <networks>
>     <network id="1" display_name="All Networks" cidr="0.0.0.0/0" />
>   </networks>
>   <codecs>
>         <codec id="PCMA" priority="255" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" />
>         <codec id="G722" priority="125" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" />
>         <codec id="PCMU" priority="13" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" />
>         <codec id="G7221" priority="10" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" samplerate="uwb" bitrate="48000" />
>         <codec id="G726-32" priority="7" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" />
>         <codec id="opus" priority="6" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" complexity="10" samplerate="wb" use_vbr="0" />
>         <codec id="G729" priority="5" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" />
>         <codec id="iLBC" priority="4" packetization="30" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" />
>         <codec id="L16" priority="2" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1" />
>         <codec id="L16-256" priority="1" packetization="20" jitter_min="0" jitter_max="0" jitter_target="0" enabled="1"/>
>   </codecs>
>   <ringtones>
>   <tones>
>       <tone id="Alarm" display="Alarm" type="phone" />
>       <tone id="Chimes" display="Chimes" type="phone" />
>       <tone id="Digium" display="Digium" type="phone" />
>       <tone id="GuitarStrum" display="Guitar Strum" type="phone" />
>       <tone id="Jingle" display="Jingle" type="phone" />
>       <tone id="Office" display="Office" type="phone" />
>       <tone id="Office2" display="Office 2" type="phone" />
>       <tone id="RotaryPhone" display="Rotary Phone" type="phone" />
>       <tone id="SteelDrum" display="Steel Drum" type="phone" />
>       <tone id="Techno" display="Techno" type="phone" />
>       <tone id="Theme" display="Theme" type="phone" />
>       <tone id="Tweedle" display="Tweedle" type="phone" />
>       <tone id="Twinkle" display="Twinkle" type="phone" />
>       <tone id="Vibe" display="Vibe" type="phone" />
>       </tones>
>   <alerts>
>       <alert alert_info="normal" ringtone_id="Digium" ring_type="normal" />
>       <alert alert_info="ring-answer" ringtone_id="Digium" ring_type="ring-answer" />
>       <alert alert_info="intercom"  ringtone_id=""  ring_type="answer" />
>       <alert alert_info="visual"  ringtone_id=""  ring_type="visual" />
>       </alerts>
>   </ringtones>
>     <appconfig id="appscreen">
>         <application id="bluetooth" />
>         <application id="voicemail" />
>         <application id="parking" />
>         <application id="status" />
>         <application id="contacts" />
>         <application id="queues" />
>         <application id="call_log" />
>         <application id="forward_calls" />
>         <application id="LogOut" />
>         <application id="conferences" />
>         <auto_start />
>     </appconfig>
>     <appconfig id="phonemenu">
>       <auto_start />
>     </appconfig>
>     <appconfig id="contacts">
>         <account account_id="17" username="17" password="xxx" appserver="dasp://192.168.0.34/json" apiformat="json"/>
>         <display_rules>
>             <display_rule id="0" action_id="monitor" show="0"/>
>             <display_rule id="1" action_id="monitor" target_status="on_the_phone" show="1"/>
>             <display_rule id="2" action_id="intercom" show="0"/>
>             <display_rule id="3" action_id="intercom" target_status="idle" show="1"/>
>             <display_rule id="4" action_id="dial_vm" phone_state="idle" show="0"/>
>             <display_rule id="5" action_id="transfer_vm" show="0"/>
>             <display_rule id="6" action_id="transfer_vm" phone_state="transfer" show="1"/>
>         </display_rules>
>         <settings can_transfer_vm="1" name_format="last_first" use_local_storage="0" preferred_contact_group="" />
>         <settings in_switchvox_environment="0" />
>         <auto_start />
>     </appconfig>
>     <appconfig id="status">
>         <account account_id="17" username="17" password="xxx" appserver="dasp://192.168.0.34/json" apiformat="json"/>
>         <send_dnd status="dnd" />
>         <auto_start />
>         <full_application />
>     </appconfig>
>     <appconfig id="queues">
>         <account account_id="17" username="17" password="xxx" appserver="dasp://192.168.0.34/json" apiformat="json"/>
>         <auto_start />
>     </appconfig>
>     <appconfig id="parking">
>         <account account_id="17" username="17" password="xxx" appserver="dasp://192.168.0.34/json" apiformat="json"/>
>         <auto_start />
>     </appconfig>
>     <appconfig id="voicemail">
>         <account account_id="17" username="17" password="xxx" appserver="dasp://192.168.0.34/json" apiformat="json"/>
>         <settings require_password="0" />
>         <auto_start />
>     </appconfig>
>     <appconfig id="LogOut">
>         <auto_start />
>     </appconfig>
>     <appconfig id="conferences">
>         <enabled />
>         <default_bridge pin=""/>
>     </appconfig>
>     <appconfig id="mycustomapp">
>         <url url="http://192.168.0.34/myapp.zip" />
>         <settings mysettinga="1" mysettingb="2" mysettingc="telephone" />
>     </appconfig>
>   <firmwares>
>     <firmware model="D65" version="2_7_2" url="http://192.168.0.34/digium_phones/firmware_2_7_2_package/2_7_2_D65_firmware.eff" />
>   </firmwares>
>   <multicastpage>
>     <listener id="1" name="Multicast1" addr="" port="multicastPort0" priority="1" interrupt_calls="0" />
>     <listener id="2" name="Multicast2" addr="" port="multicastPort1" priority="1" interrupt_calls="0" />
>     <listener id="3" name="Multicast3" addr="" port="multicastPort2" priority="1" interrupt_calls="0" />
>     <listener id="4" name="Multicast4" addr="" port="multicastPort3" priority="1" interrupt_calls="0" />
>     <listener id="5" name="Multicast5" addr="" port="multicastPort4" priority="1" interrupt_calls="0" />
>     <listener id="6" name="Multicast6" addr="" port="multicastPort5" priority="1" interrupt_calls="0" />
>     <listener id="7" name="Multicast7" addr="" port="multicastPort6" priority="1" interrupt_calls="0" />
>     <listener id="8" name="Multicast8" addr="" port="multicastPort7" priority="1" interrupt_calls="0" />
>     <listener id="9" name="Multicast9" addr="" port="multicastPort8" priority="1" interrupt_calls="0" />
>     <listener id="10" name="Multicast10" addr="" port="multicastPort9" priority="1" interrupt_calls="0" />
>   </multicastpage> 
>   <certs>
>   </certs>
>   <activity_indicator>
>         <setting id="idle" color="amber" state="off" />
>         <setting id="default" color="amber" state="off" />
>         <setting id="hold" color="red" state="slow" />
>         <setting id="ringing" color="green" state="fast" /> 
>         <setting id="active" color="red" state="on" />
>         <setting id="new_vm" color="red" state="slow" />
>         <setting id="listen_vm" color="red" state="on" />
>         <setting id="leaving_vm" color="amber" state="slow" />
>         <setting id="screen_vm" color="amber" state="on" />
>         <setting id="announcement" color="amber" state="fast" />
>    </activity_indicator>
> </config>

You have to adjust some settings e.g. locale to French, the clock format, the extensions and the firmware setting (I just use a D65…a wonderful phone…just in case I didn’t mention it already :wink:

In my main xml file there is a setting which points the phone to my blf and contact files. They are located in var/www/html/digium_phones

blf.xml

<config>
 <smart_blf>
  <blf_items>
    <blf_item location="main" index="0" paging="1" contact_id="0">      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_function="dial" />
        <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="off" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="off" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="1" paging="1" contact_id="11">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="2" paging="1" contact_id="12">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="3" paging="1" contact_id="13">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="4" paging="1" contact_id="14">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="5" paging="1" contact_id="15">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="0" paging="1" contact_id="0">      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_function="dial" />
        <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="off" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="off" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="1" paging="1" contact_id="16">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="2" paging="1" contact_id="18">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="3" paging="1" contact_id="19">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="4" paging="1" contact_id="20">
      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_action="itcm" long_press_function="dial" />
      <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="fast" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="on" />
      </indicators>
    </blf_item>
    <blf_item location="main" index="5" paging="1" contact_id="">      <behaviors>
        <behavior phone_state="idle" target_status="idle" press_action="primary" press_function="dial" long_press_function="dial" />
        <behavior phone_state="idle" target_status="ringing" press_action="pickupcall" press_function="dial" />
      </behaviors>
      <indicators>
        <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="off" />
        <indicator target_status="ringing" ring="0" ringtone_id="Techno" led_color="red" led_state="off" />
        <indicator target_status="on_the_phone" ring="0" ringtone_id="Techno" led_color="red" led_state="off" />
      </indicators>
    </blf_item>
	</blf_items>
 </smart_blf>
</config>

etc…
There might be still a few wrong settings in my xml file…I am currently in testing mode…but the Digium D65 is rock-solid stable and it does everything I want…

Just to be crystal clear, your “res_digium_phone_additional.conf” is the main xml file ? If I open your “res_digium_phone_additional.conf”, I will have
<xml version=“1.0” ?>… etc ?

The rest is OK, I get it and I am ready to test !!

var/www/html/digium_phones is the other folder which is declare in the conf file but is used on my side just for firmware packages.

Digium D50 are not bad either :wink:

Ok, let’s go to work !! I think I am getting there (intellectually)

Last question (for now …), could you post what you have in your res_digium_phone_devices.conf ? Mine is the main config file, and not sure if that is the correct way when I read Malcom’s post.

for example

 [113]
type=phone
full_name=XXX
parking_exten=70
parking_transfer_type=blind
active_locale=fr_FR
application=voicemail-fr_FR
line=113
send_to_vm=yes
accept_local_calls=host
active_locale=fr_FR
call_waiting_tone=yes
display_mc_notification=yes
lock_preferences=no
name_format=first_last
parking_exten=70
record_own_calls=yes
timezone=Europe/Paris
web_ui_enabled=no
use_local_storage=yes
contact=contacts-internal.xml
blf_items=myBlfFile.xml
blf_contact_group=PBX Directory
network=network--1
8021x_method=
d40_logo_file=user_image_3.png
d50_logo_file=user_image_5.png
application=status-available
application=status-chat
application=status-away
application=status-dnd
application=status-xa
application=status-unavailable

res_digium_phone.conf is OK

Best

This won’t work unless your web server serves files directly out of /etc/asterisk/digium_phones. It probably doesn’t.

You shouldn’t do this unless you’re going to replace the entire phone’s config, which your further-snippet shows you’re not. You should just use the blf_items DPMA key and plug the name of the blf items XML file into the value, and make sure it’s accessible by the phone’s cURL capability at the file_url_prefix.

@rein_hard1 : Still working on the solution you proposed but for the time being, the phone still loads the DPMA config without considering the BLF items

@malcolmd: I am lost, sincerely. I am using DPMA and xml. I read your great wiki and going for the Combined Configuration.

As the files structure have changed since you wrote the explanation, I am using the res_digium_phone_general.conf with

   globalpin=
    userlist_auth=disabled
    config_auth=disabled
    mdns_address=192.168.120.90
    mdns_port=5060
    mdns_transport=
    service_name=Asterisk
    firmware_package_directory=/var/www/html/digium_phones/
    service_discovery_enabled=yes
    file_directory=/etc/asterisk/digium_phones/

My res_digium_phone_additional.conf (as proposed by rein_hard1) contains a specific
conf for one phone

[113]
type=phone
config_file=00fd3092e62.cfg
line=113 

the MAC address of the phone is indeed 00:fd:30:92:e62

the file 00fd3092e62.cfg then contains

<?xml version="1.0" ?>
<config>
    <setting id="config_server_url" value="sip:[email protected]:5060;transport=udp" />
    <setting id="server_environment" value="DPMA" />
    <accounts>
        <account index="0" status="1" register="1" account_id="113" username="113" authname="113" password="123456" line_label="113" caller_id="113">
            <host_primary server="192.168.120.90" port="5060" transport="udp" />
        </account>
    </accounts>
	<contacts url="contacts-internal.xml" />
    <smart_blf>
        <blf_items url="myBlfFile.xml" />
    </smart_blf>
	</config>

(may be overkill for the contacts and phone itself as DPMA fetches that already).

and… finally…myBlfFile.xml is filled with:

<config>
    <smart_blf>
        <blf_items>
            <blf_item location="side" index="0" paging="1" contact_id="189">
                <behaviors>
                    <behavior phone_state="idle" target_status="on_the_phone" press_action="call_vm" press_function="dial" />
                    <behavior phone_state="idle" target_status="idle" press_action="regular_dial" press_function="dial" />
                </behaviors>
                <indicators>
                    <indicator target_status="idle" ring="0" ringtone_id="Digium" led_color="green" led_state="on" line_label_fgcolor="#BDBDBD" line_label_bgcolor="#212121" />
                    <indicator target_status="ringing" ring="1" ringtone_id="Techno" led_color="red" led_state="fast" line_label_fgcolor="#FFFFFF" line_label_bgcolor="#308030" />
                </indicators>
            </blf_item>
        </blf_items>
    </smart_blf>
</config>

I also used the blf key in my res_digium_phone_device.conf for extension 113

contact=contacts-internal.xml
blf_items=myBlfFile.xml
blf_contact_group=PBX Directory

All the files are both in /etc/asterisk/digium_phones and /var/www/html/digium_phones.

I tried to be as comprehensive as possible to make the story clear and allow the debugging. Because it is still not working… I know I am missing something, but what ? Please be tolerant …

Thanks !!

How can I know where from the server fetches files ?

Yes, I did that too, but it seems my issue is with the cURL capabilities. Which folder should I use ? (Both /etc/asterisk/digium_phones and /var/www/html/digium_phones contain the files )