aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/mgw_endpoint_fsm.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-03-07 16:50:34 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-19 13:57:20 +0000
commit0d9a1a7583842203cbbd60517a2c4d63247db954 (patch)
tree637c0265b1a0d41cc90643d8332df983ff61e9b7 /src/osmo-bsc/mgw_endpoint_fsm.c
parent69b04a29be7def809f480dc5cabe89f67196ad1c (diff)
AMR: Signal usage of octet-aligned or bandwith-efficient mode to MSC
MGCP/SDP provides fmtp parameters in order to signal which of the two available AMR framing modes (octet-aligned or bandwith-efficient) should be used on the link between BSS and core network. osmo-bsc currently does not set up this mode which means that the RTP packets from the BTS are forwared without inspection/modification, which may lead to malfunction when a BTS is using a framing mode that is not supported by the other end. - Add VTY option to setup the framing mode - Generate related fmtp parameters in SDP Depends: osmo-mgw I622c01874b25f5049d4f59eb8157e0ea3cbe16ba Change-Id: If6d40b2407b87aad2227ea7f15533ef01a3771b3 Related OS#3807
Diffstat (limited to 'src/osmo-bsc/mgw_endpoint_fsm.c')
-rw-r--r--src/osmo-bsc/mgw_endpoint_fsm.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/osmo-bsc/mgw_endpoint_fsm.c b/src/osmo-bsc/mgw_endpoint_fsm.c
index fc49886c3..5462914fb 100644
--- a/src/osmo-bsc/mgw_endpoint_fsm.c
+++ b/src/osmo-bsc/mgw_endpoint_fsm.c
@@ -34,6 +34,7 @@
#include <osmocom/bsc/mgw_endpoint_fsm.h>
#include <osmocom/bsc/lchan_fsm.h>
#include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/bsc_msc_data.h>
#define LOG_CI(ci, level, fmt, args...) do { \
if (!ci || !ci->mgwep) \
@@ -774,4 +775,22 @@ void mgcp_pick_codec(struct mgcp_conn_peer *verb_info, const struct gsm_lchan *l
verb_info->ptmap[0].pt = custom_pt;
verb_info->ptmap_len = 1;
}
+
+ /* AMR requires additional parameters to be set up (framing mode) */
+ if (verb_info->codecs[0] == CODEC_AMR_8000_1) {
+ verb_info->param_present = true;
+ verb_info->param.amr_octet_aligned_present = true;
+ }
+
+ if (bss_side && verb_info->codecs[0] == CODEC_AMR_8000_1) {
+ /* FIXME: At the moment all BTSs we support are using the
+ * octet-aligned payload format. However, in the future
+ * we may support BTSs that are using bandwith-efficient
+ * format. In this case we will have to add functionality
+ * that distinguishes by the BTS model which mode to use. */
+ verb_info->param.amr_octet_aligned = true;
+ }
+ else if (!bss_side && verb_info->codecs[0] == CODEC_AMR_8000_1) {
+ verb_info->param.amr_octet_aligned = lchan->conn->sccp.msc->amr_octet_aligned;
+ }
}