[MERGED] osmo-bts[master]: Put useful information in RTCP SDES.

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
Sun Dec 3 22:12:21 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: Put useful information in RTCP SDES.
......................................................................


Put useful information in RTCP SDES.

The RTCP Sender Description is supposed to contain useful information
to identify the source of the RTP stream.  So far, it only contained
compile-time default data of libortp.  Let's put the BTS UnitID, the
lchan number and the OsmoBTS version in there.

This change requires libosmo-abis Change-Id Ice794f9e0c6caeea1c67520c12efbfa375d1fb82

Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac
Related: OS#2701
---
M include/osmo-bts/gsm_data_shared.h
M src/common/gsm_data_shared.c
M src/common/rsl.c
3 files changed, 19 insertions(+), 0 deletions(-)

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



diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h
index 4c0fe5c..a05e4ca 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -1002,5 +1002,6 @@
 enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts);
 uint8_t ts_subslots(struct gsm_bts_trx_ts *ts);
 bool ts_is_tch(struct gsm_bts_trx_ts *ts);
+const char *gsm_trx_unit_id(struct gsm_bts_trx *trx);
 
 #endif
diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c
index c2d196b..f4fda55 100644
--- a/src/common/gsm_data_shared.c
+++ b/src/common/gsm_data_shared.c
@@ -851,3 +851,12 @@
 {
 	return pchan_is_tch(ts_pchan(ts));
 }
+
+const char *gsm_trx_unit_id(struct gsm_bts_trx *trx)
+{
+	static char buf[23];
+
+	snprintf(buf, sizeof(buf), "%u/%u/%u", trx->bts->ip_access.site_id,
+		trx->bts->ip_access.bts_id, trx->nr);
+	return buf;
+}
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 461b21d..60f964e 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -20,6 +20,8 @@
  *
  */
 
+#include "btsconfig.h"	/* for PACKAGE_VERSION */
+
 #include <stdio.h>
 #include <errno.h>
 #include <netdb.h>
@@ -1668,6 +1670,7 @@
 	}
 
 	if (dch->c.msg_type == RSL_MT_IPAC_CRCX) {
+		char cname[32];
 		char *ipstr = NULL;
 		if (lchan->abis_ip.rtp_socket) {
 			LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC CRCX, "
@@ -1736,6 +1739,12 @@
 			return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL,
 						 inc_ip_port, dch->c.msg_type);
 		}
+		/* Ensure RTCP SDES contains some useful information */
+		snprintf(cname, sizeof(cname), "bts@%s", ipstr);
+		osmo_rtp_set_source_desc(lchan->abis_ip.rtp_socket, cname,
+					 gsm_lchan_name(lchan), NULL, NULL,
+					 gsm_trx_unit_id(lchan->ts->trx),
+					 "OsmoBTS-" PACKAGE_VERSION, NULL);
 		/* FIXME: multiplex connection, BSC proxy */
 	} else {
 		/* MDCX */

-- 
To view, visit https://gerrit.osmocom.org/5147
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list