From 4161fdd7ad1f4273f9e02eb0093dde502f248157 Mon Sep 17 00:00:00 2001 From: jaybeepee Date: Tue, 29 Mar 2016 15:52:34 +0200 Subject: [PATCH] modules/ims_dialog: extra error condition logging --- modules/ims_dialog/dlg_handlers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ims_dialog/dlg_handlers.c b/modules/ims_dialog/dlg_handlers.c index e8b2c0474fe..b4b55921104 100644 --- a/modules/ims_dialog/dlg_handlers.c +++ b/modules/ims_dialog/dlg_handlers.c @@ -187,7 +187,10 @@ int populate_leg_info(struct dlg_cell *dlg, struct sip_msg *msg, /* extract the contact address */ if (!msg->contact && (parse_headers(msg, HDR_CONTACT_F, 0) < 0 || !msg->contact)) { - LM_ERR("bad sip message or missing Contact hdr\n"); + if (msg->first_line.type == SIP_REQUEST) + LM_ERR("bad sip message or missing Contact hdr for message [%.*s]\n", msg->first_line.u.request.method.len, msg->first_line.u.request.method.s); + else + LM_ERR("bad sip message or missing Contact hdr for message [%.*s]\n", msg->first_line.u.reply.status.len, msg->first_line.u.reply.status.s); goto error0; } if (parse_contact(msg->contact) < 0 ||