by dcoolypen » Mon Dec 10, 2018 12:56 pm
ViciBox 8.1.2 Fresh Install
Following a fresh install of ViciBox 8.1.2 we were receiving error: "There is a time synchornization problem."
Checking Server, PHP and DB times, we found server time was not updating and ASTupdate was not showing as a detached screen.Further inspection revealed that the Perl script AST_update.pl would crash at line 470 with the following error:
"pattern match timed-out at /usr/share/astguiclient/AST_upate.pl line 470."
The code at line 470 is a "waitfor()" function that is attempting to match the response from the Asterisk server with a regex pattern but the response from the server doesn't match the regex pattern.
Here is the response from server:
Connect to localhost
Escape character is '^]'.
Asterisk Call Manager/2.10.4
And, here is the regex pattern:
'/[0123]\n$/'
In order for the pattern above to work, the last line in the server response would have to end in 0, 1, 2 or 3, so we changed the code at line 470 and also at 534 as follows:
Original: $t-waitfor('/[0123]\n$/]);
Replacement: $t-waitfor('/Asterisk Call Manager.+\n$/');
This appears to have resolved the problem. Server time is now updating and ASTupdate is running as a detached screen.