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
This commit is contained in:
parent
5112c45d22
commit
be4a208809
|
@ -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);
|
enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts);
|
||||||
uint8_t ts_subslots(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);
|
bool ts_is_tch(struct gsm_bts_trx_ts *ts);
|
||||||
|
const char *gsm_trx_unit_id(struct gsm_bts_trx *trx);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -851,3 +851,12 @@ bool ts_is_tch(struct gsm_bts_trx_ts *ts)
|
||||||
{
|
{
|
||||||
return pchan_is_tch(ts_pchan(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;
|
||||||
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "btsconfig.h" /* for PACKAGE_VERSION */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <netdb.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) {
|
if (dch->c.msg_type == RSL_MT_IPAC_CRCX) {
|
||||||
|
char cname[32];
|
||||||
char *ipstr = NULL;
|
char *ipstr = NULL;
|
||||||
if (lchan->abis_ip.rtp_socket) {
|
if (lchan->abis_ip.rtp_socket) {
|
||||||
LOGP(DRSL, LOGL_ERROR, "%s Rx RSL IPAC CRCX, "
|
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,
|
return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL,
|
||||||
inc_ip_port, dch->c.msg_type);
|
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 */
|
/* FIXME: multiplex connection, BSC proxy */
|
||||||
} else {
|
} else {
|
||||||
/* MDCX */
|
/* MDCX */
|
||||||
|
|
Loading…
Reference in New Issue