Commit Graph

7310 Commits

Author SHA1 Message Date
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
Vadim Yanitskiy 8e15c797ca mncc: move MNCC_F_ALL from mncc.c to mncc.h
Move it closer to the other MNCC_F_* entries, so that it's more
likely that it gets updated when new flags are added.

Change-Id: If1a12a696b87184c9eee14f475594c317927427b
Related: OS#5282
2022-10-03 16:20:01 +07:00
Keith Whyte fdfe0c23ec Update MNCC field validation mask.
In c6921e5068, 0x4000 was added to the
possible MNCC field flags, but before this commit, using it would
result in an ERROR of "Unknown MNCC field mask 0x....."

Related: OS#5282
Change-Id: I9e7d224e7f2d6d2824b2466752b6e8c994ac5a3d
2022-10-03 15:39:11 +07:00
Max dfb1cb80ca cosmetic: use proper name for SMPP handlers
Change-Id: I0d714e927e287a0ea9362008ed050a492510e22b
2022-09-15 20:47:37 +07:00
Max 4743a77e09 Use libsmpputil functions in smpp_mirror tool
Related: OS#5568
Change-Id: Icb046570803acb3eff89e2a4eb979c4899d485f7
2022-09-15 20:47:37 +07:00
Max 366a340ee1 Make esme struct shared
This helps to merge similar code from smpp_mirror and smpp_* in follow-up patches.

Related: OS#5568
Change-Id: I8f7ac2c00d16660925dd0b03aa1a0973edf9eb70
2022-09-15 20:47:37 +07:00
Max be768ac302 Set working directory in systemd service file
By default systemd will execute service with root directory (or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system instance) instead.

Fixes: OS#5661
Change-Id: I0f942545d9e920ba8a2d8645512ec3414ab27418
2022-08-30 19:37:20 +07:00
Vadim Yanitskiy 088043fae4 contrib/jenkins.sh: do not override parallel make for libsmpp34
Parallel build has been fixed [1] and re-enabled [2] back in 2018.

Change-Id: I13d2d6f3b5ffae390cf429e41bf9035b8c551f66
Related: [1] I5a9d7dbd7b992d322ed0d852ebf8ca2252b51a12 libsmpp34.git
Related: [2] Id41fbcb5a96093eb6c3dc00bcacbd379111ada70 libsmpp34.git
2022-08-29 00:43:09 +07:00
Max 62977d0484 Add ESME-specific logging
Related: OS#5568
Change-Id: Ie5ddde762350385f8d18ee1d441584a41b0290ec
2022-08-05 22:12:09 +07:00
Max 5346f69a54 Introduce libsmpputil
As part of preparation for libosmo-netif migration let's move common SMPP code
into separate build-time library and use it for both smpp_mirror and OsmoMSC
renaming the files if necessary.

While at it we also fix id/password legth limits in smpp_mirror and drop unused
fields from ESME struct.

Related: OS#5568
Change-Id: I61910651bc7c188dc2fb67d96189a66a47e7e8fb
2022-08-05 22:12:09 +07:00
Max 3948fcc476 tests: use common stubs for SMS queue test
Related: OS#5568
Change-Id: Ic854eb919e6fcc82bd0245f62c72985b938c6b7a
2022-08-01 13:53:37 +00:00
Max 1470d0b870 ESME: use osmo_sock_get_name() for logging
This allows us to drop single-use parameters from osmo_esme to facilitate further code changes.

Related: OS#5568
Change-Id: I34bd4c145b0f6287a323e2350808feb59f1d3187
2022-08-01 13:53:37 +00:00
Max 7038dd0e05 Ignore .deb build byproducts
Change-Id: I0ff10ef5766edf5f2aacf62acc98f25f01706ab4
2022-08-01 13:53:37 +00:00
Max 4b1202bfdf SMPP: clarify (re)start logic
Having smpp_smsc_stop() called from within smpp_smsc_start() instead of
explicitly inside smpp_smsc_restart() is confusing and could lead to
hard-to-trace bugs. Let's get this fixed first before going further.

Related: OS#5568
Change-Id: I353f5b82c9f5308d93e926538d4ef7e24d0b0339
2022-08-01 13:53:37 +00:00
Neels Hofmeyr d20dd22082 sdp_msg: s/sdp_audio_codec_/sdp_audio_codecs_
Some functions act on a struct sdp_audio_codecs but begin with the name
sdp_audio_codec (singular). That's confusing.

Related: SYS#5066
Change-Id: Id87eb350c1f17f8dbf776909824bfa06634c1d04
2022-07-25 14:25:07 +02:00
Neels Hofmeyr c9e0ca3d1f sdp_msg: add sdp_audio_codecs_cmp(), add compare flags
A problem with SDP fmtp handling is visible in this patch: when cmp_fmtp
is true, we compare fmtp strings 1:1, which is not how things should be
done. The intention is to fix fmtp handling in a later patch.

At least there now is a flag to bypass fmtp comparison altogether.

Related: SYS#5066
Change-Id: I18d33e189674229501afec950aa1c732386455a2
2022-07-25 14:25:07 +02:00
Neels Hofmeyr 99ab7c57da in sdp logging: add payload type number like 'AMR#111'
Related: SYS#5066
Change-Id: Icbb4e89ce2947bf787c3ee14e3e115d406e43de2
2022-07-25 14:24:48 +02:00
Neels Hofmeyr 9a515e5db0 sdp_msg: s/_name_/_to_str_/g
foo_name is intended for a short id, foo_to_str is more accurate naming
here.

Related: SYS#5066
Change-Id: I21d73b2e2633dd4841ff69a0c5fdf9b1a4c0615f
2022-07-25 14:07:14 +02:00
Neels Hofmeyr 90933d46ba cosmetic: log actual MNCC msg in tch_rtp_connect()
Related: SYS#5066
Change-Id: I99161eeb64fd0faa7be6fc1e4986e2ba1bdcc75c
2022-07-25 14:06:26 +02:00
Neels Hofmeyr 550506aaf1 err log: fix reverse statement in msc_a call handling
Change-Id: I937abe25ba87d0fcddc3351ac391cf6e7e776de6
2022-07-22 19:11:18 +02:00
Neels Hofmeyr a9e383f5bd missing whitespace in gsm_04_08_cc.c
Change-Id: If9e2f543d1924421c1a1f1e1e100c7d9fb63c139
2022-07-22 19:09:58 +02:00
Neels Hofmeyr 3551d84ad8 fix typo in msgb name for CC SETUP
Change-Id: Id2c44966152805ea52bd7e7534529832fc2312ab
2022-07-22 19:09:44 +02:00
Keith Whyte 99bd0f3204 Turn off secure_delete in sqlite
libsqlite3 that ships with some distributions may have secure_delete
activated by default. This means all database records are overwritten
with zeros on DELETE. We don't needs this extra overhead.

Change-Id: I9da6499a38096c8df2025bb9d35ec789864b7c5e
2022-07-08 00:44:52 +01:00
Keith Whyte ea62986928 Don't let this osmo-msc operate on a libdbi database
The Binary format changed when libdbi was removed. If we let osmo-msc run on an
unconverted database, the results are unpredictable, certainly undesirable.

Change-Id: I887b6a4374b1c83684f4007e9791ae58bba4e8c1
2022-06-30 20:44:28 +00:00
Pau Espin 5b06a8d6a5 Bump version: 1.8.0.43-2eaaf-dirty → 1.9.0
Change-Id: Iacb839715290b27f1f3d302e13f219f5f0e1d161
2022-06-29 11:32:12 +02:00
Harald Welte 2eaaf6f305 fix RPM build failures due to README -> README.md rename
This fixes a bug I introduced in I98e09e8900c359382e2a90b187f0c6f22a1cf81d

Change-Id: I9d7bc0aea404499315e212a2ebb92d54df85d812
2022-06-21 09:50:53 +02:00
Harald Welte 1b6289adce Convert + Expand README file
README.md in-line with that of other osmocom CNI projects:
* markdown syntax
* link to manuals, issue tracker, gerrit contributions, etc.

Change-Id: I98e09e8900c359382e2a90b187f0c6f22a1cf81d
2022-06-18 13:34:24 +02:00
Harald Welte 3b13edf48f update git URLs (git -> https; gitea)
Change-Id: I0d7a9140ccbe5adecddde1901703e49243ee0b92
2022-06-18 12:27:10 +02:00
Harald Welte a3c639ff5f sms: Introduce VTY-configurable minimum SMS validity period
This is meant as a safeguard against users or user equipment which
doesn't set a reasonable validity period.  Using this setting, the
SMSC administrator can set a minimum SMS validity period. Any SMS
submitted with lower validity period will be extended to that minimum.

Change-Id: I192528a6f9059d158fa12876a247d61bd7edaec8
Related: OS#5567
2022-05-19 19:34:41 +00:00