siptrace: check if a request is set to avoid local transaction crash
authoriionita <ionut-razvan.ionita@1and1.ro>
Thu, 7 Mar 2019 09:47:52 +0000 (11:47 +0200)
committerHenning Westerholt <henningw@users.noreply.github.com>
Tue, 9 Apr 2019 19:25:53 +0000 (21:25 +0200)
src/modules/siptrace/siptrace.c

index 242c4ab..ae1f53d 100644 (file)
@@ -1690,6 +1690,17 @@ static void trace_dialog_transaction(struct dlg_cell* dlg, int type, struct dlg_
        memset(&info, 0, sizeof(siptrace_info_t));
        info.correlation_id = dlgb.get_dlg_var(dlg, &siptrace_info_dlgkey);
 
+       /**
+        * DUAL BYE - internally generated BYE from kamailio
+        * set flag to signal request_in callback which will register
+        * transaction callbacks to catch caller and callee BYEs and their
+        * responses
+        */
+       if (params->req == NULL && params->rpl == NULL) {
+               LM_DBG("dual bye!\n");
+               return;
+       }
+
        trace_transaction(params->req, &info, 0);
 
        sip_trace(params->req, NULL, info.correlation_id, NULL);