<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>Hi,</div><div><br></div><div>I'm getting nowhere with timerec things with do_routing(). This is with OpenSIPS 3.1.7.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>None of these worked:</div><div><br></div><pre>+--------+---------+--------------+---------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | sort_alg | sort_profile | attrs | description |</pre><pre>+--------+---------+--------------+---------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| 173 | 0 | 441476292509 | 20220124T000000|404999 | 1 | NULL | #gw9 | N | NULL | endpoint=gw9 | NULL |</pre><pre>| 174 | 0 | 441476292509 | 20220128T163000|504096247 | 1 | NULL | #gw1 | N | NULL | endpoint=gw1 | NULL |</pre><pre>+--------+---------+--------------+---------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre><br></pre><pre>+--------+---------+--------------+-----------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | sort_alg | sort_profile | attrs | description |</pre><pre>+--------+---------+--------------+-----------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| 164 | 0 | 441476292509 | 20220124T000000|||20220128T154959 | 1 | NULL | #gw9 | N | NULL | endpoint=gw9 | NULL |</pre><pre>| 165 | 0 | 441476292509 | 20220128T155000|||99991231T235959 | 1 | NULL | #gw1 | N | NULL | endpoint=gw1 | NULL |</pre><pre>+--------+---------+--------------+-----------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre><br></pre><pre>+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | sort_alg | sort_profile | attrs | description |</pre><pre>+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| 161 | 0 | 441476292509 | 20220124T000000|0||20220128T154859 | 1 | NULL | #gw9 | N | NULL | endpoint=gw9 | NULL |</pre><pre>| 162 | 0 | 441476292509 | 20220128T154900|0||99991231T235959 | 1 | NULL | #gw1 | N | NULL | endpoint=gw1 | NULL |</pre><pre>+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre><br></pre><pre>+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | sort_alg | sort_profile | attrs | description |</pre><pre>+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| 152 | 0 | 441476292509 | 20220124T000000|1||20220128T154559 | 1 | NULL | #gw9 | N | NULL | endpoint=gw9 | NULL |</pre><pre>| 153 | 0 | 441476292509 | 20220128T154600|1||99991231T235959 | 1 | NULL | #gw1 | N | NULL | endpoint=gw1 | NULL |</pre><pre>+--------+---------+--------------+------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre><br></pre><pre>+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | sort_alg | sort_profile | attrs | description |</pre><pre>+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| 155 | 0 | 441476292509 | 20220124T000000|86400||20220128T154659 | 1 | NULL | #gw9 | N | NULL | endpoint=gw9 | NULL |</pre><pre>| 156 | 0 | 441476292509 | 20220128T154700|86400||99991231T235959 | 1 | NULL | #gw1 | N | NULL | endpoint=gw1 | NULL |</pre><pre>+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre><br></pre><pre>+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | sort_alg | sort_profile | attrs | description |</pre><pre>+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><pre>| 158 | 0 | 441476292509 | 20220124T000000|86399||20220128T154759 | 1 | NULL | #gw9 | N | NULL | endpoint=gw9 | NULL |</pre><pre>| 159 | 0 | 441476292509 | 20220128T154800|86399||99991231T235959 | 1 | NULL | #gw1 | N | NULL | endpoint=gw1 | NULL |</pre><pre>+--------+---------+--------------+----------------------------------------+----------+---------+--------+----------+--------------+--------------+-------------+</pre><div><br></div><div>Cheers,</div><div>Kingsley.</div></body></html>