[Serusers] route by time of the day?

Atle Samuelsen clona at cyberhouse.no
Tue Nov 21 07:07:55 CET 2006


Hi again :) 

* Andrei Pelinescu-Onciul <andrei at iptel.org> [061120 22:59]:
> On Nov 20, 2006 at 22:47, Atle Samuelsen <clona at cyberhouse.no> wrote:
> > Hi,
> > 
> > 
> > * Andrei Pelinescu-Onciul <andrei at iptel.org> [061120 21:39]:
> > > On Nov 20, 2006 at 16:50, Ricardo Martinez <rmartinez at 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).
Sorry my bad there. I tought even one more step ahead :$ I was thinking
useing avp + time as a call-forwarding solution ;) but that could
proberbly be done by something like 

if(gettimeofday() >$time_from_database){
};

> 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 :-)).

Thanks Andrei, Would be nice to see at some point of time.

- Atle

i> 
> 
> Andrei



More information about the sr-users mailing list