Digium Phones - BLF and Customization


#1

Hi,

After reading plenty of good reviews about these phones i bought a few (six) to use with a new setup.

I am using the lastest Distro on asterisk 11. I have installed and licensed the DPMA and got it working (appart from the mDNS, no idea why). I have also upgraded the asterisk module to 1.7. I have upgraded each phone also to the latest firmware.

I need to be able to:

Call Flow:
Change one of the BLF’s on the phone to show RED or GREEN for the call flow toggle (hint *280) i have created a phonebook entry and so far i have made it show GREEN for “ON” (red on all other phone makes) and OFF for “GREEN” (green on all other phone makes).

I understand i may need to use a Smart BLF. However i’m stumpped as to where to configure this. I have been through the below however it fails to tell me where the location of the XML config should go. Unless i’ve missed it.

https://wiki.asterisk.org/wiki/display/DIGIUM/Smart+BLF#SmartBLF-SmartBLF
If possible i would like to create a BLF config and push it out to all the phones.
Phone Name:
On the top left of the phones screen it shows: “Digium Asterisk” is there a way to change this?

Bare in mind that I have been using YeaLink and Cisco SPA942 and SPA504Gs in the past and have had them configured through the OSS endpoint manager for a number of years. never before have i had so mush hassle with customising phones!
Hope someone can shed some light?
Thanks.


#2

Hi Mark,

Have you updated the D70’s to the latest firmware?

The problem i found was the FreePBX module for the digium phones is pretty limited, there’s still some work to be done.

I have “hacked” the module on my system to make it do what I need it to do but I wouldn’t want to make my hack public as it’s a little messy. I can however send you the updated files if you wish to try them out.

You could however post your myblfitems.xml so that we can see if that’s all good

Jimmy


(Mark) #3

Trying to follow along here but am still not sure how I tell it to look for the myblfitems.xml.

Am using latest FreePBX and Asterisk with D70’s.

I need two blf: one for a queue, and one for call flow (Day/Night).

I’ve been going through the Smart BLF wiki but cannot figure out the steps I need to take.

Can anyone point me to a simple example for either of the things I am trying to accomplish?

Thanks.


#4

I have added:

blf_items=myblfitems.xml

to the res_digium_phone_devices.conf
and added: myblfitems.xml to digium_phones

However when i reconfig the phone it shows:
BLF Items: None

and if i do anything in the GUI it over writes the changes in res_digium_phone_devices.conf


#5

The GUI will overwrite the res_digium_ con figs! that is what it is supposed to do. Do you have the Digum module in easy mode. I think you need advanced mode to make the changes.


#6

I’ve been tinkering about with it and yes it certainly does overwrite the res_digium files.
It’s not in easy mode, however I still find anywhere in the GUI that gives these advanced configuration options, such as BLF_ITEMS xml input.


#7

Some progress, I have edited the module php files to luxe the blf_items into the SQL, this in turn is processing the info into the res files and then into the astrisk config.

If anyone is interested in these files let me know and I will make them public

Next I need to sort out the blf XML to do as I need it. Results will be posted here

Thanks

Jimmy


(Malcolm Davenport) #8

Howdy,

The add-on doesn’t currently deal with the new things provided via Smart BLF. We’re working on that.

There’s no way to change the “Digium Asterisk” text there in the corner at present. We’ve a feature request on file to allow customization of that, but it’s not possible in any current firmware.

Cheers


#9

Hey,

Hi Malcolm, Thanks for the update, It would be excelent to see Smart BLF in the module. I have made some changes to the modules source code to try and get Smart BLF working. So far i have:

localhost*CLI> digium_phones show phone 1030 Name: 1030 Group Pin: Pin: MAC: Active Ringtone: Office Timezone: Europe/London NTP Resync: default Web UI enabled: Yes BLF on unused Line keys: No Recording enabled: Yes Use Local Contact Storage: Yes Parking Extension: 70 D40 Logo File: None D50 Logo File: user_image_3.png D70 Logo File: None Login Password: Accept Local Calls From: host Electronic Hook Switch: None Name Format: first_last Preferences Locked: No Parking Transfer Type: Blind ConfigFile: AUTO_GENERATED Line: 1030 Contacts Display Items: None Contact: contacts-1.xml BLF Items: myblfitems.xml Contacts Max Subscriptions: default LCD Brightness: 9 LCD Contrast: LCD Backlight Dimming: On LCD Backlight Timeout: LCD Backlight Dimming Brightness: 10 Active Locale: en_GB Ringer Volume: Speaker Volume: Handset Volume: Headset Volume: Reset Volume levels between calls: No Headset Answer: No LAN Port Mode: PC Port Mode: Enable Check Sync: Yes

contacts-1.xml:

<contacts
group_name="Main List"
editable=“0”

<contact
first_name="*280"
last_name="“
organization=”"
contact_type=“sip|external"
subscribe_to=”*280"
id=“0”

<numbers>
  <number dial="*280" label="Extension" primary="1" />
</numbers>

and

myblfitems.xml

<smart_blf>
<blf_items>
<blf_item location=“side” index=“4” paging=“1” contact_id=“0” blank=“0”>










</blf_item>
</blf_items>

</smart_blf>

yet On the phone the BLF key is just sat turned off and nothing happens when i press it. I’m just wondering if someone can point me in the right direction?
I’m not entirely sure if the contact id is being passed to the phone, is there a way to extract the xml from the phone to check?


(Malcolm Davenport) #10

Howdy,

I see several things.

What’s your blf_contact_group for your type=phone configuration in the _devices.conf file? Is it “Main List”? Also, I’m not, offhand, sure about spaces in that; they’re probably fine, but shrug.

Your contacts node doesn’t define an “id;” it should have one.

has_voicemail, can_intercom, and can_monitor are deprecated. They’re not part of 1.4, per-se. We’ll still do the right stuff under the hood to support them, but they shouldn’t be used anymore. (not entirely your fault, we’re probably setting them right now in our addon, and they’re not actually usable anyway because the addon doesn’t inject dialplan into the dial macro to handle them…which we know about)

Contacts are wildly different in phone firmware 1.4. Stuff is as backwards-compatible as possible, but you’ve got numbers defined, and in your BLF Items file you’re referencing actions that don’t exist in your Contacts files.

Good reading on this is:
https://wiki.asterisk.org/wiki/display/DIGIUM/Contacts
(no more numbers, see actions)

and then you can look at the use cases here:
https://wiki.asterisk.org/wiki/display/DIGIUM/Smart+BLF#SmartBLF-UseCases

to see the interaction between Contacts files and BLF Items files (create actions, reference those actions).

Cheers


#11

Hey,

Thanks for looking over the config. I’ve just done the following to my configs:
(lifted from the wiki and adjusted slightly) It’s at a minimum to try and get this to work.

contacts-1.xml

<?xml version="1.0" ?>

myblfitems.xml


<smart_blf>
<blf_items>
<blf_item location=“side” index=“0” paging=“1” contact_id=“0” blank=“0”>








</blf_item>
</blf_items>

</smart_blf>

End Result: BLF key still unlit and does nothing. I could do with finding out if the myblfitems.xml is being processed by the D50. On the freepbx module the file is located with the contacts-1.xml and that is being received by the phone (I have made changes to the file and these are present on the phone after a reconfig). permissions also match.

Files Location: /etc/asterisk/digium_phones/


#12

striped the blf_item down a little and used the ID number:


This has made no change to the result, still unlit and nothing happens on button press.

Phone Firmware is: 1_4_0_0_57389


(Malcolm Davenport) #13

Howdy,

BLF Items files aren’t retrieved from the file_directory (set to /etc/asterisk/digium_phones for the add-on), BLF Items file are only retrieved from the file_url_prefix.

https://wiki.asterisk.org/wiki/display/DIGIUM/Smart+BLF#SmartBLF-BLFItems

Cheers


#14

Hey,

I’d put the files in there too, however should it be accessible through a browser? as i get a forbidden error.
So i changed the address to go to an external address that i know is accessible:

http://sherwooddatasystems.co.uk/xml/myblfitems.xml
and
http://sherwooddatasystems.co.uk/xml/blf.php

The php i have got to log the access to the file to a log file. I can confirm that the phone is accessing the file.

still the same output :frowning: no blf light or actions.

I must be nearly there :S

Thanks for your input so far


#15

For some more clarity here is my _devices.conf for the phone:

[1036] type=phone full_name=New Phone blf_contact_group=MainList parking_exten=70 parking_transfer_type=blind accept_local_calls=host active_locale=en_GB backlight_dim_level=10 blf_items=blf.php blf_unused_linekeys=yes brightness=10 display_mc_notification=yes lock_preferences=no name_format=first_last record_own_calls=yes send_to_vm=yes timezone=Europe/London web_ui_enabled=yes use_local_storage=yes contact=contacts-1.xml network=network--1 d50_logo_file=user_image_3.png line=1030

(Malcolm Davenport) #16

It should be accessibly through a browser, because the phone’s actually going to cURL them in. More importantly, it should be accessible from the phone. The phone uses a URL-base defined by the file_url_prefix option as specified for a network definition that’s applied to the phone. Depending on the network the phone’s on, based upon what it discovers when it boots and gets an IP address, it’ll use that network and thus that prefix when it makes its request.


(Malcolm Davenport) #17

Both your sample phone config and:
http://sherwooddatasystems.co.uk/xml/blf.php

appear “fine.”

I’ve downloaded your blf items file and looked at it, and tested it, and you are the unfortunate victim of bad documentation on my part. I’ve updated the wiki. The gist is that using the blank option in combination with the contact_id option for a blf_item is bad. So, where you’ve got:

What you really want is:

A couple of points only tangentially related to your goal, your BLF Items sheet is listed as a .php file. You might want that as .xml since it’s not actually a php file (and we wouldn’t want anyone reading this whose web server does weird things to php files on their way to clients to fall prey), and you’ve got the webui turned on. If you’re configuring a phone via DPMA, XML or Switchvox, you should never touch anything in the phone’s webui, or badness can happen (this is more of a warning for any readers, like the first point).

Cheers


#18

Hi Malcolm,

I have altered the functions.inc.php to adjust the phone config to put the new address in the network section. I have installed a distro from scratch and I still get the unauthorised error. This maybe a bug as i also had problems updating the firmware through the GUI. I had to upgrade through the phone GUI.

The system is at work, I will have a go with the altered blf XML file in the morning and will post results.

Cheers


#19

Success! :slight_smile:

I have removed the blank=“0” and hey presto it worked. This SmartBLF feature is a powerful feature. As you say it is important to note that the PHP was used purely for diagnosis and not to be recommended for production use.

There is definitely a bug within the FreePBX Module as the http://<IP_ADDRESS/admin/modules/digium_phones/firmware_package/
gives a 403 error when accessed. I put the working XML back there and it wouldn’t have any of it.

I had to change (hack) line 3310 (or there abouts) to:

$n[‘settings’][‘file_url_prefix’] = “http://sherwooddatasystems.co.uk/xml/”;

I also had to create a contacts-1.xml file manually and store that in it’s usual home:
/etc/asterisk/digium_phones/
After every reload in asterisk I over wrote this file with my own custom one (again just a hack).

There are a few other changes I had to make to the files so that the module produces the phone config file with the required settings like the blf_items= etc.

Note: I’m using 2.11.0.5 and the phones must have the 1.4 firmware installed.

The wiki is your bible, hopefully someone out there will benefit from this thread. with abit more work on the GUI these phones will be a game changer IMHO.

An idea for a feature, on the ring=“1” it would be nice to be able to ring the local phone for a determined time. So when “beep” is set for example it just beeps once and not over and over again.

Thank you Malcolm for your help, appreciated.

Cheers


#20

Success! :slight_smile:

I have removed the blank=“0” and hey presto it worked. This SmartBLF feature is a powerful feature. As you say it is important to note that the PHP was used purely for diagnosis and not to be recommended for production use.

There is definitely a bug within the FreePBX Module as the http://<IP_ADDRESS/admin/modules/digium_phones/firmware_package/
gives a 403 error when accessed. I put the working XML back there and it wouldn’t have any of it.

I had to change (hack) line 3310 (or there abouts) to:

$n[‘settings’][‘file_url_prefix’] = “”;

I also had to create a contacts-1.xml file manually and store that in it’s usual home:
/etc/asterisk/digium_phones/
After every reload in asterisk I over wrote this file with my own custom one (again just a hack).

There are a few other changes I had to make to the files so that the module produces the phone config file with the required settings like the blf_items= etc.

Note: I’m using 2.11.0.5 and the phones must have the 1.4 firmware installed.

The wiki is your bible, hopefully someone out there will benefit from this thread. with abit more work on the GUI these phones will be a game changer IMHO.

An idea for a feature, on the ring=“1” it would be nice to be able to ring the local phone for a determined time. So when “beep” is set for example it just beeps once and not over and over again.

Thank you Malcolm for your help, appreciated.

Cheers

re-post: problem with previous post.