Ticket #774 (closed Feature Requests: fixed)

Opened 7 years ago

Last modified 5 years ago

timeconditions 're-architecting'

Reported by: p_lindheimer Assigned to:
Priority: minor Milestone: 2.5
Component: Time Conditions Version: 2.5-branch
Keywords: Cc:
Confirmation: Confirmed Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

We should re-architect time conditions such that it becomes an 'abstract' set of timeconditions with no actions associated with it. Then modules that want to include time conditinions can poplulate a menu obtained by a method supplied by the timecondtions module.

The first step would be to separate the 'goto' from the current 'timeconditions' and make a new page/module to create the goto conditions that pulls from this class. Then other modules can use the same time conditions for other purposes.

This is analogous to how some SOHO routers I've looked at work. You setup time conditions that can be used in menus like internet availability, when port forwarding should be restricted, etc. It provides for one place to setup the fairly 'complex' time condition menu.

An example of where this could be immediately applied is outbound-allroutes. Today the routes get generated as such:

[outbound-allroutes]
include => outbound-allroutes-custom
include => outrt-001-Emergency
include => outrt-002-Local
include => outrt-003-LongInternational

as an example. With a very minor tweak, using the proposed timeconditons class, you might create a timeconditions that looks like the following, (say you had free PSTN calls on weekends...)

[outbound-allroutes]
include => outbound-allroutes-custom
include => outrt-001-Emergency
include => outrt-002-Local
include => outrt-003-LongInternational|*|mon-fri|*|*
include => outrt-004-PSTNLongInternational|*|sat-sun|*|*

This is an example of an 'easy win' since the format of oubound routing already lends itself to a structure that could quickly adopt this. Plenty of other modules could adopt time conditions in various creative ways if they could simply include a class method which gives them the pulldown menu of existing timeconditons to choose from, and the associated methods in functions to retrieve and include the info in the generated dialplans.

I've assined it to 2.2 - but would probably be easy to tweak what we have and actually get this in 2.1.

Change History

05/03/06 12:30:21 changed by p_lindheimer

  • reporter changed from anonymous to p_lindheimer.

05/04/06 00:28:51 changed by p_lindheimer

  • type changed from Bugs to Feature Requests.

05/04/06 13:22:22 changed by p_lindheimer

Moved this to the wiki discussion: TimeConditionsChange

10/16/06 00:15:07 changed by gregmac

#115 marked as dupe

11/01/06 00:36:34 changed by gregmac

  • milestone changed from 2.2 to 2.3.

12/11/06 01:29:10 changed by naftali5

At least the outbound routing of it can be done with #1447

BTW: #1447 was structured to allow porting into a separate module with very little work. The select boxes have all been reduced to one php function returning the html for a gui element, it POSTs an array allowing very easy integration into any module, if need be. It can even easily handle multiple conditions on one page (returned as a nested array).

01/08/07 14:46:49 changed by

  • milestone deleted.

Milestone 2.3 deleted

01/08/07 15:09:02 changed by vgster

  • milestone set to 2.3.

07/06/08 04:29:24 changed by p_lindheimer

  • status changed from new to closed.
  • confirmation set to Confirmed.
  • engine_version changed.
  • svn_rev changed.
  • version changed from next release to 2.5-branch.
  • milestone changed from 4.0 to 2.5.
  • resolution set to fixed.

07/06/08 04:56:09 changed by mbrevda

KUDOS!!!!! where is the add karma button? :)