[OpenSIPS-Users] do_routing() timerec help, OpenSIPS 3.1.7

Kingsley Tart kingsley at dns99.co.uk
Fri Jan 28 16:46:17 UTC 2022


Hi,

I'm getting nowhere with timerec things with do_routing(). This is with
OpenSIPS 3.1.7.

I have no need for any daily or weekly recurrences. All I'm trying to
do is have a rule apply between two date-times, eg from 2022-01-01
01:00:00 until 2023-04-01 12:00:00 or whatever.

I have tried each of the below options, but with each one, do_routing()
always just picks the first rule, even when the timerecs say (if I'd
got the format correct) the second rule should apply.

Does anyone know what I should put into a rule in order for it to just
apply 24/7 from one date and time to another?

None of these worked:

+--------+---------+--------------+---------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
| ruleid | groupid | prefix       | timerec                   | priority | routeid | gwlist | sort_alg | sort_profile | attrs        | description |
+--------+---------+--------------+---------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
|    173 | 0       | 441476292509 | 20220124T000000|404999    |        1 | NULL    | #gw9   | N        |         NULL | endpoint=gw9 | NULL        |
|    174 | 0       | 441476292509 | 20220128T163000|504096247 |        1 | NULL    | #gw1   | N        |         NULL | endpoint=gw1 | NULL        |
+--------+---------+--------------+---------------------------+----------+---------+--------+----------+--------------+--------------+-------------+

+--------+---------+--------------+-----------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
| ruleid | groupid | prefix       | timerec                           | priority | routeid | gwlist | sort_alg | sort_profile | attrs        | description |
+--------+---------+--------------+-----------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
|    164 | 0       | 441476292509 | 20220124T000000|||20220128T154959 |        1 | NULL    | #gw9   | N        |         NULL | endpoint=gw9 | NULL        |
|    165 | 0       | 441476292509 | 20220128T155000|||99991231T235959 |        1 | NULL    | #gw1   | N        |         NULL | endpoint=gw1 | NULL        |
+--------+---------+--------------+-----------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+

+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
| ruleid | groupid | prefix       | timerec                            | priority | routeid | gwlist | sort_alg | sort_profile | attrs        | description |
+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
|    161 | 0       | 441476292509 | 20220124T000000|0||20220128T154859 |        1 | NULL    | #gw9   | N        |         NULL | endpoint=gw9 | NULL        |
|    162 | 0       | 441476292509 | 20220128T154900|0||99991231T235959 |        1 | NULL    | #gw1   | N        |         NULL | endpoint=gw1 | NULL        |
+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+

+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
| ruleid | groupid | prefix       | timerec                            | priority | routeid | gwlist | sort_alg | sort_profile | attrs        | description |
+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
|    152 | 0       | 441476292509 | 20220124T000000|1||20220128T154559 |        1 | NULL    | #gw9   | N        |         NULL | endpoint=gw9 | NULL        |
|    153 | 0       | 441476292509 | 20220128T154600|1||99991231T235959 |        1 | NULL    | #gw1   | N        |         NULL | endpoint=gw1 | NULL        |
+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+

+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
| ruleid | groupid | prefix       | timerec                                | priority | routeid | gwlist | sort_alg | sort_profile | attrs        | description |
+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
|    155 | 0       | 441476292509 | 20220124T000000|86400||20220128T154659 |        1 | NULL    | #gw9   | N        |         NULL | endpoint=gw9 | NULL        |
|    156 | 0       | 441476292509 | 20220128T154700|86400||99991231T235959 |        1 | NULL    | #gw1   | N        |         NULL | endpoint=gw1 | NULL        |
+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+

+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
| ruleid | groupid | prefix       | timerec                                | priority | routeid | gwlist | sort_alg | sort_profile | attrs        | description |
+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+
|    158 | 0       | 441476292509 | 20220124T000000|86399||20220128T154759 |        1 | NULL    | #gw9   | N        |         NULL | endpoint=gw9 | NULL        |
|    159 | 0       | 441476292509 | 20220128T154800|86399||99991231T235959 |        1 | NULL    | #gw1   | N        |         NULL | endpoint=gw1 | NULL        |
+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+

Cheers,
Kingsley.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20220128/9b2fda58/attachment.html>


More information about the Users mailing list