refactor cdr_alert