aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/msc_a.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-01-13 20:06:53 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2023-03-18 03:05:34 +0100
commit8dd1646f0b87c49c28b1d7ac023fb0522d1fb942 (patch)
treed71ab49dc7a311b8c5b5ce87365b612a2d8e64c8 /src/libmsc/msc_a.c
parent006b0ee50a8454c61815394323dd997f8e91f28d (diff)
[codecs filter] send + receive SDP via MNCC
Transmit and receive full SDP information via MNCC, to accurately pass codecs choices between the call legs. In msc_vlr_test_call.c test_call_mt(), show that when receiving MNCC, the codec information in SDP overrules the Bearer Cap codec information -- we expect to still receive inaccurate Bearer Cap from e.g. osmo-sip-connector, because we have chosen to add SDP to MNCC instead of trying to fix the codecs represented in Bearer Cap. For internal MNCC, the MT call leg now knows which codec the MO has chosen and assigned. For external MNCC, osmo-sip-connector receives SDP about our codecs choices and sends it in SIP messages, and we also receive the full SDP information from the remote SIP leg. Update the SDP in codec_filter every time it is received, to always have the latest SDP information from the remote leg. CC MNCC | ---ALERTING--> | add local side SDP to MNCC msg | <--ALERTING--- | store remote side SDP | <--SETUP-RESP- | store remote side SDP | --SETUP-CNF--> | add local side SDP to MNCC msg | -RTP-CREATE--> | use codec_filter, add local side SDP to MNCC msg | <-RTP-CONNECT- | store remote side SDP There still is one problem: when initiating MNCC, we do not yet know the RTP address and port to be used for the CN side, because the CN CRCX happens later. So far we send 0.0.0.0:0 as RTP endpoint in the SDP, until the CN CRCX is done. A subsequent patch moves CN CRCX to an earlier time, adding proper RTP information right from the start. Related: SYS#5066 Change-Id: Ie0668c0e079ec69da1532b52d00621efe114fc2c
Diffstat (limited to 'src/libmsc/msc_a.c')
-rw-r--r--src/libmsc/msc_a.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index f1e365fd3..387532d43 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -708,6 +708,9 @@ static void msc_a_fsm_communicating(struct osmo_fsm_inst *fi, uint32_t event, vo
msc_a_call_leg_ran_local_addr_available(msc_a);
return;
case RTP_TO_CN:
+ /* The rtp_stream has gotten the new RTP address and port from the MGW. Also update the codecs
+ * filter result to convey this RTP address and port towards the remote call leg. */
+ codec_filter_set_local_rtp(&msc_a->cc.active_trans->cc.codecs, &rtps->local);
msc_a_call_leg_cn_local_addr_available(msc_a, rtps->for_trans);
return;
default: