When a call is assigned the disposition NO ANSWER, cdr_pgsql wants to insert an empty string ‘’ into the column $answer, which has the type. ‘timestamp with time zone’. This fails like so:
pgsql_log: Reason: ERROR: invalid input syntax for type timestamp with time zone: LINE 1: ...nkedid","sequence") VALUES ('2016-06-23 13:01:37','','2016-0...
HARD ERROR! Attempted reconnection failed. DROPPING CALL RECORD!
Setting a default value for the answer column doesn’t work because the value is not null but an empty string.
I wonder if there’s a solution short of adding a BEFORE INSERT trigger to the database and sanitize to get cdr_pgsql to insert clean records into the database; after all what it is doing just doesn’t work in pgsql?
Asterisk 1.8 did handle this properly by inserting a ‘1970-01-01 09:00:00+09’-like timestamp instead of ‘’ (I’m porting a configuration from 1.8 to 13.1 right now) – perhaps it’s a regression? After reading through the documentation, I didn’t find anything that concerns itself with this. Calls with a disposition of ANSWERED get a proper timestamp value and insert cleanly.