Commit Graph

7138 Commits

Author SHA1 Message Date
Neels Hofmeyr b2ce74829a add codec_mapping.h,c
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
2023-03-14 22:41:52 +00:00
Pau Espin c43b01e918 mncc_sock: Call osmo_fd_unregister() before closing and changing bfd->fd
Change-Id: I90f840da4cc26c1d970c3f5d18d3185678a1dba9
2023-03-14 11:44:40 +01:00
Vadim Yanitskiy fe90aff554 tests: use -no-install libtool flag to avoid ./lt-* scripts
This option should be used for any executables which are used only
for testing, or for generating other files and are consequently never
installed.  By specifying this option, we are telling Libtool that
the executable it links will only ever be executed from where it is
built in the build tree.  Libtool is usually able to considerably
speed up the link process for such executables.

Also take a chance to add the missing $(COVERAGE_LDFLAGS).

Change-Id: I664a9d5abed2777deee302f9d3afd1bbfde7a844
2023-03-11 04:54:09 +07:00
Vadim Yanitskiy 1866cd93aa src/Makefile.am: remove unneeded AM_LDFLAGS with LIBS
Change-Id: I7895f037925e0e29f52e01636a0ba157cc324e5d
2023-03-11 04:48:19 +07:00
Neels Hofmeyr c5572acb73 add voice_call_internal_mncc.msc
Same as voice_call_external_mncc.msc, but run with internal MNCC. Shows
some curious differences like the MNCC_LCHAN_MODIFY that internal MNCC
sends, but external doesn't.

Change-Id: Ic003322dc4e3fce24a8413688cfe18198a4dc08a
2023-03-09 01:56:33 +01:00
Neels Hofmeyr ec9a022dcf update doc/sequence_charts/voice_call_external_mncc.msc
Re-run the msc_log_to_ladder.py on an actual 2G-2G voice call log, to
see if anything changed in the meantime, to prepare for upcoming changes
to the sequencing of establishing voice calls.

Also shows recent improvements on picking up RTP ports from MGCP and
MNCC.

Change-Id: I9dcf980ad24d5921c291c9aada211b37f6f3db7f
2023-03-09 01:56:33 +01:00
Neels Hofmeyr e4febd2697 charts: Rename voice_call_full.msc to voice_call_external_mncc.msc
Because I will soon add an _internal_mncc one as well.

Change-Id: Ic90a93d749ea936a632a45e615007a58104eeedd
2023-03-09 01:56:33 +01:00
Neels Hofmeyr 075ca60b06 msc_log_to_ladder.py: various tweaks
(multiple changes in one patch because who cares about this script)

tweak regexes -- they worked ok, but some of the '[^:]' should really be
'[^:)]', and they also look happier that way.

don't skip RAN=NONE, so we also see messages before Complete Layer 3.

s/sip/mncc, to generally be valid for both internal and external MNCC.

pick up RTP port information from MGCP OK

pick up RTP port information from MNCC rx and tx

add --verbose flag, to be able to check whether the regex rules are
still working (getting any hits).

fix rule_imsi_detach: should return True to be counted in --verbose.

tweak comment 'Generated by...' to include the full git path.

Change-Id: If619182ba76c6b238a1fa105a3c3449d7f473dd1
2023-03-09 01:56:33 +01:00
Neels Hofmeyr 58f408839c tweak MNCC logging, add RTP info
Omit "in state FOO", because LOG_TRANS() already logs the state.

Most MNCC "rx" logging was duplicated. Log "rx" only once.

If there is RTP information passed with the MNCC message, log it:
- if there is SDP, log the SDP information.
- if there is no SDP, log the legacy MNCC RTP fields, if any.

One motivation to do this is to get RTP information in ladder diagrams
generated by msc_log_to_ladder.py without the need to add udtrace MNCC
logging to osmo-msc; and also to get RTP info for internal MNCC, where
udtrace doesn't apply, because no unix domain socket is involved in
internal MNCC operation.

Change-Id: I4b916cb482ed441b508c6295de211a21c49cd5c1
2023-03-09 01:49:14 +01:00
Neels Hofmeyr c259be4ebe make: doc/sequence_charts: use wildcards for EXTRA_DIST and CLEANFILES
Both EXTRA_DIST and CLEANFILES had missing entries. It is easy to
forget to keep them up to date. Rather use wildcards to always pick up
all relevant files.

(Not adding *.dot because there are no .dot charts here, yet.)

Change-Id: I3a18e4608a310169d7c9cd9c1b8ac9015a990920
2023-03-09 00:28:08 +01:00
Neels Hofmeyr a818153967 IuCS: remove IuUP LOOPBACK hack
Since osmo-mgw now supports IuUP properly, and since we indicate IUFP in
the MGCP CRCX towars an IuCS RAN [1], we should no longer place the MGW
endpoint in loopback mode to hack up an IuUP Initialization.

This hack should have been removed along with [1].

[1] IUFP sent to MGW since this commit:
commit 3a02d29804
Refs: 1.8.0-13-g3a02d2980
Announce IuFP audio codec for UTRAN conns in CRCX towards MGW
I7aca671e00ed27ac03f0d106b5a6b665a9bed4c1

Change-Id: I6446c64421e3e13e2b829293d031c98b99cd39a7
2023-03-04 03:58:30 +01:00
Neels Hofmeyr ede9083946 comment: clarify L3 Info processing
Related: SYS#5066
Change-Id: Ia9180eeb88b31a2cf7dea72b43affd0c7b239ccb
2023-03-04 03:58:30 +01:00
Neels Hofmeyr 8ff00e775c sdp_msg.c: fix missing rate in sdp_audio_codecs_add()
When a new entry is is added by sdp_audio_codecs_add(), also add the
proper rate.

Change-Id: I17ad8862f662975e2df72a332eb83df7fb048cad
2023-03-04 03:57:02 +01:00
arehbein ed606b4271 Transition to use of 'telnet_init_default'
Related: OS#5809
Change-Id: Icc57c68337d55c6594c1c36e9bf41624d11dab0a
2023-02-25 17:48:58 +01:00
Pau Espin 964ce6f46c Bump version: 1.9.0.58-1289-dirty → 1.10.0
Change-Id: Ifff00a3107447da911629948e9f3061c93b6ac86
2023-02-07 17:28:17 +01:00
Vadim Yanitskiy 1289c7b1bc fix msc_vty_go_parent(): add missing case for MGW_NODE
A new VTY node was added in commit [1], but bsc_vty_go_parent() was
not updated.  Because of that, commands following the MGW node may
crash osmo-msc.  See related patch [2] for more details.

Change-Id: I2422fa9152ecc8c4be1f2487ee016c3fe737e653
Fixes: [1] b44cf2d575
Related: [2] osmo-bsc.git Id3050ff7e2402c33ee76c7bf0cc83603c0cc6dfc
2023-02-05 04:21:31 +07:00
Vadim Yanitskiy 603e1fc925 msc_main: fix wrong comment: HLR is a separate project
Change-Id: I68806e2b44239a5d30126938d065500078c123e2
2023-02-05 04:13:52 +07:00
Keith Whyte 404fb1b60e LCLS: Fix Global Call Reference generation
According to 3gpp spec the Call Reference part of GCR is 5 octets,
3 octets Call ID followed by 2 octets BSS ID.

We are using our internal call reference (4 octets) and the
location area code, or optionally Cell ID as BSS ID
(2 octets). Obviously it does not fit.

Let's use only 3 octets from the call reference, dropping the MSB.

Includes code by Vadim Yanitskiy <vyanitskiy@sysmocom.de>

Change-Id: I9c33a89c819e8925d89ca833d7705ed5ced6b566
2023-02-01 03:08:37 +01:00
Max 7d28d23469 SMPP: use proper type for boolean variables
Related: OS#5568
Change-Id: I033a2c863213a44f99827ef997f541a7a77f5d8a
2023-01-17 09:15:54 +00:00
Neels Hofmeyr 91c9c2f7aa rtp_stream: set_remote_addr: do nothing when unchanged
Change-Id: I15181d84f3eb8a4ab9077cf12fcb138d51733102
2023-01-03 00:31:38 +01:00
Neels Hofmeyr a899dea9aa rtp_stream_commit: check missing MGW ep only when ready for RTP
Change-Id: I24a81a926b97c9f0fb31df782d1cf931eaff9db1
2023-01-03 00:31:38 +01:00
Neels Hofmeyr 5b1f9a2d0c fix sdp_msg_to_sdp_str(), never add fmtp for unset codec
Change-Id: I1892efd9360585f98419ebbd0df180f7f3a8160d
2023-01-03 00:31:38 +01:00
Neels Hofmeyr 01431080a3 sdp_msg.c: parse send/recv mode
Related: SYS#5066
Change-Id: I529c0bfad1cab376e26173ed48db2767c7dfaa64
2022-12-23 14:54:26 +00:00
Max 038e3d6426 ctrl: take both address and port from vty config
Change-Id: I31e971270a6658366651b29c99ec5247656c62c6
2022-12-17 20:50:14 +03:00
Vadim Yanitskiy 8284fb053d libmsc: check return value of gsm0808_create_ass2()
Change-Id: I6fd1669f2919034599d99336cf56f25a97afdf7c
2022-12-14 04:47:58 +07:00
Max 634591e85b SMPP: make smpp_smsc_stop() static
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-21 16:31:05 +03:00
Neels Hofmeyr 40d3497877 add some comments to sdp_msg.c,h
Related: SYS#5066
Change-Id: I68aa4af5d84eaaa08a567377687b6292cce0ce94
2022-11-15 12:53:07 +00:00
Neels Hofmeyr 2d116822f3 add sdp_audio_codec_is_set
Change-Id: I078efe5b42367ad1089c53f11f7eb6f3a9dd9443
2022-11-15 12:53:07 +00:00
Neels Hofmeyr e29ee5a4e2 log CC timeouts
Change-Id: I857b4b15ebf75cf253697e96d358128620923221
2022-11-15 12:53:07 +00:00
Neels Hofmeyr 6d9b485f6a sdp_msg: when NULL, do not crash but return empty SDP str
Change-Id: Ibd5c43fae61cd006d8fb42a06b99a609356f7037
2022-11-15 12:53:07 +00:00
Oliver Smith f5a0c4b662 contrib/jenkins.sh: use enable-werror with IU too
Now that the warnings in osmo-iuh have been fixed, we should be able to
build the IU version of OsmoMSC with --enable-werror too.

Related: OS#4462
Change-Id: Id54be9dd1aa66cc27eb5ee4010be9e495865b331
2022-11-15 12:57:24 +01:00
Max 2c6c74ea5c SMPP: fix possible NULL pointer dereference
Related: OS#5568
Change-Id: I875eb5249004d3a960aee46c5099592d18fcaa76
2022-10-28 17:24:49 +00:00
Neels Hofmeyr 1cb18a2dc8 vlr: implement fallback to no-auth
When the HLR fails to return auth info and authentication and ciphering
are configured to be optional, fall back to no-auth.

This patch concludes a series of preparatory patches and implements the
actual functional change.

Related: OS#4830
Change-Id: I5feda196fa481dd8a46b0e4721c64b7c6600f0d1
2022-10-27 23:59:38 +02:00
Neels Hofmeyr 66d4ab8a61 vlr_auth_fsm: add result no_auth_info_event
Add third outcome of auth_fsm: the no_auth_info_event, which should be
dispatched when auth failed because the HLR has no auth info for this
subscriber, i.e. not because an actual auth challenge failed.

No functional change: Handling no_auth_info_event separately follows in
another patch (to allow fallback to no-auth). Feed the same
_E_AUTH_FAILURE as no_auth_info_event to still behave unchanged.

Related: OS#4830
Change-Id: I5103b1f2727f1729a5517ae359df813d50436ed3
2022-10-27 23:59:38 +02:00
Neels Hofmeyr 3189f39a4e vlr: auth_fsm: rename AUTH_RES to AUTH_SUCCESS
Previous patch added the AUTH_FAILURE event, which means that the
AUTH_RES event now only signals success. Reflect that in the name.

No functional change.

Related: OS#4830
Change-Id: I7124a3591fcf36cee06d7488eeb94f9b85af5dc2
2022-10-27 23:59:38 +02:00
Neels Hofmeyr 923b664215 vlr: auth_fsm: clarify success/failure result
Explicitly send distinct parent events on auth success and failure. So
far determining success depended only on the data pointer passed on with
the event. Distinct events clarify the logging and the FSM code.

This prepares for a third FSM outcome to be added in a subsequent patch,
to separately signal when the HLR has no auth data.

No functional change.

Related: OS#4830
Change-Id: I02776dfe6785983f2ebe398f57867f5ceb288ba0
2022-10-27 23:59:38 +02:00
Neels Hofmeyr c48afa1416 vlr_lu_fsm: clarify naming of static functions
These functions actually return whether these procedures should be
attempted, not whether they are absolutely required. Rename to avoid
confusion in upcoming patches.

Related: OS#4830
Change-Id: I0ea90476470109134411255ffd1f11d88236c91b
2022-10-27 23:59:17 +02:00
Neels Hofmeyr 2ea7264b86 msc_a,vlr: add is_ciphering_required (accurately named)
For establishing Layer 3, pass a flag from msc_a to VLR that indicates
to fail if encryption is not possible.

An earlier patch [1] renamed a previously existing flag
require_ciphering to is_ciphering_to_be_attempted, because the naming
was not accurate. This new flag now indicates what its name suggests.

This new flag is needed for upcoming patch [2] to distinguish between
optional and mandatory encryption.

[1] Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
[2] I5feda196fa481dd8a46b0e4721c64b7c6600f0d1

Related: OS#4830
Change-Id: I52090c5f5db997030da7c2ed9beca9c51f55f4cf
2022-10-27 23:54:00 +02:00
Neels Hofmeyr d99a607ac9 msc_a,vlr: rename ciphering_required to is_ciphering_to_be_attempted
Clarify the name to avoid confusion in upcoming patches.

This function actually returns whether any ciphering mode besides A5/0
is enabled, and does not imply that ciphering is mandatory. A5/0 may
well be allowed when this function returns true.

Related: OS#4830
Change-Id: Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
2022-10-27 23:30:30 +02:00
Max bb624162ea SMPP: use default port from libsmpp34
Related: OS#5568
Requires: libsmpp34.git I2fcc15ac60b7b6501c9cb1afd0fe6d66d4b76f5f
Change-Id: I2140ed57e64f17fb79130014eaf88f58b62d7a00
2022-10-20 20:10:39 +03:00
Pau Espin 68d2a671c6 doc: Include mgwpool.adoc from osmo-gsm-manuals
This way we document the recently gained support for MGW pooling.

Related: SYS#5987
Depends: osmo-gsm-manuals.git Change-Id Ieda0d4bfe6fc90da6e19c791d8ec2da89427ba3b
Change-Id: I9d8116a74a63591599c4cbafa60f9a313e6ab19c
2022-10-20 16:24:34 +02:00
Pau Espin 093fd2e2b7 call_leg: Fix EV_MGW_ENDPOINT_GONE not processed in RELEASE state
Since call_leg_fsm_releasing_onenter() calls immediatelly
osmo_fsm_inst_term(), it meant we couldn't receive any event in that
state because osmo_fsm disables event dispatching to FSMs being
terminated.
As a result, CALL_LEG_EV_MGW_ENDPOINT_GONE was never received and hence
call_leg_mgw_endpoint_gone() was never called, which means the
mgcp_client used in cl->mgw_endpoint was never put back to the pool.

By first freeing all the children (rtp_streams), we make sure
cl->mgw_endpoint ends up with no conns and sends us the GONE event
before we go ourselves into termination state.

Related: SYS#5987
Change-Id: I2126578c4e64c9f336e8a1f6ee98de970866b8dc
2022-10-19 18:46:05 +02:00
Pau Espin ef70bb202a Use new mgcp-client VTY commands under mgw node
New VTY commands have been added recently to the "mgw" node which drop
the redundant "mgw" prefix on each fo them.

Change-Id: I8ac11388e9493416b644812638e1374251725584
Depends: osmo-mgw.git Change-Id: Id55af13d2ecde49d968b9dca6a2f8108a17ec484
Related: SYS#5987
2022-10-19 18:27:50 +02:00
Pau Espin 53639ea03f vty: Make use of new mgcp_client_pool_config_write() API
Let's use the new API available in libosmo-mgcp-client to control more
consciously where the mgw pool config is printed.
Before this patch, the place where the node was printed was defined
based on implementation details on how the enum of nodes are defined and
installed.

Related: SYS#5987
Depends: osmo-mgw.git Change-Id I7a620cf47886d8ecab30ce369cf123d98ab842c5
Change-Id: Ic473fe05c55e8df3eddedf0260ec04b6fefc501f
2022-10-19 18:27:18 +02:00
Pau Espin b44cf2d575 Introduce support for libosmo-mgcp-client MGW pooling
Large RAN installations may benefit from distributing the RTP voice
stream load over multiple media gateways.

libosmo-mgcp-client supports MGW pooling since version 1.8.0 (more than
one year ago). OsmoBSC has already been making use of it since then (see
osmo-bsc.git 8d22e6870637ed6d392a8a77aeaebc51b23a8a50); lets use this
feature in osmo-msc too.

This commit is also part of a series of patches cleaning up
libosmo-mgcp-client and slowly getting rid of the old non-mgw-pooled VTY
configuration, in order to keep only 1 way to configure
libosmo-mgcp-client through VTY.

Related: SYS#5091
Related: SYS#5987
Change-Id: I7670ba56fe989706579224a364595fdd4b4708ff
2022-10-19 18:27:15 +02:00
Pau Espin add5a7f771 tests/test_nodes.vty: Avoid listing commands provided by lib
Those commands are not controlled/implemented in this repository, so
it's a bad idea having them show up here, since they may change. be
modified, become deprecated, etc.

They are actually becoming deprecated now in libosmo-mgcp-client
(osmo-mgw.git Change-Id Id55af13d2ecde49d968b9dca6a2f8108a17ec484) and
hence they don't appear anymore when listing the node.

Change-Id: I5d908f9e3023f725d49ed039158bd3d09828f12c
2022-10-19 18:24:47 +02:00
Max 9683b5f991 smpp_mirror: fix compiler warning
Use same system_id/password length limits as OsmoMSC.

Related: OS#5568
Change-Id: Iaf2b99b80f81762f5b2577f7bc490791c9cc1810
2022-10-15 16:36:54 +03:00
Max e4f429cc90 SMPP: remove duplicate g_smsc definition
The global g_smsc struct pointer is defined twice in the same file.
Let's keep the earlier definition.

Related: OS#5568
Change-Id: If96a44450563d45b707bdd4165cf3cf269db9906
2022-10-11 15:22:02 +00:00
Keith Whyte ba4d682b70 Change CC_CAUSE returned on unanswered MT Call
The timer "mgw X2" (RTP stream establishing timeout)
is set by default to 30 seconds.
When an MT call is ringing and remains unanswered, it
is this timer that will expire, and the call is terminated.

Up to now this results in a CC_CAUSE of Resource Unavailable
and if osmo-sip-connector is in use, the SIP agent will
get 503 Service Unavailable.
While "resource unavailable" may be technically correct, in
that the MGW did not return an rtp stream in time, returning
"No User Responding" (resulting in SIP 480) is probably a
more accurate description of what actually happened,
allowing the switch to inform the caller.

Change-Id: I4a9cfc388ec9ecb743d154a114a6db638eac4701
2022-10-03 19:16:14 +00:00
Vadim Yanitskiy eab86612d3 mncc: cosmetic: fix coding style in mncc_prim_check_sign()
Change-Id: I94d9cba7aca19f28c906e05dd86bfe3020abd5b1
Related: OS#5282
2022-10-03 16:20:05 +07:00