From cc0ac0074da0be1709472eb9207bc10dad046af1 Mon Sep 17 00:00:00 2001 From: Ovidiu Sas Date: Tue, 31 Oct 2023 13:18:20 -0400 Subject: [PATCH] core: enhace error log for unexpected replies --- forward.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/forward.c b/forward.c index 7288aca0804..7a87d714c1e 100644 --- a/forward.c +++ b/forward.c @@ -509,7 +509,11 @@ int forward_reply(struct sip_msg* msg) || (msg->via2==0) || (msg->via2->error!=PARSE_OK)) { /* no second via => error */ - LM_ERR("no 2nd via found in reply\n"); + LM_ERR("no 2nd via found in [%.*s] [%.*s] reply from [%s] for callid [%.*s]\n", + msg->first_line.u.reply.status.len, msg->first_line.u.reply.status.s, + msg->cseq->body.len, msg->cseq->body.s, + ip_addr2a(&msg->rcv.src_ip), + msg->callid->body.len, msg->callid->body.s); goto error; }