aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/gsm_04_08_cc.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-08-07 13:00:14 +0200
committerHarald Welte <laforge@gnumonks.org>2018-08-07 16:51:30 +0000
commit8ad3dacebb2ec1c160c2cc3b0ec0a8eaec4332f0 (patch)
treeae024def16eb5b6ccf50bf8cb96a967abfdd81b5 /src/libmsc/gsm_04_08_cc.c
parent6cc377d359a938e59dc517a99d0e182315cdf669 (diff)
mgcp: use codec information returned with ASSIGNMENT COMPL.
When the assignment completes a choosen codec is returned. At the moment we do not use this information. - add struct members for codec info (both, RAN and CN) - parse codec info in BSSMAP ASSIGNMENT COMPLETE - use codec info on mgcp Since the MNCC API is not complete yet, we currently only use the codec info only on the internal MNCC yet. Change-Id: I9d5b1cd016d9a058b22a367d0e5e9f2ef447931a Related: OS#2728
Diffstat (limited to 'src/libmsc/gsm_04_08_cc.c')
-rw-r--r--src/libmsc/gsm_04_08_cc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 8becd0553..2c17e22f5 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -319,6 +319,15 @@ static int tch_bridge(struct gsm_network *net, struct gsm_mncc_bridge *bridge)
/* Which subscriber do we want to track trans1 or trans2? */
log_set_context(LOG_CTX_VLR_SUBSCR, trans1->vsub);
+ /* This call briding mechanism is only used with the internal MNCC.
+ * functionality (with external MNCC briding would be done by the PBX)
+ * This means we may just copy the codec info we have for the RAN side
+ * of the first leg to the CN side of both legs. This also means that
+ * if both legs use different codecs the MGW must perform transcoding
+ * on the second leg. */
+ trans1->conn->rtp.codec_cn = trans1->conn->rtp.codec_ran;
+ trans2->conn->rtp.codec_cn = trans1->conn->rtp.codec_ran;
+
/* Bridge RTP streams */
rc = msc_mgcp_call_complete(trans1, trans2->conn->rtp.local_port_cn,
trans2->conn->rtp.local_addr_cn);
@@ -1716,6 +1725,16 @@ static int tch_rtp_connect(struct gsm_network *net, void *arg)
struct gsm_mncc_rtp *rtp = arg;
struct in_addr addr;
+ /* FIXME: in *rtp we should get the codec information of the remote
+ * leg. We will have to populate trans->conn->rtp.codec_cn with a
+ * meaningful value based on this information but unfortunately we
+ * can't do that yet because the mncc API can not signal dynamic
+ * payload types yet. This must be fixed first. Also there may be
+ * additional members necessary in trans->conn->rtp because we
+ * somehow need to deal with dynamic payload types that do not
+ * comply to 3gpp's assumptions of payload type numbers on the A
+ * interface. See also related tickets: OS#3399 and OS1683 */
+
/* Find callref */
trans = trans_find_by_callref(net, rtp->callref);
if (!trans) {