Open Source Training Seminar FreePBX Paid Support

Ticket #2998 (closed Bugs: fixed)

Opened 1 month ago

Last modified 4 weeks ago

Timecondition linked to Day Night mode does not toggle

Reported by: rolly Assigned to:
Priority: minor Milestone: 2.5
Component: Day Night Mode Version: 2.5-branch
Keywords: Timeconditions Cc:
Confirmation: Confirmed SVN Revision (if applicable):
Backend Engine: Asterisk 1.4.x Backend Engine Version:

Description

I have just upgraded from 2.4 to the 2.5 beta1 and I am testing the Time Conditions linked to a day night mode.

On the Time Condition itself I have selected 'Associate with - xxxxx Day Night mode - Day mode'.

My day night mode is currently set to 'Night' and on the Day Night module screen it says 'Linked to Time Condtion 2 - Forces to Nigh Mode' (Note the two spelling mistakes which should probably be fixed).

When I call in, I see in the log that the call is routed through the Time Condition, but it goes to day mode as that is what the time condition matches whereas I would have expected the day night toggle to override this.

If I set the Time Condition association to 'Associate with - xxxxx Day Night mode - Night mode', then it seems to route correctly to Night Mode, but I don't want to have to change it here. I want the users to be able to dial the day night mode toggle to switch this on and off.

Is there something I am missing here or is this a bug?

Change History

08/08/08 14:20:55 changed by p_lindheimer

  • keywords changed from day night toggle to Timeconditions.
  • owner changed.
  • confirmation changed from Unreviewed to Confirmed.
  • component changed from Time Conditions to Day Night Mode.
  • milestone changed from Cut Line to 2.5.

I think the error is in daynight mode indicating the wrong state. In time conditions, if you have 'Force Day' then setting daynight mode to day will force it to always go to the day destination regardless of time. If you choose 'Force Night' then it should always go to Night regardless of the time. I'll make the fix to the links in daynight. Then please verify it is doing as described and I did not get it backwards.

08/08/08 14:22:16 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

(In [6290]) fixes #2998 displaying timecondition link associations ackwards. Patches ref #3004 may not all apply with this fix and still need to be addressed

08/13/08 14:55:09 changed by rolly

OK, perhaps I am a little confused here about how this should work so feel free to correct me if I am wrong, but this is how I imagined it would be.

1) An inbound route is set to terminate in a time condition. When that time condition is NOT associated with a Day/Night mode, the time condition applies (obviously).

2) When a day/night IS associated with a time condition, the Day/Night mode trumps the time condition ONLY when it is in the opposite position to the 'Associate with - Force Mode xxxx' showing on the Time Condition.

Eg. If Day/Night mode is in Day mode and 'Associate with' on the Time Condition points to the day night mode with 'Force Day', then because the Day Night mode and the 'Force' on the time condition are a match, then the Time Condition rules apply. If I switch the Day/Night into Night mode then this will now override the time condition and force the destination to the 'Does Not Match' destination of the time condition.

Is this how it should work?

So is it the Day/Night destinations or the Time condition match not match destinations that apply when there is an association? I would imagine that when a Day/Night mode is used purely as a toggle for a time condition, then is should be the time condition destinations that apply, not the Day Night mode destinations.

Anyway, I retested these patches and got pretty much the same results as before where the time condition association 'Force mode' was set to 'Day', but the Day Night mode was set to Night, but the Time Condition was applied as normal rather than being overridden by the Day/Night toggle.

What I was hoping to get from these new features was a Time Condition that could be overridden by a day night mode Ie. Work hours are normally 8am-5pm weekdays, but if someone was to go home early or have a day off, they could dial the day/night toggle and manually force a NOT match on the time condition regardless of the time/day/date, then when they are back at work, they toggle the day/night again and we go back to applying the time conditions.

08/13/08 15:06:25 changed by rolly

Ok, after doing some more fiddling about with this, I believe the mistake I was making with the retest was that I had 'Force Day' rather than 'Force Night' on my Time Condition association. When I changed the Force from 'Day' to 'Night', the day night toggle behaved as expected. Thanks

08/13/08 15:11:55 changed by p_lindheimer

How it is suppose to work (hopefully I got it right):

  • Force DAY means that when you set daynight to day, you will always go to the true part of the timecondition regardless of the time, since the true represents day (usually).
  • Force NIGHT means that when you set daynight to night, you will always go to the false part of the timecondition regardless of the time, since the false represents night (usually).

Unless I have confused myself...

08/13/08 16:26:37 changed by rolly

So if you have 'Force Day' and you set 'Night' then the Time Condition will apply. Mmm, it's a bit of a brain bender, but I think I understand a bit better now thank you.

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads