Display last active time-condition for basic company number on Sangoma Phone - are we open or are we closed?

I might have missed it, but…is there a way to display the active time-condition on a Sangoma phone?
On my freePBX system I have 3 time-conditions:

  1. special service (overnight, e.g. pharmacy)
  2. holiday
  3. open
    If no match “special service” goes to “holiday” and if no match goes to “open”…if no match goes to the answering machine.
    I tried to asign line keys to every time-condtion, but the problem is that e.g. in case of a holiday the leds of the time-conditions “open” and “holiday” are both red (during normal opening hours).

Wouldn’t it be useful to display the currently active time-condtion on the display of a Sangoma phone, like the status “available”?
How can somebody check that the phone system is in the correct operating mode? Isn’t this a basic feature of any phone system?

My phone is a s705.


Say you have:

Special Service = *271 = Whatever…
Holiday = *272 = Jan 1.
Open/Closed = *273 = Mon-Fri 9AM-5PM.

A normal day 9 AM-5PM only *273 should be green.
Yesterday (Jan 1) *272 would be green the entire day, and *273 would be green only 9-5.
That would indicate that Holiday Mode is enabled, and it makes no difference about the *273 state.

This is how it works by default, if the time condition matches the BLF light will turn green, red if it doesn’t match.
You can invert it in the time condition settings, that it should be red when matching and green when it does not.

Yes, correct…thats the way it currently works…but it isn’t good enough.
e.g. yesterday…both blf timecondition keys on the Sangoma phone would show an ‘active’ signal, holidays and open, during the day.

This is not good enough. A phone system must clearly show the state it is in.

Is there a way to show the active status using a XML query?

As explained, these BLF’s are monitoring the time condition state, so if you see Holiday is green it means that the system is in holiday mode - no matter what the open/closed indicator says…

What isn’t clear enough? If Holiday is green, it means that the system is in holiday mode. don’t look at the rest of the buttons :wink:

Again, these buttons are monitoring the time conditions, which allows you to look at your desk phone and view the status of the time conditions.

Each hint monitors a state and that state only. So if you are monitoring 3 different time conditions, each monitor will show the status of that time condition. What you seem to be trying to do is to monitor the “logic” you have created by concatenating different time conditions to one another. You either will have to infer it from the different states of the lights or you will need to create custom code to indicate whether the shop is really opened or really closed.

1 Like

As a temporary work-around I could accept that two buttons out of three signal an active state, but a professional phone system should be able to just display the currently active time-condition.
Is this really the final solution? Any commercial plugin? No?
I just bought one Sangoma s705 to test it with freePBX, before I install a complete phone system. Does PBXact do a better job regarding time-conditions?

Thanks arielgrin! Yes, I want to know in which state the phone system is. I just don’t understand why nobody else (of the FreePBX users) has asked for this feature yet :wink:

What you are doing, and in fact what many of us do, is creating an IF - THEN logic, which is very useful for this kind of situation, but it is not easy to monitor programmaticaly.
Quickly out of my mind, what you could do is create a script that checks the state of all three time-conditions, and based on their valid combinations, change the status of another hint, that would show the “overall” status of the shop, either open or closed, either because it is closed for the night, holiday or in special service.

1 Like

I think there is no other way to use the time-condition module. A business is open at certain days during the week and at certain hours…except for holidays. So every freePBX user has to create at least two time conditions (open/closed, holidays). One should be able to check on the (Sangoma) phone, what time condition the system is in. Yes, it would require some code :wink:

I imagine that my answer is not going to be what you want to hear, but at any specific point of the day, your shop is either open or closed, whether it is because of off hours or holidays. Of course you might have different “we are closed” messages depending on whether it’s off hours or holidays, but the outcome is the same, which is to inform your customers that the shop is currently closed and when to call again if desired. The logic will get you exactly where you want, but it might not be easy to monitor.
For example, one of my customers is located on a country that has some “non-static” holidays, and they don’t want to go into the trouble of scripting a solution to find out if there is a holiday or not, so they just have only one time condition for open-closed, and when a holiday arrives, they just override that one time condition.

The problem is their is no such thing as state of the Phone System and you are stringing multiple time conditions together. Why not just use 1 time condition and add your Holidays into that same time condition with no start or end date that way the whole say is closed for the Holiday that way you have a single Time Condition that will always show the state of open or closed. That would give you what you are looking for but when you string more than 1 together each time condition has its own state its not a global PBX state.

Would it be possible to trace the route of a virtual call, every second or so, using a script…and displaying the active time condition (at the end of the route)?
Anyway…if nobody is interested in this feature…

Every Auerswald phone system has it…even the 10 year old ISDN systems. I just got used to it…


The business (pharmacy) is open from Mo-Fr 8-18h and on Saturday 8-12h, it is closed on holidays, but it is open 24h every 9th day (even on holidays). I dont know how to implement it in one time condition.

Trace what. Every DID could take a different call path. There is no Global Company wide thing that you are looking for.

ok…you are right…its a different design.

One last question…
Is it possible to extract the info from the inbound routes? On my system I am using Call Flow Control as destination and it shows 0. If I would use a time condition as destination, would this show me the state…or just an override?

ok…just realized…this would give me only the status of the first time condition in line…

I’m not completely sure but I think you can create time groups and have the time condition to check against more than one for either matched or unmatched.

1 Like

Why not just move to a single time condition. You do not need more than 1 for your setup from what I can tell. Within the time group define all the days you are closed for Holiday based on Date and no start and end time that will make the whole day be a closed day.

Or use calendar based time conditons