diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-14 21:09:08 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-15 20:06:45 +0100 |
commit | 8cc59036e6eaeaa9332081487e4a68ad2a8bdc44 (patch) | |
tree | 782919713ac137d54dbf879d64cf077c53fee0ac | |
parent | ecd94a4b45924c3c65feabc87bbc7a075e951249 (diff) |
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.
-rw-r--r-- | openbsc/include/openbsc/gsm_data.h | 1 | ||||
-rw-r--r-- | openbsc/src/abis_rsl.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 890ccac01..613125739 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -732,6 +732,7 @@ struct gsm_network { /* 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 047c76808..5b708aaa6 100644 --- a/openbsc/src/abis_rsl.c +++ b/openbsc/src/abis_rsl.c @@ -1505,6 +1505,12 @@ static u_int8_t ipa_smod_s_for_lchan(struct gsm_lchan *lchan) 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) { |