Freepbx bug? BLF subscriptions

We’ve been having a problem over the last several months. The problem is related to the scheduling for time conditions.

We have a time condition set for 8:30am to 4:30pm. I have a script set to check for changes to the ‘hints’ and send out an email at the time of the hint changes - this happens automatically every day and we receive an email at 8:31am daily. Except sometimes, like today, when it came in at 8:38.

It switched to the proper ‘color’ after a call was initiated to the company. The caller just gets through, no issues - however, the people looking at the BLF hints see ‘red’ status, as the time condition is not matching, though it should be. As soon as the caller comes though, the hint changes and the blf status updates.

Here is what happens on the pbx during a packet capture. The blacked out section is the same caller, I hid the number in use..

Here’s the phone:

The hint is supposed to update at 8:30, but it’s not updating until a phone call comes in. What can I do about this?

Asterisk doesn’t have a concept of time conditions for hints. It just has generic controllable custom device states. FreePBX would be using one and would be the one controlling/manipulating it. It’s likely that is the source, so would be the area to focus on.

Thanks, I updated the subject to ‘freepbx.’

There’s a scheduled job for time conditions:

# fwconsole job --list | grep -i tc
| 51 | timeconditions       | schedtc                           | * * * * *    | 2025-05-30 13:59:00 | Class: FreePBX\modules\Timeconditions\Job                                                                                              | Yes     |

This is the external mechanism that triggers the hints to change when the time changes. Not sure what or where this job activity is logged.

Edit - there’s an advanced setting related to this job

Tool tips are stale.

1 Like

I’ll examine this mechanism.

The BLF time tome condition can’t actually happen right at the time of the condition change as there is not an actual toggle. Each time an inbound caller comes in, the dialplan checks the current time and makes a routing decision based on current time of call. When Philippe and I wrote this 15 years ago we had a job that runs every 10 mins from memory to update the hint but we also set the hint each time a call comes in to also make it update sooner. The hint doesn’t control the actual caller destination, it is just informational. There is an advanced setting to control how often the job runs to update the BLF.

All very good info.

I examined the time condition polling interval setting in the advanced settings - it’s already set at the lowest interval: 60 seconds. I had a look at the schedtc / timeconditions job in fwconsole, and it’s cron’d at * * * * *, so that should be every minute.

Unfortunately, the hint isn’t updating every minute - it’s missing a bunch of those checks/intervals. The hint does get updated when the call comes in.

Is there some way I could write my own check so I could monitor it more closely? What does that scheduled job do? My tc job is 42, so I’m going to use: fwconsole job --run 42 --force -vvv and run a check for change in status, then email that to monitor changes. Perhaps just running the job with a --force will correct the delay?

Or maybe I could, every day at 8:30, create some kind of bogus inbound call that causes freepbx to check hints? Not sure how I would go about that without disrupting the office…

Initial results adding that command to cron is, periodically (every other poll) -
“The command is already running in another process.”
I would expect to get that for every poll… I might just run this command and turn off the alerts.

No recurrence of the issue yet. That’s not out of the question, it happens about once / week or every two weeks. I’ll report again.