v_xml_cdr_json.start_stamp is always null so the old records in this table were not being purged. Changed to v_xml_cdr_json.insert_date since this field is populated
- updated tables that were not deleting
- updated user log table IF statement variable name
- changed section comments to echo so it is easier to know what is being deleted if running manually. includes number of days
A couple of variables were not being called correctly (missing '$')
A couple of database connection strings were not consistent with the other connection strings
Comment out command that purges the v_call_recordings table, as was turned into a view in FusionPBX 5.0.7+. So, call recording data should now be managed only in the v_xml_cdr table instead.