Time condition priority question

I have a time condition (1) That says we’re open between 8 am and 5:pm M-F Jan 1 thru Dec 31. If this time condition is true it sends the call to the appropriate ring group map Front desk then reception, then tech support, then managers then all. If not true it goes to destination IVR (aft hours message).

Now I’ve just added a time condition (8) holiday (Thanksgiving 2008) Starts Weds Nov 26th at 17:01 and ends Sat Nov 29th at 7:59. It says if true, go to IVR after hours message. If not true go to ring group 503 which is the 2nd step (reception) of the normal work day ring group map, that ultimately ends in IVR after hrs voicemail.

How do the time rules get processed? Does rule 1 have priority over rule 8.

Thanks.

P…

You can daisy chain time conditions. Start with your most specific and move to the most generic. Make your Holiday time match the first one in your inbound route and if it matches, play you holiday IVR, if it doesn’t match, go to your normal time condition.

OK. I will go out on a limb here and presume that because I didn’t get an answer it was because I didn’t give enough info the first time. Let’s try again.

Greetings,

Here are my current versions. I know they are old. As a beginner to VOIP,
I am trying to get familiar with the system before making any changes. At
some point, once I work out as many of the issues I am having as I can, I
will get up the nerve to do an update. Look for a future post coming to a
forum near you soon.
This is a production system (about 30 extensions) and I can’t afford to
have it crash on me without having the knowledge to repair it. It has one
incoming T1.

Trixbox version Version: 1.2.3
Kernel Version 2.6.9-34.0.2.ELsmp (SMP)
Distro Name CentOS release 4.4 (Final)
Created by phpSysInfo-2.5.2_rc2

Hardware Information
Processors 2
Model Pentium III (Katmai)
CPU Speed 547.41 MHz
Cache Size 512 KB
System Bogomips 2189.87

Version
Asterisk 1.2.12.1 built by root @ localhost.localdomain on a i686 running

Linux on 2006-10-18 18:35:57 UTC
Verbosity is at least 1

FreePBX 2.3.1.1 on 10.0.0.5
Time Conditions 2.4.3.1
Day Night mode 1.0.2.4

In addition to my first post above, perhaps I can rephrase the question.

With the version of time conditions and day/night control that I have, how do the time conditions get processed.

I was under the impression that there was a “priority” order of time condition processing.

I have one time condition called “Business Hours” It has Mon - Fri 8am to 5 pm set. No month day or year etc is set. If true, it follows my ring groups. If false it goes to after hours voicemail.

How would I set a time condition so that on Christmas day, it goes directly to after hours voicemail?

I tried adding a time condition called “Christmas day” that says on Thursday December 25th 2008 and only on Thursday December 25th 2008, Between the hours of 8 AM and 5 PM go to to after hours voice mail.

I tried this on Thanksgiving with the appropriate dates of course and it didn’t work.

I do not use the day/night switch.

Any suggestions welcome.

Thanks

Paul …

Hi John, Thanks for the help. I did a little cleanup and reorganizing. I deleted all my time conditions except “business hrs”. I created one called Current Holiday". I took your advice re most specific to least specific.

Now what I have is only two time conditions: (No day/night), and it still didn’t work 100%.

TC10. The first (in order of processing) of the two time conditions is the most specific. It is called “Current Holiday”. In yesterday’s case for New years day. (we left early on Weds) It was set for:

Time Start: 1600
Time Finish: 1730
Weekday Start: Wednesday
Weekday finish: Thursday
Month day start: 31
Month day finish: 1
Month start: December
Month finish: Jan

If true, it goes directly to after hours voicemail. If false, it goes to the next time condition (below) TC1.

TC1. The second of the two time conditions (in order of processing). This is the least specific of the two time conditions. It is called “Business Hours” It is set as follows:

Time Start: 800
Time Finish: 1730
Weekday Start: Monday
Weekday finish: Friday
Month day start:
Month day finish:
Month start:
Month finish:

Note: No month day or year etc is set. If true, it follows my “normal, daily” ring groups. If false it goes to after hours voicemail.

Incoming calls go to the first time condition (current holiday). In this case it was New years eve/day and New years day.

According to the logic, any incoming from 1600 Weds Dec 31, thru 1730 Thurs Jan 1 should’ve gone to after hours voicemail. I know it worked properly on Wednesday after 4:00 pm. It was verified by myself and one other user. Unfortunately, I did not try on Thursday. However another user (the president of the company) did, and told me today (Friday), that when he tried it yesterday (New years day) during working hours, it followed the normal daily ring group path.

I am perplexed. Is it possible that it had trouble shifting from 2008 to 2009?

Any thoughts?

Thanks.

Paul…

PS. Not to trouble anyone, and I understand fully. I have a few pdf’s of screen shots of my time conditions if that might present a clearer picture of what I am dealing with.

Paul,

TC10 mentioned in your last post does not do what you expected. Instead of the condition being true for the entire time 12/31 16:00 - 1/1 17:30, it is only true 12/31 16:00 - 17:30 and 1/1 16:00 - 17:30.

I’m not sure if you can specify an extra time range in a single time condition in FreePBX 2.3, but in FreePBX 2.5 you can do something like this to get the desired results:

(first range)
Time Start: 1600
Time Finish: 1730
Weekday Start:
Weekday finish:
Month day start: 31
Month day finish: 31
Month start: December
Month finish: December

(second range)
Time Start: 800
Time Finish: 1730
Weekday Start:
Weekday finish:
Month day start: 1
Month day finish: 1
Month start: January
Month finish: January

I think I would approach this a little differently. I would make the incoming ring go to a day/night. In day mode, send it to your normal call flow. In night mode, send it to a Holiday announcement or IVR. FreePBX will now allow you to assign number to recordings like *2915. You can dial this number and re-record the announcement to match the Holiday.

When you are ready to close for the holiday, record the announcement and then dial *280 to put it in night mode. When you return after the holiday, dial *280 to put things in day (normal) mode and you are back in business.

sasargen & John, Thanks for the replies.

John,

Your solution seems to be the best. Actually I wouldn’t really need to make a recording because we only use one “after hours” message regardless of holiday or night time. But I get the idea. Thanks.

sasargen,

I appreciate your explanation. For my own knowledge, can you (either on forum or off) walk me through how my TC10 time condition as listed above is processed by the system?

From your reply, I am gleaning that it processes as follows:

IF Month start=(Dec) AND date start=(31) AND weekday start=(Weds) THEN make condition TRUE from time start=(1600) to time finish=(1730).

If I am correct in my assumption, this confirms your conclusion.

Continuing,

IF Month finish=(Dec) AND date finish=(31) AND weekday finish=(Weds) THEN make condition TRUE from time start=(1600) to time finish=(1730).

If I were to re-state this in layman’s/rough Boolean terms, is my statement below accurate?

IF the (start and finish times) fall on or between the ((start month, start date and start day) AND the (finish month, finish date and finish day)) THEN the condition will be TRUE during the start and finish time.

Thanks. I appreciate your patience.

Paul…

Paul,

The way the time conditions work is based on the Asterisk command GotoIfTime. It is not straightforward to everyone, but it is documented. Here is a link to get you started:

http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIfTime

Hi sasargen,

I took a look at the link. I am sorry to report that it didn’t clear much up for me.

Did my post of Jan 3rd (above) make sense ? Is my summary statement accurate?

Thanks

Paul…

Paul,

It does look like your conclusions are on the right track, so keep at it.

Even though the FreePBX interface looks like you are defining an exact start time and stop time for a single time range that can span long time periods, that is not happening. It is actually allowing you to define the start and stop of four independent time periods.

AND AND AND

Start and finish time always refer to a single day, if the time period is the entire day, just leave both start and finish time blank.

Each of the four time periods that you define work as a filter (anything that you do not define will be ignored). Each time period is a range, which may have the same start and stop point (Thursday-Thursday means it is only true on Thursday) or different start and stop points (Thursday-Friday means it is only true on Thursday and Friday). That means you can define a time condition that takes place 8:00-9:00 Monday-Monday 4-4 June-June. This will only be true 8am to 9am on Monday the 4th day of the month of June. If June 4 is not a Monday, this will not be true.

sasargen,

Thank you. It was the AND-AND-AND that did it. Thus if ANY of the 4 time periods are false, the condition is false. The blanks(ignores)are not “tested” so if I leave the WEEKDAY blank, it becomes an AND-AND. And if all 3 are true, the condition is true. If any one of the 3 are false, the condition is false.

Please tell me I have finally gotten it.

Thanks

Paul…