You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Even with time recurrence not matching the rule is accepted
To Reproduce
Add a rule in dialplan with time recurrence 20210104T080000||8H|WEEKLY|||MO,TU,WE,TH,FR
Set the date to 07:30
use dp_translate to test
Expected behavior
Rule should not be accepted
Relevant System Logs
Aug 30 07:35:15 ip-172-31-22-36 /usr/sbin/opensips[972]: DBG:dialplan:translate: Timerec exists for rule checking: 20210104T080000||8H|WEEKLY|||MO,TU,WE,TH,FR
Aug 30 07:35:15 ip-172-31-22-36 /usr/sbin/opensips[972]: DBG:dialplan:test_match: test_match:[0]
Aug 30 07:35:15 ip-172-31-22-36 /usr/sbin/opensips[972]: DBG:dialplan:translate: Regex operator testing. Got result: 0
Aug 30 07:35:15 ip-172-31-22-36 /usr/sbin/opensips[972]: DBG:dialplan:translate: Found a matching rule 0x7f06ca87a9e0: pr 1, match_exp
Aug 30 07:35:15 ip-172-31-22-36 /usr/sbin/opensips[972]: DBG:dialplan:translate: the rule's attrs are 1
Aug 30 07:35:15 ip-172-31-22-36 /usr/sbin/opensips[972]: DBG:dialplan:translate: the copied attributes are: 1
Same test with check_time_rec and the same expression at the same time using a REGISTER in the script
Aug 30 07:34:59 ip-172-31-22-36 /usr/sbin/opensips[976]: DBG:core:_tmrec_expr_check_str: checking: 20210104T080000||8H|WEEKLY|||MO,TU,WE,TH,FR
Aug 30 07:34:59 ip-172-31-22-36 /usr/sbin/opensips[976]: DBG:core:_tmrec_check_str: checking: '20210104T080000||8H|WEEKLY|||MO,TU,WE,TH,FR'
Aug 30 07:34:59 ip-172-31-22-36 /usr/sbin/opensips[976]: Time Recurrence Not Matched Mon Aug 30 07:34:59 2021
OS/environment information
Operating System: Debian 10
OpenSIPS installation: Debian Packages
The text was updated successfully, but these errors were encountered:
The tmrec_expr_check() function actually returns 1/-1 on success/failure
and not 1/0, as expected by the calling modules.
Many thanks to Flavio Goncalves for the report!
Fixes#2616
(cherry picked from commit 3056a37)
Hi, @flaviogoncalves and thanks for the report! This should now be fixed on 3.2 and master -- the fix is to be included in tonight's build of the nightly package repository.
OpenSIPS version you are running
Describe the bug
Even with time recurrence not matching the rule is accepted
To Reproduce
Add a rule in dialplan with time recurrence 20210104T080000||8H|WEEKLY|||MO,TU,WE,TH,FR
Set the date to 07:30
use dp_translate to test
Expected behavior
Rule should not be accepted
Relevant System Logs
OS/environment information
The text was updated successfully, but these errors were encountered: