core: debug message with details of callid and cseq when a sip message is received
authorDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 28 Sep 2016 07:57:50 +0000 (09:57 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 28 Sep 2016 07:57:50 +0000 (09:57 +0200)
receive.c

index 8ddf3e9..fc938e5 100644 (file)
--- 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);