[PATCH] sms/dtap: Add log messages to analyse SMS message loss

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/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Thu Jan 30 20:01:12 UTC 2014


Incoming DTAP messages from MS are discarded during silent calls,
which leads to the repeated delivery of SMS since the ACKs are not
being processed.

This patch adds some log messages that have been helpful to track
this down.

Sponsored-by: On-Waves ehf
---
 openbsc/src/libmsc/gsm_04_08.c   |    1 +
 openbsc/src/libmsc/osmo_msc.c    |    4 ++++
 openbsc/src/libmsc/silent_call.c |    5 +++++
 3 files changed, 10 insertions(+)

diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index bc4a9c3..cd2a0b5 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -3303,6 +3303,7 @@ int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg)
 	uint8_t pdisc = gh->proto_discr & 0x0f;
 	int rc = 0;
 
+	LOGP(DRLL, LOGL_DEBUG, "Dispatching 04.08 message, pdisc=%d\n", pdisc);
 	if (silent_call_reroute(conn, msg))
 		return silent_call_rx(conn, msg);
 	
diff --git a/openbsc/src/libmsc/osmo_msc.c b/openbsc/src/libmsc/osmo_msc.c
index 31b72b9..f3badb7 100644
--- a/openbsc/src/libmsc/osmo_msc.c
+++ b/openbsc/src/libmsc/osmo_msc.c
@@ -59,6 +59,8 @@ static int msc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg
 		return BSC_API_CONN_POL_ACCEPT;
 	if (trans_has_conn(conn))
 		return BSC_API_CONN_POL_ACCEPT;
+
+	LOGP(DRR, LOGL_INFO, "MSC Complete L3: Rejecting connection.\n");
 	return BSC_API_CONN_POL_REJECT;
 }
 
@@ -71,11 +73,13 @@ static void msc_assign_compl(struct gsm_subscriber_connection *conn,
 			     uint8_t rr_cause, uint8_t chosen_channel,
 			     uint8_t encr_alg_id, uint8_t speec)
 {
+	LOGP(DRR, LOGL_DEBUG, "MSC assign complete (do nothing).\n");
 }
 
 static void msc_assign_fail(struct gsm_subscriber_connection *conn,
 			    uint8_t cause, uint8_t *rr_cause)
 {
+	LOGP(DRR, LOGL_DEBUG, "MSC assign failure (do nothing).\n");
 }
 
 static void msc_classmark_chg(struct gsm_subscriber_connection *conn,
diff --git a/openbsc/src/libmsc/silent_call.c b/openbsc/src/libmsc/silent_call.c
index cdc82b5..4462dfc 100644
--- a/openbsc/src/libmsc/silent_call.c
+++ b/openbsc/src/libmsc/silent_call.c
@@ -76,6 +76,7 @@ static int paging_cb_silent(unsigned int hooknum, unsigned int event,
 int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg)
 {
 	/* FIXME: do something like sending it through a UDP port */
+	LOGP(DLSMS, LOGL_NOTICE, "Discarding L3 message from a silent call.\n");
 	return 0;
 }
 
@@ -109,6 +110,7 @@ int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg
 	}
 
 	/* otherwise, reroute */
+	LOGP(DLSMS, LOGL_INFO, "Rerouting L3 message from a silent call.\n");
 	return 1;
 }
 
@@ -136,6 +138,9 @@ int gsm_silent_call_stop(struct gsm_subscriber *subscr)
 	if (!conn->silent_call)
 		return -EINVAL;
 
+	DEBUGPC(DLSMS, "Stopping silent call using Timeslot %u on ARFCN %u\n",
+		conn->lchan->ts->nr, conn->lchan->ts->trx->arfcn);
+
 	conn->silent_call = 0;
 	msc_release_connection(conn);
 
-- 
1.7.9.5





More information about the OpenBSC mailing list