Time Conditions appears to be "off"

Hello!

Following a recent update, my time conditions stopped working properly.

Between 8:57 and 17:33, Monday thru Friday, the call should be sent to a ring group.
Outside of the that range, the calls are supposed to be sent to an announcement.

Presently, it is 1:38 AM and the calls are being sent to the ring group.
At approximately 1PM tomorrow, the calls will stop going to the ring group and customers will hear the announcement.

I have been unable to fix this problem. It feels like a timezone bug, but timezone are set properly and the system as well as the gui of freepbx are showing me the right time.

I’ve tried recreating a new time condition, but got the same results. I tried rebooting, which did not fix it.

Any suggestions are welcome!

What version is your time conditions module? There was a bug in a previous version with the logic of the check that would make the validation fail.

Hi,

Time Conditions
14.0.2.15 Stable

Sangoma Technologies CorporationGPLv3+Enabled

Also, weirdly, since the last update, it appears I’m fully up to date both on the modules and the system. Normally, it takes a few days and there’s already something that needs updating. My 100% updated status is suspicious!

Thanks

That is indeed the latest version. I’m using that version also and I don’t seem to have that issue.

What is the output of this command?

[asterisk@freepbx ~]$ /var/lib/asterisk/bin/schedtc.php --debug
Time Now:13:06|Thu|20|Dec|America/Argentina/Cordoba

==Working with TimeCondition:TIMECONDITIONHORARIOCOMERCIAL==
INVERTED BLF: false (NOT_INUSE = NOT_INUSE & INUSE = INUSE)
OVERRIDE MODE: not set
=>09:00-20:00|mon-fri|| is now
TIME MATCHED: True (NOT_INUSE)
BLF MODE: True (NOT_INUSE)
Privilege: Command
Changing TC1 to NOT_INUSE

Hello!

here are the results:

[root@freepbxV5 ~]# /var/lib/asterisk/bin/schedtc.php --debug
Time Now:18:21|Thu|20|Dec|America/Toronto

==Working with TimeCondition:Entrance==
INVERTED BLF: false (NOT_INUSE = NOT_INUSE & INUSE = INUSE)
OVERRIDE MODE: not set
=>08:57-17:33|mon-fri|||America/Toronto is not now
TIME MATCHED: False (INUSE)
BLF MODE: False (INUSE)
Privilege: Command
Changing TC1 to INUSE

That output is correct.

The output is correct, at least at the time that you executed it. Try running it again at the time that is failing, so you can see if it is matching that time correctly or not.

1 Like

Will do! Thanks!

Hello; I’ve run the command again:

==Working with TimeCondition:Entrance==
INVERTED BLF: false (NOT_INUSE = NOT_INUSE & INUSE = INUSE)
OVERRIDE MODE: True (NOT_INUSE)
=>08:57-17:33|mon-fri|||America/Toronto is not now
TIME MATCHED: False (INUSE)
BLF MODE: Overridden to True (NOT_INUSE)
Privilege: Command
Changing TC1 to NOT_INUSE

Currently, I would expect the call to go to an announcement, as we are outside of business hours. Instead, the phone call comes to my extension – I cannot confirm that the ring group is actually being used; don’t know how to follow a call. Wish I did though!

What I do know, is the location /var/log/asterisk… and I found this in freepbx.log

[2018-Dec-26 02:10:44] [WARNING] (timeconditions/functions.inc.php:871) - Depreciated Function timeconditions_get detected in /var/www/html/admin/modules/timeconditions/views/timeconditions/advanced_form.php on line 11
[2018-Dec-26 02:10:44] [WARNING] (timeconditions/functions.inc.php:871) - Depreciated Function timeconditions_timegroups_list_groups detected in /var/www/html/admin/modules/timeconditions/functions.inc.php on line 558
[2018-Dec-26 02:10:44] [WARNING] (callback/functions.inc.php:173) - Depreciated Function callback_list detected in /var/www/html/admin/modules/callback/functions.inc.php on line 9
[2018-Dec-26 02:10:44] [WARNING] (core/functions.inc.php:6188) - Depreciated Function core_users_list detected in /var/www/html/admin/modules/core/functions.inc.php on line 893
[2018-Dec-26 02:10:44] [WARNING] (core/functions.inc.php:6188) - Depreciated Function core_did_list detected in /var/www/html/admin/modules/core/functions.inc.php on line 940
[2018-Dec-26 02:10:44] [WARNING] (ringgroups/functions.inc.php:483) - Depreciated Function ringgroups_list detected in /var/www/html/admin/modules/ringgroups/functions.inc.php on line 10
[2018-Dec-26 02:11:01] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 67
[2018-Dec-26 02:11:01] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 67
[2018-Dec-26 02:11:01] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 76
[2018-Dec-26 02:11:01] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 76
[2018-Dec-26 02:12:01] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 67
[2018-Dec-26 02:12:01] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 67
[2018-Dec-26 02:12:01] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 76
[2018-Dec-26 02:12:01] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 76
[2018-Dec-26 02:12:24] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 67
[2018-Dec-26 02:12:24] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 76
[2018-Dec-26 02:12:28] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 67
[2018-Dec-26 02:12:28] [WARNING] (libraries/modulefunctions.legacy.php:7) - Depreciated Function module_getinfo detected in /var/www/html/admin/modules/cxpanel/functions.inc.php on line 76
[2018-Dec-26 02:12:28] [WARNING] (timeconditions/functions.inc.php:871) - Depreciated Function timeconditions_timegroups_get_group detected in /var/www/html/admin/modules/timeconditions/views/timegroups/form.php on line 7


Also thought >full.log would be helpful, but there is quite a bit of data. I can share the log file if needed.

Fail2ban.log has a lot of those:
[2018-12-26 02:24:41] SECURITY[3120] res_security_log.c: SecurityEvent=“SuccessfulAuth”,EventTV=“2018-12-26T02:24:41.136-0500”,Severity=“Informational”,Service=“AMI”,EventVersion=“1”,AccountID=“admin”,SessionID=“0x7f6eb4004850”,LocalAddress=“IPV4/TCP/0.0.0.0/5038”,RemoteAddress=“IPV4/TCP/127.0.0.1/43318”,UsingPassword=“0”,SessionTV=“2018-12-26T02:24:41.136-0500”

The “depreciated function” are bothering me quite a bit. A google search was not helpful. Perhaps you guys have a suggestion!

Thanks for the help! Happy Holidays!

Frank

Ignore the deprecated parts. It’s irrelevant. Why? The developers wrote it to remind them to remove the references to those commands. This is quite common

Your output does not include the “time now” part so anyone trying to help you would be wasting their time. Please include all output from the debug flag next time

From your output, it seems that OVERRIDE mode is on:

OVERRIDE MODE: True (NOT_INUSE)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.