[sr-dev] git:master:004b9d53: core: debug message with details of callid and cseq when a sip message is received

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 28 09:58:31 CEST 2016


Module: kamailio
Branch: master
Commit: 004b9d5350c62764e1da60ed6062b39e6fbc9434
URL: https://github.com/kamailio/kamailio/commit/004b9d5350c62764e1da60ed6062b39e6fbc9434

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-09-28T09:57:50+02:00

core: debug message with details of callid and cseq when a sip message is received

---

Modified: receive.c

---

Diff:  https://github.com/kamailio/kamailio/commit/004b9d5350c62764e1da60ed6062b39e6fbc9434.diff
Patch: https://github.com/kamailio/kamailio/commit/004b9d5350c62764e1da60ed6062b39e6fbc9434.patch

---

diff --git a/receive.c b/receive.c
index 8ddf3e9..fc938e5 100644
--- a/receive.c
+++ b/receive.c
@@ -178,10 +178,15 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
 				ip_addr2a(&msg->rcv.src_ip), (int)msg->rcv.src_port,
 				(int)msg->rcv.proto);
 			sr_core_ert_run(msg, SR_CORE_ERT_RECEIVE_PARSE_ERROR);
-		}		
+		}
 		else if(ret == NONSIP_MSG_DROP) goto error02;
 	}
-	LM_DBG("After parse_msg...\n");
+	LM_DBG("--- received sip message - %s - call-id: [%.*s] - cseq: [%.*s]\n",
+			(msg->first_line.type==SIP_REQUEST)?"request":"reply",
+			(msg->callid && msg->callid->body.s)?msg->callid->body.len:0,
+			(msg->callid && msg->callid->body.s)?msg->callid->body.s:"",
+			(msg->cseq && msg->cseq->body.s)?msg->cseq->body.len:0,
+			(msg->cseq && msg->cseq->body.s)?msg->cseq->body.s:"");
 
 	/* set log prefix */
 	log_prefix_set(msg);




More information about the sr-dev mailing list