/* collect all crd data and write it to a syslog */ static int write_cdr( struct dlg_cell* dialog, struct sip_msg* message) { int ret = 0; if( !dialog || !message) { LM_ERR( "dialog or message is empty!"); return -1; } ret = log_write_cdr(dialog, message); #ifdef SQL_ACC ret |= db_write_cdr(dialog, message); #endif return ret; }
/* collect all crd data and write it to a syslog */ static int write_cdr( struct dlg_cell* dialog, struct sip_msg* message) { int ret = 0; if( !dialog) { LM_ERR( "dialog is empty!"); return -1; } /* message can be null when logging expired dialogs */ if ( !cdr_expired_dlg_enable && !message ){ LM_ERR( "message is empty!"); return -1; } ret = log_write_cdr(dialog, message); #ifdef SQL_ACC ret |= db_write_cdr(dialog, message); #endif return ret; }