Browse code

Merge 1a9c0c930c009e09853c9e5b0f64a9651352bffd into f7965fc52f0c9b65b78004ee68b9a9b5e6222a98

Ivan Aponte authored on 13/10/2021 06:07:38 • GitHub committed on 13/10/2021 06:07:38
Showing 1 changed files
... ...
@@ -1319,13 +1319,21 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param)
1319 1319
 
1320 1320
 			dlg = dlg_lookup(h_entry, h_id);
1321 1321
 			if (dlg==0) {
1322
+
1323
+				char *callid_s = "(no-call-id)";
1324
+				int callid_len = 12; 
1325
+				if (req->callid != 0) {
1326
+					callid_s = req->callid->body.s; 
1327
+					callid_len = req->callid->body.len;
1328
+				}
1329
+
1322 1330
 				LM_WARN("unable to find dialog for %.*s "
1323 1331
 					"with route param '%.*s' [%u:%u] "
1324 1332
 					"and call-id '%.*s'\n",
1325 1333
 					req->first_line.u.request.method.len,
1326 1334
 					req->first_line.u.request.method.s,
1327 1335
 					val.len,val.s, h_entry, h_id,
1328
-					req->callid->body.len, req->callid->body.s);
1336
+					callid_len, callid_s);
1329 1337
 				if (seq_match_mode==SEQ_MATCH_STRICT_ID )
1330 1338
 					return;
1331 1339
 			} else {