<div dir="ltr"><p><b>Hi everyone,</b></p><p>I'm currently running OpenSIPS <b>3.6.9</b> (installed from the official Debian repository) and I've run into an issue with the <code>fraud_detection</code> module regarding time and day-of-the-week evaluation when multiple rules are defined for the same prefix.</p><p><b>Scenario:</b>
I have multiple rules configured for prefix <code>004</code> under <code>profileid = 1</code>:</p><ol start="1"><li><p><code>07:00</code> to <code>20:59</code>, <code>Mon-Fri</code></p></li><li><p><code>00:00</code> to <code>06:59</code>, <code>Mon-Fri</code></p></li><li><p><code>21:00</code> to <code>23:59</code>, <code>Mon-Fri</code></p></li><li><p><code>00:00</code> to <code>23:59</code>, <code>Sat,Sun</code></p></li></ol><p><b>The Problem:</b>
Even when testing on a Sunday (e.g., at 15:30), OpenSIPS evaluates and matches the first rule in the sequence (the one configured for <code>Mon-Fri</code>), completely ignoring the <code>daysoftheweek</code> and time interval constraints.</p><p>If I reorder or change the <code>ruleid</code> so that a <code>Mon-Fri</code> rule comes first, it triggers immediately regardless of the current system day and time. The system time and timezone on the server are correct, and <code>fraud_reload</code> executes successfully.</p><p>It seems that in version 3.6.9, the parser or internal evaluation for time intervals (<code>start_hour</code>/<code>end_hour</code>) and days (<code>daysoftheweek</code>) fails to correctly filter subsequent rules, falling back to the first loaded rule for the prefix.</p><p>Has anyone else experienced this behavior in 3.6.9, or is there any known patch/workaround for this?</p><p>Thanks in advance for your help,</p><p><b>Àlex Bueno</b></p></div>