aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2024-03-28fix VLR evil twin on LU with unknown TMSINeels Hofmeyr2-0/+3
When a subscriber first attaches by TMSI only, and later tells the IMSI via ID Response, it may turn out that this IMSI already exists in the VLR database. If this happens, the TMSI that the subscriber issued was not known in the existing VLR entry, indicating that the subscriber has in the meantime camped on a different core. Which means we can assume that there cannot be any active connections, and the old subscriber can be discarded, for the benefit of the new one. (We could also discard the new one, but it is more complex to reparent the ongoing FSMs for Compl L3 than to copy some dormant VLR state.) In vlr_subscr_set_imsi(), check for an existing IMSI entry in the VLR. If such exists, copy any pending Paging and auth tuple state to the new subscriber, and discard the old one from the VLR. In order to safely discard a vlr subscriber by force, add a new vlr_ops function: subscr_inval(), to tell the MSC that a vlr_subscr is no longer valid. Upcoming patch I583682d1a35a70b008d7bb2d89ba7c3109a60b21 better clears TMSI state from the VLR, making it more likely to hit the evil twin situation this patch fixes; hence this is, sort of, preparation. Related: SYS#6860 OS#4721 Change-Id: Ifdabe0b65bffafbf7b8e5cc10e2d225d1ed1cecd
2024-02-08cosmetic: rename to sdp_audio_codecs_foreach()Neels Hofmeyr1-2/+2
Better match the pattern of sdp_audio_codecs_* instead of having foreach_ in the front. Prepare for prepending osmo_ some day, because I plan to move the SDP API to a separate library. Change-Id: Ia96190e0bdb513886663be1c8c12be3b403b71c9
2024-02-08report caller's file,line in trans_cc_filter_run()Neels Hofmeyr1-1/+2
When we get the codec filter result logged, it is most interesting to know the caller. So wrap a file-line macro around trans_cc_filter_run(). Change-Id: I243404487c1871e921b08098086ef2fc78a5561d
2024-01-24Add LLC and HLC information to MNCC interface definitonAndreas Eversberg1-1/+20
low/high layer compatibility are used for capability checking between caller and called entitiy. The information is added to the end of struct gsm_mncc increases, so that the version number needs not to be incremented. Related: OS#6152 Change-Id: I15f5afcf069ee6c1c4641108ceacc837bee311b5
2023-12-13sdp: allow more space for fmtpjolly/workNeels Hofmeyr1-1/+1
In osmo-mgw, we recently chose 256 for maximum fmtp length. Adjust to that here, too. Change-Id: Ib9b9608d8d8f7ce34596a950dbc480e8a72ebf97
2023-12-13implement re-assignment to match codecsNeels Hofmeyr1-0/+1
This is the last missing piece that allows osmo-msc to make good TFO codecs choices. Since the codec_filter, osmo-msc properly gathers codec options and limitations. But the MO call leg still assigns a voice channel before getting a response from the MT call leg, and is then stuck with that. Add the capability to adjust the MO call leg's codec in case the MT side needs a different codec for TFO. This is only relevant for 2G; on 3G we always have AMR/IuUP. For inter-MSC handover, keep the behavior unchanged: offer only the currently assigned codec to the remote side. Codec-changing HO should be equally trivial to implement, but that is for another day. msc_vlr_test_call's codec tests are adjusted to test the new feature in Ib933554f826c1b4347dfa3f6c4f6fe086be8b133. For now, avoid change in these tests by validating the first codec in SDP lists only. Related: OS#6258 Related: osmo-ttcn3-hacks I402ed0523a2a87b83f29c5577b2c828102005d53 Change-Id: I8760feaa8598047369ef8c3ab2673013bac8ac8a
2023-12-13add sdp_audio_codec_to_speech_codec_list()Neels Hofmeyr1-0/+1
Used by I8760feaa8598047369ef8c3ab2673013bac8ac8a to add just a single codec to a speech codec list, instead of a list. Change-Id: I6ac23c54bc26939e048ff2df06eb987421cfb1c5
2023-10-30vlr_sgs: fix VTY setting for SGs counter.Philipp Maier1-1/+1
When trying to modify the value of an SGs counter (eg. ns11), then the setting is never stored. The reason for this is that OsmoMSC uses the wrong string table to compare the user input. Related: OS#6008 Change-Id: I0358c1ec0026c37fda6db1f3af3145393df25cfd
2023-09-25SMS over GSUP: set source_name in GSUP reply messagesMychaela N. Falconia1-0/+1
For MO-forwardSM and MT-forwardSM request messages, OsmoHLR applies routing based on the SMSC address for MO or based on the IMSI for MT. However, reply messages following these requests are routed passively based on the destination_name IE. This passive message routing path requires the source_name IE to be set as well - implement this source_name setting. Related: OS#6135 Change-Id: I0b7f4760bdce8a38d43d3860086c6dfb7b390701
2023-09-25SMS over GSUP: correctly route GSUP responses to MT SMSMychaela N. Falconia2-1/+5
When OsmoMSC is used with OsmoHLR rather than a GSUP-to-MAP gateway, MT-forwardSM.req GSUP messages delivering MT SMS will be coming from a separate SMSC relayed via OsmoHLR, rather than from OsmoHLR itself. When we reply to these messages, in order for these replies to reach the MT-sending SMSC via OsmoHLR, we need to save source_name from the request and regurgitate it into destination_name in our response messages. Implement this logic. Related: OS#6135 Change-Id: I436e333035b8f6e27f86a49fe293ea48ea07a013
2023-09-15make two functions staticNeels Hofmeyr1-1/+0
Change-Id: I1de0f35f1606c997777f34bbf4033e069aadbc64
2023-07-21ASCI: Add VTY to configure GCR (Group Call Register)Andreas Eversberg3-0/+30
Change-Id: I5bd034a62fc8b483f550d29103c2f7587198f590 Related: OS#4854
2023-07-19ASCI: Add option to switch on or off ASCI supportAndreas Eversberg2-1/+2
Switching ASCI support is controled via VTY. This added in a later patch. (Chg-Id: I5bd034a62fc8b483f550d29103c2f7587198f590) Change-Id: Id68deb69f7395f0f8f50b3820e9d51052a34f753 Related: OS#4854
2023-07-19ASCI: Add function to receive VGCS/VBS messages from BSSAndreas Eversberg1-0/+5
A voice group/broadcast call has no SCCP connection that is related 1:1 to a calling or called subscriber. Instead there are multiple connections between MSC and BSS. Some of them control the uplink for each BSS and some of them assign the channels for each BTS. SCCP connections are maintained by the VGCS call control. Message from the RAN are directly forwarded to the VGCS call control. Change-Id: Ie4a2f19ba75140a6f2de02b709597239c01f02a2 Related: OS#4854
2023-07-17ASCI: Add call control for VGCS/VBSAndreas Eversberg4-1/+257
Change-Id: I9947403fde8212b66758104443c60aaacc8b1e7b Related: OS#4854
2023-07-17ASCI: Add callref to assignment commandAndreas Eversberg1-0/+2
The (optional) call reference is required to assign a calling subscriber to a voice group/bcast channel. The BSC can then determine to which existing VGCS/VBS channel the MS is assigned to. This IE is part of the GSM standard TS 48.008 (see ยง3.2.1.1) Change-Id: I7955c6e0eebc930f85f360dda46be17cbd39e181 Related: OS#4854
2023-07-17ASCI: Add functions to transcode VGCS/VBS messages on A-interfaceAndreas Eversberg1-0/+47
Change-Id: I6b1f088201e7ef4a58762937855a1d358973882c Related: OS#4854
2023-07-17ASCI: Add simple implementation of Group Call RegisterAndreas Eversberg3-0/+61
This is a built-in data structure to store and handle voice group calls. The GCR will be used by VGCS/VBS call control. (Chg-Id: I9947403fde8212b66758104443c60aaacc8b1e7b) The GCR will be used by VTY code. (Chg-Id: I5bd034a62fc8b483f550d29103c2f7587198f590) Change-Id: Ia74a4a865f943c5fb388cd28f9406005c92e663e Related: OS#4854
2023-07-09ASCI: Add two new transaction types for VGCS and VBSAndreas Eversberg2-0/+10
- TRANS_GCC is used for the voice group call. - TRANS_BCC for the voice broadcast call. This also includes the use counters for transaction and CM service request usage: - MSC_A_USE_GCC - MSC_A_USE_BCC - MSC_A_USE_CM_SERVICE_BCC - MSC_A_USE_CM_SERVICE_GCC Change-Id: Iddd11f813582ac2ac2bdee91cc3a525986deb514 Related: OS#4854
2023-07-09ASCI: Add transaction type to trans_find_by_callref()Andreas Eversberg1-1/+1
A transaction can be identified by the callref and the type. Because transactions with different types may share the same callref value, it is required to include the type in the trans_find_by_callref() parameters. E.g. a voice group call may have the same callref as a voice broadcast call, but they are different calls. They also may not be confused with other transaction types having eventually equal callref value, like GSM 04.08 calls, SMS or supplementary services transactions. By adding the transaction type to trans_find_by_callref(), we essentially now use the (type, callref) tuple as unique ID for transactions, instead of just callref. Change-Id: Ic0b82033a1aa3c3508ad610c690a5f29073006c1 Related: OS#4854, OS#3294
2023-07-09ASCI: Allow usage of rtp_stream with other FSMAndreas Eversberg1-3/+5
Allow the caller of rtp_stream_alloc() to define what events will be dispatched to the parent FSM. This allows other state machines to use rtp_stream. It is required for using RTP stream process with VGCS FSM. Drop the unused parent_call_leg member. Change-Id: I0991927b6d00da08dfd455980645e68281a73a9e Related: OS#4854
2023-07-09ASCI: rtp_stream_commit(): Also update MGW on conn mode changeAndreas Eversberg1-0/+2
So far rtp_stream_commit() triggers an MGCP MDCX message only when codecs or the RTP address changed. Do the same for mode changes. ('sendrecv', 'recvonly', 'sendonly',...) Change-Id: I7a5637d0a7f1df13133e522fc78ba75eeeb2873e Related: OS#4854
2023-07-09ASCI: Use a unique call-id for RTP streamsAndreas Eversberg2-1/+4
The MGCP protocol features the 'C' (call-id) to identify which connections belong to the same call. They may be used by MGW for accounting or management procedures. So far we sent the MNCC callref as call-id. Instead, add a separate unique call_id number space. Assign a unique call_id to each transaction. Change-Id: I36c5f159fa0b54fb576ff8bd279928b895554793 Related: OS#4854
2023-07-09ASCI: Add log category for VGCS/VBS call and channel FSMAndreas Eversberg1-0/+1
Change-Id: Icebc855fdc3f6ca7034ad3576b1acb5aed6bc435 Related: OS#4854
2023-07-09ASCI: Add log categories for GCC/BCC (call control)Andreas Eversberg1-0/+2
Change-Id: I4c5d002b5bb1c2ebf2fac777ab784559fc265e7c Related: OS#4854
2023-06-20Add initial CSD support with external MNCCOliver Smith5-1/+117
Implement and use CSD bearer service logic (with similar audio codec code): * csd_filter (codec_filter) * csd_bs (sdp_audio_codec) * csd_bs_list (sdp_audio_codecs) Related: OS#4394 Change-Id: Ide8b8321e0401dcbe35da2ec9cee0abca821d99a
2023-06-15msc: add trans_cc_set_remote_from_bcOliver Smith1-0/+1
Prepare to set remote CSD bearer services in a future patch. Related: OS#4394 Change-Id: I71a8ff6167e2adf3ee609883730e5f67b7539185
2023-06-15transaction: move cc.codecs.result -> cc.localOliver Smith2-9/+8
Prepare for CSD where this will be used too. Related: OS#4394 Change-Id: Iaf954be0455625faa06a64c19905b79b7045f8e4
2023-06-15transaction: move cc.codecs.remote -> cc.remoteOliver Smith2-8/+7
Move remote out of codecs, as it will be used by CSD code as well. Otherwise we would need to store it twice (in cc.codecs.remote and cc.csd.remote). Related: OS#4394 Change-Id: I5d2e078db3b3437cb6feae40d8955912d7a297e4
2023-06-15codec_filter_run: prepare for CSDOliver Smith1-0/+1
Related: OS#4394 Change-Id: I18b396193ad25a3905cc8c1853c9680dab0a2d44
2023-06-15codec_filter_set_bss: prepare for CSDOliver Smith1-0/+1
Related: OS#4394 Change-Id: I931db33820d9da81147bda84002ada0b80f11186
2023-06-15codec_filter_set_ran: prepare for CSDOliver Smith1-0/+1
Related: OS#4394 Change-Id: I467a7bd461dcac2fff93a3777d4090d6b7d3d041
2023-06-15codec_filter_init: prepare for CSDOliver Smith2-1/+1
Related: OS#4394 Change-Id: I1270b00464456abc5300fd47e6087a0ba6243d03
2023-06-15codec_filter_set_ms_from_bc: prepare for CSDOliver Smith3-1/+34
In all the places where codec_filter_ functions get called, for CSD we will need to filter the bearer services. Add a new transaction_cc.c file for functions that either combine the codec_filter_ function with logic for CSD and voice calls or just call the existing codec_filter function and a new csd_filter function. Start with moving codec_filter_set_ms_from_bc to this new file, it will be extended with a case for CSD in a future patch. Related: OS#4394 Change-Id: If225f2a299ce6bc9ae35a17d6f591d889f49155e
2023-06-14Use new mgcp_client_conf_alloc() API to alloc mgcp_client_confPau Espin Pedrol1-1/+1
Depends: osmo-mgw.git Change-Id Iba0853ed099a32cf1dde78c17e1b34343db41cfc Change-Id: I382046bba67646a7365d9290d604b97c9d886e02
2023-05-18copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbHVadim Yanitskiy5-5/+5
Change-Id: I81687235fedcbbb686db7def59318e891e00ced7
2023-03-18mncc_recvmsg(): log caller file,lineNeels Hofmeyr1-8/+11
Change-Id: I3755eb35b504f2f2580e0ba43dfa41f16087decc
2023-03-18do CN CRCX firstNeels Hofmeyr2-0/+6
In order to send the MSC's RTP endpoint IP address+port in the initial SDP, move the MGCP CRCX up to an earlier point in the sequence of establishing a voice call. Update the voice call sequence chart to show the effects. Though the semantic change is rather simple, the patch is rather huge -- things have to happen in a different order, and async waits have to happen at different times. The new codec filter helps to carry codec resolution information across the newly arranged code paths. Related: SYS#5066 Change-Id: Ie433db1ba0c46d4b97538a969233c155cefac21c
2023-03-18[codecs filter] send + receive SDP via MNCCNeels Hofmeyr1-0/+1
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
2023-03-18in ran_msg, return gsm0808_speech_codec (inter-MSC)Neels Hofmeyr2-2/+3
Get rid of enum mgcp_codecs in inter-MSC handover related code. Change-Id: I9c649f98738a55b8637ae600d5cdf81099fd08e5
2023-03-18in ran_msg, return gsm0808_speech_codec (intra-MSC)Neels Hofmeyr1-1/+2
Do not convert to enum mgcp_codecs, but directly pass the gsm0808_speech_codec IE from the A interface to codecs handling. For Iu: - RAN side: use ran_infra.force_mgw_codecs_to_ran to keep the MGW endpoint towards RAN on IUFP. - CN side: introduce flag ran_msg.assignment_complete.codec_with_iuup, so to decide whether to forward IUFP towards CN, we don't need to test the RAN type, but use the flag from the ran_msg implementation. In msc_vlr_tests, use the SDP codec string instead of enum mgcp_codecs. So far limit to intra-MSC related messaging, adjusting inter-MSC handover follows in a separate patch. Change-Id: Ia666cb697fbd140d7239089628faed93860ce671
2023-03-18rtp_stream: allow multiple codecs / use codec filter from AssignmentNeels Hofmeyr3-7/+12
Allow configuring MGW conns with multiple codecs. The new codecs filter can have multiple results, and MGCP can configure multiple codecs. Get rid of this bottleneck, that so far limits to a single codec to MGW. On Assignment Complete, set codec_filter.assignment to the assigned codec, and use that to set the resulting codec (possibly multiple codecs in the future) to create the CN side MGW endpoint. Related: SYS#5066 Change-Id: If9c67b298b30f893ec661f84c9fc622ad01b5ee5
2023-03-18add ran_infra.force_mgw_codecs_to_ranNeels Hofmeyr1-0/+5
Indicate in the ran_infra data structure whether a RAN needs specific codecs to be set up on the RAN facing MGW endpoint. This allows setting forced RAN codecs as first-class citizen in the ran_infra data structure, instead of special cases in the code (for IuUP on IuCS). Will be used in subsequent commit I37f65c36af2679ecba1040a11a9aa0eb9481d817, submitted separately for easier readability. Change-Id: I37f65c36af2679ecba1040a11a9aa0eb9481d817
2023-03-14[codecs filter] store BSS codec list from Compl L3Neels Hofmeyr1-0/+3
The initial Compl L3 happens long before we establish a CC transaction. Remember the Codec List (BSS Supported), so that we can feed the new codecs filter with it. Subsequent patches implement feeding the filter. Related: SYS#5066 Change-Id: I7cdc348218433141a43d2e42750af02591688240
2023-03-14[codecs filter] add trans.cc.codecsNeels Hofmeyr1-0/+3
Add the central codecs_filter for Call Control. The new member is not used in this patch yet, subsequent patches will start to populate the various stages of this codec filter, one by one. Related: SYS#5066 Change-Id: Ib3fdeff8d1e1ea0760168d63ee6e1b1fb993aa5f
2023-03-14[codecs filter] add codec_filter.h,cNeels Hofmeyr2-0/+67
Add the infrastructure to store and filter all codec limitiations from the different stages: MS, BSS, CN and remote call leg. Upcoming patches will properly collect these and find an optimal codec. No functional change, yet. Related: SYS#5066 Change-Id: I4d90f7ca62f2307a7b93dd164aeecbf4bd98ff0a
2023-03-14add codec_mapping.h,cNeels Hofmeyr2-0/+65
Converting between different codec representations is confusing. This codec mapping provides a consolidated overview of all our codec representations, and how they match up. In particular, it adds the SDP codec representation repertoire, preparing the use of full SDP on the MNCC interface. Related: SYS#5066 Change-Id: Iaa307be6a8487aa8d4ba7cd59d5c5ef04818a744
2022-12-23sdp_msg.c: parse send/recv modeNeels Hofmeyr1-0/+9
Related: SYS#5066 Change-Id: I529c0bfad1cab376e26173ed48db2767c7dfaa64
2022-11-21SMPP: make smpp_smsc_stop() staticMax1-1/+0
It's only used in a single file so there's no point exposing it via header. Related: OS#5568 Change-Id: I3d0d850ffe6ebf9d623c1f250d4293a3c427d5d8
2022-11-15add some comments to sdp_msg.c,hNeels Hofmeyr1-0/+1
Related: SYS#5066 Change-Id: I68aa4af5d84eaaa08a567377687b6292cce0ce94