siptrace: avoid flooding logs with unnecessary errors on common scenarios
authoriionita <ionut-razvan.ionita@1and1.ro>
Thu, 23 May 2019 08:27:41 +0000 (11:27 +0300)
committerHenning Westerholt <henningw@users.noreply.github.com>
Tue, 28 May 2019 19:56:25 +0000 (21:56 +0200)
src/modules/siptrace/siptrace.c

index 9575361..8fa832a 100644 (file)
@@ -1814,13 +1814,18 @@ static void trace_dialog(struct dlg_cell* dlg, int type, struct dlg_cb_params *p
        }
 
        if (!(params->req->msg_flags & FL_SIPTRACE)) {
-               LM_ERR("Trace is off for this request...\n");
+               LM_DBG("Trace is off for this request...\n");
                return;
        }
 
        xavp = xavp_get(&xavp_trace_info_name_s, NULL);
        if (!xavp) {
-               LM_ERR("%.*s xavp not registered\n", xavp_trace_info_name_s.len,
+               /* this actually happens when only the transaction is traced
+                * FL_SIPTRACE is set from trace_onreq_out
+                * but xavp is set only for dialogs so this will avoid
+                * registering dialog callbacks which is the desired behavior */
+               LM_DBG("%.*s xavp not registered! "
+                               "Probably incoming E2E CANCEL!\n", xavp_trace_info_name_s.len,
                                xavp_trace_info_name_s.s);
                return;
        }