I’ve got a UC 40 running PBXact 188.8.131.52. I’ve also purchased the Call Recordings module. When I select the year, it’s OK. Selecting the month is usually OK but when selecting the day I frequently get the following error message as a popup in the upper right corner of my browser.
DateTime::__construct(): Failed to parse time string (1970-01-01 30:50) at position 11 (3): Unexpected character
Sometimes the wave files will be listed but more frequently it responds with “no matching records.”
quite possibly your hardware clock is brocken and you don’t have a n effective software clock, maybe replace your cr2032 battery
When I use the date command from the command line I get the correct date and time.
from your post,
30 minutes and 50 seconds previous, something thought the date to be in ‘epoch time’ you will have to identify from your logs (they all have timestamps) what process is awry.
That’s where I started, looking for files with that date and I couldn’t find any. As an experiment, I created an empty month/day and no problem. Then I copied all of the wav files from my problem date into that empty month/day and sure enough the error reappeared. I suspect what it’s having a problem with is the timestamp that is part of the file name. I’ll have to copy them over a little at a time to see which file is causing it to puke.
It looks like the file that was causing the problem is as follows:
Once I deleted that file, no more error.
The next file I found causing a problem was:
The “x” are replacing the actual phone number to obfuscate the original phone numbers.
Methinks that is a problem with the module you are using, the file names are perfectly legit.
Is the ‘unix-time’ / uniqueid the rest as obvious
The third file I found is out-1877xxxxxxx-2203-2017069-160654-1497049613.29045.wav
Not really seeing a pattern here between these three files.
Again, you will have to go back to the “module” you are using that is complaining
A recording was made on an outbound call to 1877xxxxxxx from extension 2203, on the 9th of June 2017 at six minutes and 54 seconds past 2 oclock in the afternoon, the “uniqueid” of the file as seen by Asterisk is “1497049613.29045” and it was committed to a “wav” file
The uniqueid is actually the “unix-time”, (the seconds since midnight on 1970 at the Greenwich meridian (ok , now called Universal time) but the nano seconds truncated to 5 digit precision.
Try it from bash
Your first two exmaple match but your third has only a non zero padded month “2017069” instead of “20170609” , it all points to the module you are using, please check to make sure it is up to date.
I think @dicko has identified the issue. This looks to be a bug in the Call Recording Reports module. Can you open a support ticket under FreePBX, Commercial Modules so we can investigate in situ.
And of course for the “fixers” notice that wherever “1970-01-01 30:50” comes from does not neatly fit in “earth time” although I would happily take those extra hours.
Since this is on a UC 40 I’ve opened a ticket with Sangoma. I’ll let you know what they figure out.
BTW, because this is PBXact, it doesn’t give me Modules Admin so I can’t easily look at the version of the module or update it. Is there a way from the Asterisk CLI that I can find the module version?