by jnewkirk » Thu May 29, 2014 10:40 am
Thanks for your response. Unfortunately this got back-burnered by a few emergencies, but I revisited it yesterday. Your suggestion led me to seek a matching freepbx-friendly solution, and I soon realized that FreePBX already exposes the necessary hints, if told to do so. (with the 'bonus' that it reflects automatic toggles in Time Conditions as well as manual toggling) So here's where it ended up:
In FreePBX go to Settings->AdvancedSettings and ensure that "Enable Custom Device States" is set to True. (this sets it to expose hints for various aspects of the dialplan) (also note that you need to click the green checkmark that appears at the end of the line to apply the change - each change in Advanced Settings has it's own Apply button...)
Now create your Time Condition or Call Flow Control. (I ended up switching from TC to CFC because the user decided she wanted manual-only control, provided I could make the BLF work)
Note the feature code (*271, *280, whatever) assigned to the toggle, and head to the Digium Phones section in FreePBX, and go to Phonebooks.
Edit (create if needed) a phonebook and create an entry with 'Subscribe' checked, and the feature code used for both Number and SubscriptionURL, then assign that phonebook in the Phones via the 'Rapid Dial Key Phonebook' drop-down, save, apply, reconfigure affected phones.
At this point pressing the line button associated with this phonebook entry will toggle the time condition or call flow control, and the BLF lights green in one state, dark in the other. It also responds to scheduled changes in the Time Condition, so when it toggles automatically to 'night mode' at 6pm or whatever, the BLF reflects that.
Win.
Thanks again for the help, and for the phones, and for Asterisk...
j