Osmocom Mobile Switching Centre
Go to file
Neels Hofmeyr 21f1bfb4a8 add codec_mapping_next() and codec_mapping_foreach()
So far, querying the codec mapping returns one match.
For example:

 const struct codec_mapping *m;
 m = codec_mapping_by_speech_ver(GSM48_BCAP_SV_FR);
 if (!m)
         return -ENOENT;

But when supporting various AMR rates, we need to find multiple matches
in some code paths.

Also to support AMR OA vs BE modes, we need to combine multiple criteria
in some places.

With this patch, and as soon as an upcoming patch implements
codec_mapping_matches_speech_ver(), above code example becomes:

 const struct codec_mapping *m;
 codec_mapping_foreach (m) {
         if (codec_mapping_matches_speech_ver(m, GSM48_BCAP_SV_FR))
	         break;
 }
 if (!m)
         return -ENOENT;

This pattern supports collecting multiple matches in a list:

 const struct codec_mapping *m;
 codec_mapping_foreach (m) {
         if (codec_mapping_matches_speech_ver(m, GSM48_BCAP_SV_FR))
	         sdp_audio_codecs_add_copy(my_list, m);
 }

And this pattern also supports combining criteria:

 const struct codec_mapping *m;
 codec_mapping_foreach (m) {
	 // only allow AMR in OA mode
 	 if (!osmo_sdp_fmtp_amr_is_octet_aligned(m->sdp.fmtp))
	         continue;
         if (codec_mapping_matches_speech_ver(m, GSM48_BCAP_SV_AMR_F)
	     || codec_mapping_matches_speech_ver(m, GSM48_BCAP_SV_AMR_H))
	         sdp_audio_codecs_add_copy(my_list, m);
 }

Change-Id: Iaaa59d4bf5a6126a1bfe4ae282b82f6cb3ec6f99
2024-02-25 03:43:12 +01:00
contrib Bump version: 1.10.0.125-92caa-dirty → 1.11.0 2023-09-12 16:46:12 +02:00
debian Bump version: 1.11.0.7-dbe88 → 1.11.1 2023-09-28 13:53:08 +02:00
doc tweak example osmo-msc.cfg: 001 01 2024-02-08 23:42:17 +01:00
include add codec_mapping_next() and codec_mapping_foreach() 2024-02-25 03:43:12 +01:00
m4 Drop unneeded ax_check_compile_flag.m4 2022-01-11 18:11:41 +01:00
src add codec_mapping_next() and codec_mapping_foreach() 2024-02-25 03:43:12 +01:00
tests msc_vlr_test_call: validate_sdp: validate PT nr too 2024-02-25 03:43:12 +01:00
.gitignore Ignore .deb build byproducts 2022-08-01 13:53:37 +00:00
.gitreview update .gitreview to new repo url 2017-08-08 17:26:28 +02:00
.mailmap add .mailmap file for mapping git author name/mail in shortlog 2016-08-08 17:40:28 +00:00
AUTHORS move openbsc/* to repos root 2017-07-12 23:17:10 +00:00
COPYING move openbsc/* to repos root 2017-07-12 23:17:10 +00:00
Makefile.am build: include README.md into the release tarball 2024-01-26 23:36:01 +07:00
README.md Convert + Expand README file 2022-06-18 13:34:24 +02:00
README.vty-tests update git URLs (git -> https; gitea) 2022-06-18 12:27:10 +02:00
TODO-RELEASE SDP/MGCP: pass octet-align=1 for AMR / pass all fmtp 2024-02-09 05:17:39 +01:00
configure.ac Bump version: 1.10.0.125-92caa-dirty → 1.11.0 2023-09-12 16:46:12 +02:00
git-version-gen git-version-gen: Don't check for .git directory 2018-07-24 18:05:46 +02:00
osmoappdesc.py osmoappdesc.py, tests: switch to python 3 2019-12-12 09:29:19 +00:00

README.md

osmo-msc - Osmocom MSC Implementation

This repository contains a C-language implementation of a GSM Mobile Switching Centre (MSC) for 2G (GSM) and 3G (UMTS). It is part of the Osmocom Open Source Mobile Communications project.

OsmoMSC exposes

  • A over IP towards BSCs (e.g. OsmoBSC): 3GPP AoIP or SCCPlite
  • IuCS over IP towards RNCs / HNBGW (e.g. osmo-hnbgw)
  • The Osmocom typical telnet VTY and CTRL interfaces.
  • The Osmocom typical statsd exporter.

OsmoMSC implements

  • mobility management
  • call control (either via built-in MNCC handler or external osmo-sip-connector)
  • USSD (exposed via GSUP)
  • SMS (either via built-in SMSC or external via GSUP)

Homepage

You can find the OsmoMSC issue tracker and wiki online at https://osmocom.org/projects/osmomsc and https://osmocom.org/projects/osmomsc/wiki.

GIT Repository

You can clone from the official osmo-msc.git repository using

    git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-msc

There is a web interface at https://gitea.osmocom.org/cellular-infrastructure/osmo-msc

Documentation

User Manuals and VTY reference manuals are [optionally] built in PDF form as part of the build process.

Pre-rendered PDF version of the current "master" can be found at User Manual as well as the VTY Reference Manual

Mailing List

Discussions related to osmo-msc are happening on the openbsc@lists.osmocom.org mailing list, please see https://lists.osmocom.org/mailman/listinfo/openbsc for subscription options and the list archive.

Please observe the Osmocom Mailing List Rules when posting.

Contributing

Our coding standards are described at https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards

We us a gerrit based patch submission/review process for managing contributions. Please see https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for more details

The current patch queue for osmo-msc can be seen at https://gerrit.osmocom.org/#/q/project:osmo-msc+status:open

History

OsmoMSC originated from the OsmoNITB project, which started as a minimalistic all-in-one implementation of the GSM Network. In 2017, OsmoNITB had reached maturity and diversity (including M3UA SIGTRAN and 3G support in the form of IuCS and IuPS interfaces) that naturally lead to a separation of the all-in-one approach to fully independent separate programs as in typical GSM networks.

OsmoMSC was one of the parts split off from the old openbsc.git.