Apparently during the install of Asternic CDR reports a trigger was set that was pointing to a table that never got properly created. After I dropped the triggered from the asteriskcdrdb logging could start again.
Here is the trigger:
MariaDB [asteriskcdrdb]> show triggers; +--------------+--------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------------+----------------------+----------------------+--------------------+ | Trigger | Event | Table | Statement | Timing | Created | sql_mode | Definer | character_set_client | collation_connection | Database Collation | +--------------+--------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------------+----------------------+----------------------+--------------------+ | simp_channel | INSERT | cdr | BEGIN SET @orichn = ''; SET @dstchn = ''; SELECT SUBSTRING(NEW.channel,1,LENGTH(NEW.channel)-LOCATE("-",REVERSE(NEW.channel))) INTO @orichn; SELECT SUBSTRING(NEW.dstchannel,1,LENGTH(NEW.dstchannel)-LOCATE("-",REVERSE(NEW.dstchannel))) INTO @dstchn; IF @dstchan LIKE 'Local/FM%' THEN SELECT CONCAT('SIP/',SPLIT_STR(REPLACE(REPLACE(dstchannel,'#','-'),'@','-'),'-',2)) INTO @dstchn; INSERT INTO acdrunichan VALUES (NEW.uniqueid,@orichn,@dstchn); ELSE INSERT INTO acdrunichan VALUES (NEW.uniqueid,@orichn,@dstchn); END IF; END | AFTER | NULL | | root@localhost | utf8 | utf8_general_ci | utf8mb4_unicode_ci | +--------------+--------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+---------+----------+----------------+----------------------+----------------------+--------------------+ 1 row in set (0.01 sec)Deleted it with:
DROP Trigger if exists asteriskcdrdb.simp_channel;