Change in osmo-sip-connector[master]: Logging: Add debug logging for status/causes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Sep 4 11:42:24 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10729 )

Change subject: Logging: Add debug logging for status/causes
......................................................................

Logging: Add debug logging for status/causes

Adds some DEBUG level logging for SIP status and MNCC causes.

Change-Id: Ib56e34ba079c7927e932c1b29d3e8341b8099ae0
---
M src/mncc.c
M src/sip.c
2 files changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/mncc.c b/src/mncc.c
index ae60321..4cdc0b3 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -264,7 +264,7 @@
 	case MNCC_CC_PROCEEDING:
 	case MNCC_CC_CONNECTED:
 		LOGP(DMNCC, LOGL_DEBUG,
-			"Releasing call in non-initial leg(%u)\n", leg->callref);
+			"Releasing call in non-initial leg(%u) cause(%d)\n", leg->callref, leg->base.cause);
 		leg->base.in_release = true;
 		start_cmd_timer(leg, MNCC_REL_IND);
 		mncc_send(leg->conn, MNCC_DISC_REQ, leg->callref);
@@ -508,6 +508,8 @@
 		return;
 
 	LOGP(DMNCC,
+		LOGL_DEBUG, "Rcvd MNCC_DISC_IND, Cause: %d\n", data->cause.value);
+	LOGP(DMNCC,
 		LOGL_DEBUG, "leg(%u) was disconnected. Releasing\n", data->callref);
 	leg->base.in_release = true;
 	start_cmd_timer(leg, MNCC_REL_CNF);
@@ -529,6 +531,8 @@
 	if (!leg)
 		return;
 
+	LOGP(DMNCC, LOGL_DEBUG, "Rcvd MNCC_REL_IND, Cause: %d\n", data->cause.value);
+
 	if (leg->base.in_release)
 		stop_cmd_timer(leg, MNCC_REL_IND);
 	else {
@@ -587,7 +591,7 @@
 		other_leg->cause = data->cause.value;
 		other_leg->release_call(other_leg);
 	}
-	LOGP(DMNCC, LOGL_DEBUG, "leg(%u) was rejected.\n", data->callref);
+	LOGP(DMNCC, LOGL_DEBUG, "leg(%u) was rejected with cause(%d).\n", data->callref, leg->cause);
 	mncc_leg_release(leg);
 }
 
diff --git a/src/sip.c b/src/sip.c
index 088dbc3..c9f5abb 100644
--- a/src/sip.c
+++ b/src/sip.c
@@ -239,12 +239,13 @@
 		else if (status >= 300) {
 			struct call_leg *other = call_leg_other(&leg->base);
 
-			LOGP(DSIP, LOGL_ERROR, "leg(%p) unknown err, releasing.\n", leg);
+			LOGP(DSIP, LOGL_ERROR, "leg(%p) unknown SIP status(%d), releasing.\n", leg, status);
 			nua_cancel(leg->nua_handle, TAG_END());
 			nua_handle_destroy(leg->nua_handle);
 			call_leg_release(&leg->base);
 
 			if (other) {
+				LOGP(DSIP, LOGL_DEBUG, "Releasing other leg (%p) with status(%d)\n", other, status);
 				other->cause = status2cause(status);
 				other->release_call(other);
 			}
@@ -326,6 +327,7 @@
 	 * to help us here.
 	 */
 
+	LOGP(DSIP, LOGL_DEBUG, "%s(): Release with MNCC cause(%d)\n", __func__, _leg->cause);
 	cause2status(_leg->cause, &sip_cause, &sip_phrase, &reason_text);
 	snprintf(reason, sizeof reason, "Q.850;cause=%u;text=\"%s\"", _leg->cause, reason_text);
 

-- 
To view, visit https://gerrit.osmocom.org/10729
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib56e34ba079c7927e932c1b29d3e8341b8099ae0
Gerrit-Change-Number: 10729
Gerrit-PatchSet: 5
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Keith Whyte <keith at rhizomatica.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180904/c873ff1d/attachment.htm>


More information about the gerrit-log mailing list