rsl: Allow to hardcode the RTP Payload
In case of a inflexible network it is better to hardcode
the rtp payload to a given type. E.g. when using AMR5.9 on
a TCH/F and TCH/H having the same payload is helpful. For
now this will be only used by the osmo-bsc.
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 890ccac..6131257 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -732,6 +732,7 @@
/* MSC data in case we are a true BSC */
struct osmo_msc_data *msc_data;
+ int hardcoded_rtp_payload;
};
#define SMS_HDR_SIZE 128
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index 047c768..5b708aa 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -1505,6 +1505,12 @@
static u_int8_t ipa_rtp_pt_for_lchan(struct gsm_lchan *lchan)
{
+ struct gsm_network *net = lchan->ts->trx->bts->network;
+
+ /* allow to hardcode the rtp payload */
+ if (net->hardcoded_rtp_payload != 0)
+ return net->hardcoded_rtp_payload;
+
switch (lchan->tch_mode) {
case GSM48_CMODE_SPEECH_V1:
switch (lchan->type) {