Hello, I want to route a phone number to different routes on different hours. If the time is later then 17 i'll route to route(1), else route to route(2). How can i do this? is there a way to get time in ser.cfg? Or i need to make a separate module?
Thanks.
You can use LCR and have scripts / cron update LCR table. This table is read each time you run the load_gws().
- Thomas
On Wed, 2008-12-10 at 10:28 +0200, Netadmin wrote:
Hello, I want to route a phone number to different routes on different hours. If the time is later then 17 i'll route to route(1), else route to route(2). How can i do this? is there a way to get time in ser.cfg? Or i need to make a separate module?
Thanks. _______________________________________________ Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
That sounds awful.
Maybe the select framework epxorts a timestamp which can be evaluated. Unfortunately I could not find a documentation of the the available selects.
regards klaus
Thomas Nilsen schrieb:
You can use LCR and have scripts / cron update LCR table. This table is read each time you run the load_gws().
Thomas
On Wed, 2008-12-10 at 10:28 +0200, Netadmin wrote:
Hello, I want to route a phone number to different routes on different hours. If the time is later then 17 i'll route to route(1), else route to route(2). How can i do this? is there a way to get time in ser.cfg? Or i need to make a separate module?
Thanks. _______________________________________________ Serusers mailing list Serusers@lists.iptel.org mailto:Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Klaus Darilion wrote:
Maybe the select framework epxorts a timestamp which can be evaluated. Unfortunately I could not find a documentation of the the available selects.
I don't think so. You could try to use the Date header field, but this isn't mandatory and may be spoofed.
Other than that, using either lcr or, alternatively, mess with user_attrs or uri_attrs is probably the only way to do this. The latter doesn't need a reload or anything.
Regards, Martin
Martin Hoffmann wrote:
Klaus Darilion wrote:
Maybe the select framework epxorts a timestamp which can be evaluated. Unfortunately I could not find a documentation of the the available selects.
I don't think so. You could try to use the Date header field, but this isn't mandatory and may be spoofed.
Other than that, using either lcr or, alternatively, mess with user_attrs or uri_attrs is probably the only way to do this. The latter doesn't need a reload or anything.
Or soon: use the sip-router core with the pseudo variables (pv) module from Kamailio, then you can compare with $time(): http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#broken-down_...
:-)
regards klaus
Klaus Darilion wrote:
Martin Hoffmann wrote:
Klaus Darilion wrote:
Maybe the select framework epxorts a timestamp which can be evaluated. Unfortunately I could not find a documentation of the the available selects.
I don't think so. You could try to use the Date header field, but this isn't mandatory and may be spoofed.
Other than that, using either lcr or, alternatively, mess with user_attrs or uri_attrs is probably the only way to do this. The latter doesn't need a reload or anything.
Or soon: use the sip-router core with the pseudo variables (pv) module from Kamailio, then you can compare with $time(): http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#broken-down_...
:-)
It still is somewhat non-elegant. With SER you can load attributes from an arbitrary ID. It's a bit hidden in the avp_db module. Maybe one can do this elegantly with database views already?
Regards, Martin
-----Original Message----- From: serusers-bounces@lists.iptel.org [mailto:serusers- bounces@lists.iptel.org] On Behalf Of Klaus Darilion Sent: Wednesday, December 10, 2008 3:50 PM To: Martin Hoffmann Cc: serusers@lists.iptel.org; Thomas Nilsen Subject: Re: [Serusers] ser routing
Martin Hoffmann wrote:
Klaus Darilion wrote:
Maybe the select framework epxorts a timestamp which can be
evaluated.
Unfortunately I could not find a documentation of the the available selects.
I don't think so. You could try to use the Date header field, but
this
isn't mandatory and may be spoofed.
Other than that, using either lcr or, alternatively, mess with user_attrs or uri_attrs is probably the only way to do this. The
latter
doesn't need a reload or anything.
Or soon: use the sip-router core with the pseudo variables (pv) module from Kamailio, then you can compare with $time(): http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#broken- down_time
:-)
regards klaus
[[scb]] I'm not sure if this helps but we do time-of-day routing. We have an external process which determines the time-of-day then updates call forwarding flags (in usr_preferences) based on the presence or absence of avp based flags. Perhaps this approach would help?
-Steve
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers