On Nov 20, 2006 at 22:47, Atle Samuelsen clona@cyberhouse.no wrote:
Hi,
- Andrei Pelinescu-Onciul andrei@iptel.org [061120 21:39]:
On Nov 20, 2006 at 16:50, Ricardo Martinez rmartinez@redvoiss.net wrote:
Hello list. I'm wondering if anyone has implemented a routing rule depending on the time of the day.
None that I know of.
Is there a way to acomplish this?, maybe using AVP ? or something like that?
You would need either a new module or you could perhaps modify lcr to take the date into account (should be easy).
Why not extend the avp-framework ? you could then do a if($time>=1200){ route(1200) }else{ route(else); };
I've assumed that a huge date based routing table was involved (that's why I suggested changing lcr). Anyway avp is not the answer, avp are used to store attributes (and the current time is not a user/domain attribute). A new script functions would work: if (gettimeofday()>"10:01:45"){...}.
I can see the use, but right now adding this has a very low priority (next release if there are more requests and we don't forget :-)).
Andrei