diff options
-rw-r--r-- | include/osmo-bts/gsm_data_shared.h | 1 | ||||
-rw-r--r-- | src/common/gsm_data_shared.c | 9 | ||||
-rw-r--r-- | src/common/rsl.c | 9 |
3 files changed, 19 insertions, 0 deletions
diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h index 4c0fe5c1..a05e4caf 100644 --- a/include/osmo-bts/gsm_data_shared.h +++ b/include/osmo-bts/gsm_data_shared.h @@ -1002,5 +1002,6 @@ struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr, 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 c2d196bc..f4fda55f 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -851,3 +851,12 @@ bool ts_is_tch(struct gsm_bts_trx_ts *ts) { 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 461b21d1..60f964e5 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 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg) } 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 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg) 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 */ |