8767 Commits

Author SHA1 Message Date
Pau Espin Pedrol
5ee02ae7f6 Fix wrong list entry derreference during bts_depend_find_entry()
Commit 92dc38d1c2 converted
bts->depends_on from bitmask to a list, but introduced an error while
doing so, iterating the wrong list and hence derreferring wrong entries
from it.

This caused for instance sporadic malfunction where osmo-bsc refused a
BTS from connecting with "Dependency not full-filled".

Related: SYS#7062
Related: SYS#7624
Fixes: 92dc38d1c2
Change-Id: I50c8111d71ee4493076cd2cf3d4d850fee3c0414
2025-09-02 14:37:50 +02:00
Keith Whyte
e6b593f3a9 Fix missing LAC/CI hashtable update upon CTRL SET
Add functions to set LAC/CI on a BTS and update hashtables

Use these function from both the vty and the control interface.

This commit fixes the issue where an update to LAC or CI
via the control interface was not resulting in updated
hashtables and therefore the BTS was not found during paging.

Related: OS#6840
Fixes: 15284337ec

Change-Id: If9509534bd4a75f8ed8fb3e0a6bec701c7596861
2025-08-26 12:04:44 +02:00
Oliver Smith
8baa7cec36 Fix building for debian 13 armv7l
In Debian 13 armv7l, time_t and suseconds_t are "long long int" instead
of "long unsigned int" as seen on x86_64 and aarch64. Fix it by casting
to "long unsigned int".

Related: OS#6828
Change-Id: I416b31dd11a82ad52f6a662d7e099123a5c77fff
2025-08-13 11:11:19 +02:00
Pau Espin Pedrol
8fe6e53b40 sigtran: Compare sccp_addr using osmo_sccp_addr_ri_cmp()
Change-Id: I40db348f40a7e30cc170d1ffaabe95f4a5965d78
2025-07-17 11:12:58 +02:00
Pau Espin Pedrol
b84a8ff968 sccp: Handle N-NOTICE.ind (Routing Failure of SCCP CL messages)
ITU Q.714 2.8:
"""
When an end node is informed of a routing failure, this information
is forwarded towards the SCCP user by using the N-DISCONNECT primitive
(refer to reason for release in 2.1.1.2.4/Q.711) or the N-NOTICE primitive
(refer to reason for return in 2.2.2.2.4/Q.711)
"""

We are already handling N-DISCONNECT.ind for CO messages, but
N-NOTICE.ind for CL messages was not being handled.

If CL messages are not arriving to the peer (MSC), then reset the link
and mark the peer as disconnected, until a new RESET can successfully fo
through.

Related: OS#5917
Change-Id: I3f6c120183a53a80255de71366935b6c07fcfbc8
2025-07-17 11:12:58 +02:00
Pau Espin Pedrol
4b3ba64f6c Introduce LOG_MSC log macro
Change-Id: I4f2502eea856b31783eef5b0af8dc41ccfeb9910
2025-07-17 11:11:30 +02:00
Pau Espin Pedrol
89bf530ed4 sigtran: Avoid potential uninitialized ptr dereference
Use osmo_sccp_addr_dump() instead of osmo_sccp_addr_name(), since msc
may be uninitialized and hence ss7 may not be available.

Change-Id: I682567e88f61c9ec3cfa25c50f2c12fc9d1f6e4f
2025-07-16 17:56:05 +02:00
Pau Espin Pedrol
bda09fa969 sigtran: Log N-PCSTATE.ind PC with configured format
Change-Id: I9b55beec418e1c136531422cb23dae55fe422b9e
2025-07-11 13:55:12 +02:00
Pau Espin Pedrol
e964b00259 bsc: Make sure MSC PC is added to sccp-addressbook
This way they can used by libosmo-sigtran to figure out interesting
remote PCs it should track availability for.

Related: OS#5917
Related: SYS#7501
Depends: libosmo-sigtran.git Change-Id I9d2452d9cc8e443050927a047b7ebacd2b2f37e1
Change-Id: I57dca92eb5f482e9017d9b19cd7f8feebd9e2721
2025-07-01 18:08:44 +02:00
Pau Espin Pedrol
7b3f308d67 meas_feed: Increase default txqueue len to 1024
Depending on the BSC size we potentially have a very large number of
measurement reports. They occur every 480ms on each active logical
channel, so with a 4-TRX BTS of 12 SDCCH + 60 TCH/H we have up to 144
measurement reports per second per BTS.  Therefore, a BSC-global
meas_feed transmit queue limit of 100 msgb might be a bit low.

This also follows the default osmo_io txqueue len which was increased
recently to 1024.

Related: SYS#7508
Change-Id: Ib4382adc05cf6776952801ad7edad230db1ec454
2025-06-20 12:48:39 +00:00
Pau Espin Pedrol
c6d90c19bf cosmetic: Update 3GPP spec reference
Change-Id: I8dada7f69aa66cbf8ebdeeed1d24806239b73ba9
2025-05-19 18:14:46 +02:00
Michael Iedema
30d25e090e meas_json: add command line option to specify binding ip
Change-Id: I3baa80c95b373e3f9483a2778bd195ff99bbdec0
2025-05-06 05:11:04 -07:00
Pau Espin Pedrol
2b7181eaa5 cosmetic: Improve documentation with spec references about several parameters
Change-Id: I7892f79f5143f9b3e6fa3bcaddd11ee2c5302934
2025-03-23 22:20:16 +00:00
Pau Espin Pedrol
2df19386f5 vty: Improve cmd 'cell barred' description
With references and keywords from specs (TS 44.018 Table 10.5.2.29.1).

Change-Id: I089974fbdb46ec776aa9f38b8037762fcc04687d
2025-03-23 22:19:58 +00:00
Vadim Yanitskiy
2d52cb2c23 bts_vty: drop NL in 'ncc-permitted' commands
New line is not needed at the end of the cmdname field.

Change-Id: Ic90a817f5e9d0b32bb431420df6a8994a2d87f2d
2025-03-22 03:21:37 +07:00
Mychaela N. Falconia
dc23c049c4 TW-TS-* support: pass RTP extensions to MGW
As of 2025-03-10 (I0d58e6d84418f50670c8ab7cf8490af3bc2f5c26 merge)
OsmoMGW supports an SDP extension that enables the use of TW-TS-001
and TW-TS-002 enhanced RTP formats for FR/EFR and HRv1, respectively;
libosmo-mgcp-client likewise supports a mechanism to request these
extensions.  At the present time OsmoMGW rtpbridge endpoints don't
do anything different when these extensions are enabled (they
originate from OsmoBTS in this case), but for E1 Abis endpoints
the new MGCP extension controls whether or not these MGW endpoints
emit the enhanced RTP formats in question.

Changes to OsmoBSC:

1) Allow TW-TS-001 and TW-TS-002 to be enabled on all E1 BTS -
   previously not allowed.

2) Whether E1-based or IP-based BTS are used, when RTP extensions
   have been enabled by CN request (BSSMAP IE of TW-TS-003),
   pass them to the MGW endpoint controlled by this BSC.

The second change makes RTP extensions work on E1 BTS, and also
paves the way for future OsmoMGW rtpbridge improvements where
the MGW might do additional processing that needs to be disabled
when TW-TS-* extensions are in use.

Depends: osmo-mgw.git I0d58e6d84418f50670c8ab7cf8490af3bc2f5c26
Change-Id: Iaa6e4c56313f06b79852c06dcec686f21950e638
2025-03-15 05:57:12 +00:00
Mychaela N. Falconia
9500a550ad E1 BTS: direct MGW to 8k subslots for TCH/H
If the design of an E1 BTS allocates a 16 kbit/s subslot on Abis
for each GSM timeslot, then if that GSM ts is configured to operate
as two TCH/H lchans instead of a single TCH/F lchan, that BTS has
to use the 8 kbit/s TRAU frame format of GSM 08.61 and not the
16 kbit/s format for each TCH/H lchan.  Nokia E1 BTS and their
associated BSC and TCSM (TRAU) equipment are known to use this
arrangement; the present author does not know of any GSM BSS vendor
who used the 16 kbit/s format of GSM 08.61 - it might be a paper-only
spec.

Prior to the present change OsmoBSC always selected a 16k subslot
endpoint at the MGW, thus precluding possibility of working TCH/H
on otherwise supported E1 BTS.  Change it to select 8k subslot
endpoints when operating on TCH/H lchans.

It may seem that this change breaks support for those E1 BTS that
do use 16 kbit/s TRAU frame format for TCH/H, whatever they may be -
but in reality, said support was already broken.  Prior to the
present change OsmoBSC would smoosh both TCH/H lchans of a given
GSM ts onto the same MGW endpoint - which cannot work because they
are two different lchans carrying unrelated traffic.

Change-Id: If6141a55434ce08f8fdd1c69b6fc9a97d6c726a7
2025-03-08 08:10:16 +00:00
Pau Espin Pedrol
4caae4712c nokia: Fix uninitialized access
/osmo-bsc/src/osmo-bsc/bts_nokia_site.c:1903:36: error: 'bcch_trx_nr' may be used uninitialized [-Werror=maybe-uninitialized]
 1903 |                                 if (trx->nr != bcch_trx_nr) {
      |

Change-Id: I6bfdefb44235291a5a1f1c72e5a5149d15e19b8f
2025-03-05 16:23:30 +01:00
Pau Espin Pedrol
2f998b8f88 Drop use of deprecated vty is_config_node() cb
This callback was drepecated and is not ever called since
libosmocore.git 70ce871532ab21955e0955d7e230eae65438f047 (release 1.3.0).

See also libosmocore.git d31de237582f6fe3315d61bb9a488d4cda92654e.

Change-Id: I391a6fc9f7325c1770ce410d31ed2d820726225a
2025-03-05 14:52:48 +00:00
csaba.sipos
23a56fa463 nokia_site: add function to unlock and reset TRXes
We have a long outstanding issue with TRX RSL bootstrap,
espcially with BTSes with more than one TRX. The more TRX
a BTS has, the more time it takes for it get to a ready state.

This commit changes the TRX bootstrap logic as the following:

1. During OML initial config, all TRXes are configured locked.
   This gives a better controled state of TRXes, and the BTS
   enough time to do internal checks, SW load etc.
2. BTS_CONF_COMPL usde as entry point for the RSL bootstrap.
3. Unlock all TRXes, and give the BCCH TRX a reset.
4. Start RSL bootstrap.

Runtime tested with InSite and a MetroSite with 4 TRXes.

Co-authored by: Tomcsányi Domonkos <domi@tomcsanyi.net>

Change-Id: I9042a1e24f0932a23a26185181481db2ceddbb7c
2025-03-04 07:24:31 +00:00
csaba.sipos
028dadb36c nokia_site: Add object_identity, object_state and object_identity_state attributes
Note: these are cosmetic changes so far, the plan is to use them
in the future to finetune the Nokia OML and RSL bootstrap logic.

Thanks Domi for helping with the code!

Change-Id: Id9f819b0649ba3c247db72d7d738e49c72388dc3
2025-02-27 14:00:39 +00:00
Oliver Smith
d3fa4e294b Bump version: 1.12.1.47-87507-dirty → 1.13.0
Change-Id: I9685a47a15b4636306dd1162c4aae27a6ae1022a
1.13.0
2025-02-12 13:02:17 +01:00
csaba.sipos
87507feddc nokia_site: add reset_type attribute
Change-Id: I0f31cd711768c963e5c14c0f4969ff76cb05c12b
2025-01-16 16:48:46 +01:00
Neels Hofmeyr
7a95d2fdad drop unused function decl abis_nm_rx()
Change-Id: I1fbbe551d0d216dca586d889f07499749f44ee37
2025-01-14 14:00:00 +01:00
Csaba Sipos
b186c501dc nokia_site: introduce hopping control for Nokia *Site
nokia_site hopping-mode baseband
nokia_site hopping-mode synthesizer

Signed-off-by: csaba.sipos <metro4@freemail.hu>
Change-Id: Idb1d269d2ee80d72ede2394125e8acedf0ee8b06
2025-01-14 08:58:06 +00:00
Csaba Sipos
676817a1a5 nokia_site: change RSL bootstrap logic
Wait for BTS_CONF_COMPL and start RSL bootstrap after.
This way the TRX SW load has enough time to complete and the RSL LAPD becomes available.
Important for MetroSite, UltraSite BTS types.

Change-Id: I7319a64f069d239a582547bc422058ff5848d2e2
Signed-off-by: csaba.sipos <metro4@freemail.hu>
2025-01-10 09:24:35 +01:00
Csaba Sipos
1e84adf860 nokia_site: add missing element names
Change-Id: Ia4026bbe458817e164b756847229cf6a90d02865
Signed-off-by: csaba.sipos <metro4@freemail.hu>
2025-01-09 18:09:13 +01:00
Csaba Sipos
7fb4e2f673 nokia_site: add some missing message IDs
Change-Id: I2ecd2ac285493352a9b121b09bf6a3a560e14c6c
Signed-off-by: csaba.sipos <metro4@freemail.hu>
2025-01-08 10:10:22 +00:00
Pau Espin Pedrol
18d4e89054 cbsp_link: set name on stream
Otherwise it's difficult to identify it in logs eg. during reconnect.

Change-Id: Ia0873ea26a4ef5678fc571e40391d04a2757a7bc
2024-12-13 20:02:20 +01:00
Pau Espin Pedrol
d15e5fa010 Use correct bts_nr field during MO init
We want to transmit the BTS nr inside the E1 link, not the internal BTS
number in osmo-bsc.

Change-Id: I8a70c61cef74c0febeefae88dee575fbb4936d3e
2024-12-12 13:42:26 +01:00
Pau Espin Pedrol
887ad810b0 Fix BTS nr >255 wrapping up during bts allocation
Commit which introduced the gsm_bts_nr_t type forgot to use it in these
functions.
As a result, bts 256 ended up trying to allocate rate counters for id=0.

Change-Id: I5128becaf453f5cfbc722a55c756432e525fc884
Fixes: 6fe0e28a23
Related: SYS#7063
2024-12-12 13:31:49 +01:00
Pau Espin Pedrol
f8a5ca14f0 jenkins.sh: No need to build libosmo-sigtran with doxygen
Change-Id: I450b5a9c875a34ae220a44f8a620b973538dc1c9
2024-12-10 16:54:57 +01:00
Pau Espin Pedrol
988e6a618e Drop unneeded use of abis/ipa.h header
The header is not needed and will eventually be deprecated.

Change-Id: Ib5b9557ff5611fd6606cd0ae6af9046e14cceda0
2024-12-10 14:40:19 +01:00
Philipp Maier
a6379ef8f2 pcu_sock: do not receive a TXT ind. with PCU_VERSION for a specific BTS
We receive a TXT indication that contains the PCU_VERSION from the PCU when the
connection to the PCU is established. This message contains a BTS number, which
is always 0. This is a hard coded value that does not refer to a specific BTS
object. Also it is not logical to inform a specific BTS object about the PCU
version. This information should be directed to the connecting process as a
whole. However, we use this TXT indication to trigger certain initialization
processes on the BTS object we manage inside the BSC process. Unfortunately the
BSC is currently using the BTS Number in the TXT indication to resolve the BTS
object. This is not correct, instead the BSC should iterate of over all BTS
objects and trigger the initializations for each BTS object that has a BSC
co-located PCU.

This change does not have any dependencies, it just corrects the behavior of
the BSC on initialization.

Related: OS#6507
Change-Id: I3fbf5430db8b8ea29efb147bd162706990453fc5
2024-12-05 12:25:44 +00:00
Pau Espin Pedrol
7067255b84 ipaccess-config: Remove unused function ipaccess_bts_handle_ccm()
This function actually slippted in unintentionally when copying the
ipaccess driver from libosmo-abis.git as a base for the ipaccess-config
driver.
That function is actually not used either by libosmo-abis driver, but
was left there as a backward compatible API.

Fixes: 76b863eb47
Change-Id: I126014eed2196e9fe03c65dff7bb384ac81f39f8
2024-12-03 13:37:11 +01:00
Pau Espin Pedrol
76b863eb47 ipaccess-config: Use own e1_input ipaccess driver
Since osmo-bsc.git creation from openbsc.git around 10 years ago, a
reference was kept in osmo-bsc/ipaccess/ipaccess-config.c to ipa
specific code in the ipaccess e1_input stack of libosmo-abis.git
(ipaccess_fd_cb()).

Back at that time that was already considered to be an ugly hack, as
mentioned in include/osmocom/abis/ipaccess.h exporting that function.

This was done because ipaccess-config is quite different in several
aspects wrt to usual ipaccess based bts/osmo-bsc ipaccess lines:
* nanoBTS acts as TCP server and ipaccess-client as TCP client.
* TCP port 3006 is used instead of usual OML 3002.
* IPA handshake is actually also different, since despite nanoBTS being
  the server it doesn't really trigger an IPA ID GET which need to
  answer. Instead, upon ipaccess-config connecting, it will send an IPA
  ID ACK and wait to receive an IP ID ACK itself before start
  transmitting OML to ipaccess-config.

Due to all those differences, it really makes no sense to keep support
for this setup in the more usual bts<->bsc Abis e1line ipaccess driver
present in libosmo-abis.git.

Instead, this patch adds a new ipaccess-config-e1-driver.c which
implements a libosmo-abis e1_input line driver which works for this
specific service. libosmo-abis.git src/input/ipaccess.c from Change-Id
Idf241c8f2fdb86d090d4132a9b316b7236402232 is used as a base, further
simplifying it by removing stuff not really needed like BTS/BSC role,
tcp keepalive, tcp socket stats, etc.

Related: SYS#7063
Related: OS#5755
Related: OS#5756
Change-Id: I4d26876ce7d75a78f03c4fa66233550baf4fa7d5
2024-12-02 21:08:51 +01:00
Pau Espin Pedrol
1ca1a295ec Drop use of libosmo-abis osmocom/abis/ipaccess.h
That header is only really used to provide an old hack for
ipaccess-proxy tool in openbsc.h/osmo-bsc.h, and will be deprecated
soon.

src/ipaccess/ipaccess-config.c already has an explicit extern
declaration for ipacces_fd_cb() anyway, so drop the header in advance.

Take the chance to organize a bit better the includes based on dependency
chain.

Change-Id: I5f9daaf7789a56a08d2ec24b5e25e2e3b65b8b5b
2024-11-29 19:05:12 +01:00
Pau Espin Pedrol
eb08b4ce41 ipaccess-proxy: Fix wrong cb function passed
It makes no sense that ipaccess-proxy is using the ipaccess_fd_cb()
function from libosmo-abis, since that function expects an e1_input
ipaccess driver to be set up by the app, which ipaccess-proxy never sets
up. Furthermore, even the data pointer being passed doesn't match the
one expected by the callback.

This seems to be a bug introduced 10 years ago in osmo-bsc.git
eb62301938, where the name of the private
function callback used by ipaccess-proxy was changed to
proxy_ipaccess_fd_cb() to avoid colliding with the ipaccess_fd_cb() from
libosmo-abis, but only 1 of the 2 references was changed at the time,
leaving the other one pointing to the wrong function.

Fixes: eb62301938
Change-Id: I1702d9913a462a36e4b78b503a8338ae2ad140b1
2024-11-29 13:28:22 +01:00
Pau Espin Pedrol
83793ffb49 abis: Fix reusing bts->*_link while it is being destroyed
Call to e1inp_sign_link_destroy() may trigger a sign_down() callback,
which if happening synchronously, could end up reentring the same code
path we are in before bts->*_link was set to NULL.
Avoid it by marking the pointer as NULL immediatelly before calling
e1inp_sign_link_destroy().

Change-Id: Ice71b3143f167482e4a23759012b58e9ee13bfc0
2024-11-27 20:26:13 +01:00
Pau Espin Pedrol
6a4e24fb38 jenkins.sh: libosmo-netif no longer depends on libosmo-abis
Change-Id: Idcd6aecd9bd50b43e3c16c6f636151bb7958b06f
Depends: libosmo-abis.git Change-Id I079dc3999de508301dd37ed03e399356a58d3cab
Depends: libosmo-netif.git Change-Id I13d6e88158f6d9ce017986283183ee9c2cc68cae
2024-11-21 14:57:10 +01:00
Pau Espin Pedrol
9faff7766f Use new libosmo-sigtran API osmo_ss7_as_select_asp()
Depends: libosmo-sigtran.git Change-Id b9f6b542bbae925e23ca7c4de27cdff59021ccb9
Change-Id: I0f2e3d6cbdf443c0194b61df7479aecf4073e19c
2024-11-08 19:24:41 +01:00
Pau Espin Pedrol
dba60c5a95 Use new libosmo-sigtran API osmo_ss7_as_get_asp_protocol()
Depends: libosmo-sigtran.git Change-Id I6171287c9bc76db6561f8ff92c4aebe453efaa7d
Change-Id: I58b9713ae247a7e28c004170dd890a78c03c39c0
2024-11-08 19:02:29 +01:00
Pau Espin Pedrol
bce6ef609b bsc_sccplite_msc_send(): Fix msgb leak
Change-Id: I08839ae297fa4ec2ffc9ecceb1bad345bf76da10
2024-11-08 18:47:35 +01:00
Pau Espin Pedrol
ea8071e6d2 Use new libosmo-sigtran API osmo_ss7_instances_llist_entry()
Depends: libosmo-sigtran.git Change-Id I148438aecd64bdd66848d4b3404d379a380c5e9c
Change-Id: Iacbe2944957ab2e2a627f2dabdaa66d9fc8eabe3
2024-11-08 13:54:31 +01:00
Pau Espin Pedrol
676609395e Use new libosmo-sigtran API osmo_ss7_instance_get_id()
Depends: libosmo-sigtran.git Change-Id Id7b6f23a1a223fb232238b624eb4f3295790bcb1
Change-Id: Ic0a468de0e8852ddd1ebd99f25a6400475af9a1f
2024-11-08 13:54:23 +01:00
Pau Espin Pedrol
d812fb1e98 lb: Avoid using osmo_ss7_instance private field
We know the id because we just found/created it base don that id, so
simply use it instead of accessing the library object field.

Change-Id: Ib6d1f4898eb0a804ebda527fdd876d2ca4ec1e67
2024-11-05 17:10:42 +01:00
Pau Espin Pedrol
a8da1040e8 bsc_ctrl: Use new libosmo-sigtran API osmo_ss7_route_get_dest_as()
Use this new API instead of accessing the route struct directly.

Depends: libosmo-sigtran.git Change-Id Ife63bd384d247a761e0b89505ea71c41a4a16d9b
Change-Id: I198351fba4cfeba310b397c964e5306cd73189ba
2024-11-04 23:52:27 +01:00
Oliver Smith
56fa819a99 contrib/jenkins: libosmo-sccp -> libosmo-sigtran
Change-Id: I4146c4594a45c9e10b051774affe9aaffa95d314
2024-09-16 10:48:41 +00:00
Pau Espin Pedrol
15284337ec Introduce hashtable to lookup bts by <LAC,CI>
This is useful to quickly lookup pagings aiming at a LAC+CI.
Until now, we first looked up in the LAC hashtable and then iterated
over it. However, that means a potential configuration where all BTS
share the same LAC will end up in iterating over 256 bts, which is not
nice.

Change-Id: I47db6c7543e5c6c3b8f0de3ae5ee1b53c2b5f16f
Related: SYS#7062
2024-09-16 11:58:35 +02:00
Pau Espin Pedrol
2045a24042 Introduce hashtable to lookup bts by CI
Change-Id: Ia9d6a38496609fc906cc78124929e594e6a9d06e
2024-09-12 17:22:06 +02:00