CS doesn't need this because the FSM is bound to the signalling connection,
but for PS, there is no direct signalling connection in the SGSN.
Change-Id: I27fd1048f85363797b43808d2061ce28be6da81b
From time to time, we're seeing the following error in Jenkins:
----------------------------------------------------------------------
Traceback (most recent call last):
File ".../tests/vty_test_runner.py", line 70, in tearDown
raise Exception("Process returned %d" % rc)
Exception: Process returned -9
----------------------------------------------------------------------
Let's dump stdout/stderr of the process to get more information.
Change-Id: Ie6a2f5b1bc56d35513643b52923403798e5a0a5a
Related: OS#5665
Send the bearer capability IE from 3GPP TS 24.008 § D.1.2 for speech
instead of the result from gsm48_cc_tx_setup_set_bearer_cap() for the
network to MS direction. This is needed, because:
- We shall send spare bits for the radio channel requirement in the
network to MS direction, see 3GPP TS 24.008 § D.1.1 and Table
10.5.102).
- We could in theory send a speech version list that MS are then
supposed to ignore (end of Table 10.5.103), but this causes bugs in
some MS so it is better to not send it (OS#6656).
Related: OS#6657, OS#6655, OS#6656
Related: osmo-ttcn3-hacks I8fd33cf2f7fb8a1c34851ecf54fccddd2efd0536
Depends: libosmocore I97101c977104eae82e4850d40f9abd15aa03e33e
Change-Id: I7046e9244fd9d4301ee2c4df1147a619f753739c
Store the bearer capabilities directly in the transaction, instead of
storing them in a separate variable first, then copying it to the
transaction, then using both the separate variable and the copy in the
transaction later on. The extra variable is not needed and only makes it
more compilicated.
Add an explicit '.transfer = GSM48_BCAP_ITCAP_SPEECH,' while at it in
the speech case. This was already set implicitly because
GSM48_BCAP_ITCAP_SPEECH is 0.
Change-Id: I247ef10923c2875ca75e73046f4b8ed14190d4d2
Move the code for setting the transaction ID to a separate function to
start making gsm48_cc_tx_setup shorter and easier to read. Return -1 on
error instead of rc from mncc_release_ind() as it returns 0 on success.
Make some tweaks while at it:
* Set LOGL_ERROR for the "TX Setup with assigned transaction" error.
* Add a log message for the "could not get a free transaction ID" case.
* Minor formatting tweaks.
Change-Id: I715f12d09570211a98b667c56960309bd326e8d8
In Debian 13 armv7l, time_t is "long long int" instead of "long unsigned
int" as seen on x86_64 and aarch64. Fix it by casting to "long long
int".
Change-Id: I3801fc7d0a85036f1f9346c54824eff5c126f363
The VLR must be allowed to notify the MSC if a subscriber becomes invalid.
There are multiple cases when this happens:
a) if the subscriber didn't do a Location Update Procedure within the
given periodic timer.
b) if the HLR does a Cancel Location Procedure with reason withdraw
c) if the HLR does a Cancel Location Procedure with reason update location.
d) duplicate entries (unsure if this is valid, but keeping the code as is)
Change-Id: Ie5b687318b106a230fcee52deba86649641004b3
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 long int".
Related: OS#6828
Change-Id: I3de792d62b1989cf35051cbecde98fa9030bfbf2
It makes no sense to initiate a silent call if subscriber already
has an active connection (e.g. when a normal call is ongoing).
Change-Id: I52b3be26c61cadacc4783b5c324809ecd6906b36
Before this change trans->paging_request was not assigned correctly.
In some cases it caused trans_free to not call paging_request_remove.
If the paging timeouts, paging_cb_silent would call trans_free again
with a stale pointer.
Change-Id: I93913d189800d71f82c013b6e946bd63db362f65
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 RAN peer, then reset the link
and mark the peer as disconnected, until a new RESET can successfully fo
through.
Change-Id: Iddd10c8f97310b600374ff0141ea06e03087da8f
Related: OS#5917
If the link is not ready it will fail to transmit the msg anyway,
so there's no use in trying to submit a page over it.
Change-Id: Ia858291f4454e4caf293e1aaf60ea04d2d4a64e9
Use of osmo-iuh's iu_client API was removed from osmo-msc long time ago
(see c4628a3ad4), and its removal is also
scheduled in osmo-sgsn.
Still, some small reference bits were still left. Remove them.
The VTY init functions being dropped basically set g_rab_assign_addr_enc,
which doesn't really seem to be used at all, only place is that file for
vty related stuff which has actually no use in
osmo-msc.
Other 2 are asn1c debugging related, which can also probably be dropped.
This completelly removes references to iu_client.h in osmo-msc.
Related: OS#5487
Change-Id: I9cf83f2255e1e9aa83f3139b88ea81b2f5b686c3
The compile warns about these strncpys because they
might not null terminated.
Even the next line ensures this.
Also replace osmo_strlcpy with OSMO_STRLCPY_ARRAY
when possible.
Change-Id: I96a27ef42cb06dd2365f5c9902933323c7caf9a8
It was reported by a user that osmo-msc hits an assertion failure:
Assert failed osmo_use_count_get_put(&msc_a->use_count, "cm_service_ss", -1) == 0 gsm_09_11.c:147
It's yet unclear how can this happen, because the MS/UE shall not be
sending SS/USSD messages without a prior CM Service Request. However,
I was able to write an "evil MS" testcase that reproduces the problem
(see the related patch). This is pretty much a DoS vector, so let's
add safety checks preventing this to gsm0911_rcv_nc_ss().
Change-Id: I724f0f0c9ef8611d3c3653e9370361b252127f72
Related: osmo-ttcn3-hacks.git If1d85a1b4b63b01b4565e53677acfd21e664e799
Related: 5fb4a9efcf ("Release BSS connection when SS message is rejected")
Related: OS#6756
These counters have not been updated in SMS-over-GSUP mode so far.
Move the logic updating counters to the common code path.
Take a chance to use rate_ctr_inc2().
Change-Id: I97b4699e5b2c44989368004a53e26ca5daaa7b14
Related: SYS#7323
When SMS-over-GSUP is enabled, there's currently no indication of
failed MT SMS delivery due to paging timeout or connection issues.
In such cases, the SMSC that initiated the MT-forwardSM-Req receives
no response at all. This leaves the SMSC with no clear criterion
for retrying delivery other than a generic timeout.
So far, MT-forwardSM-Err was only sent when the MS/UE explicitly
indicated an error (via RP-ERROR). This patch extends its use to
also cover situations where no RP-ACK or RP-ERROR is received,
allowing the network to notify the SMSC of delivery failure
due to lower-layer issues.
The key difference between the MS/UE-originated and network-originated
MT-forwardSM-Err messages is presence/absence of the following IEs:
* SM-RP-Cause IE -- indicated by the MS/UE,
* Cause IE -- indicated by the network.
Either of these IEs shall always be present.
Change-Id: I51d92752471147e6d21a5059bebb0702b32642a5
Related: osmo-ttcn3-hacks.git Ief16753783e044911f1e3cef8d7012810d709e61
Related: osmo-ttcn3-hacks.git Ic27d943645fdff8d34f958e3bf16c8ee6e8368d2
Related: SYS#7323
Calling vlr_subscr_put() in gsm0911_gsup_rx() may result in free()ing
the memory pointed by vsub, so let's set it to NULL to prevent
potential use-after-free.
Change-Id: If81df71a52e4fa972b48c61d1ed1361c6629ae94
This callback was drepecated and is not ever called since
libosmocore.git 70ce871532ab21955e0955d7e230eae65438f047 (release 1.3.0).
See also libosmocore.git d31de237582f6fe3315d61bb9a488d4cda92654e.
Change-Id: Id6620095af153781cde926458f54fed5bd51a9e7
When the creation of the transaction structure fails, the MSC will
send a CP-ERROR message.
This patch ensures that the MSC_A use counter is decremented, so
that the BSS connection is released, if it is not used by any other
transaction.
Without this patch, the msc_a_fsm would wait 5 seconds for an initial
transaction before releasing the BSS connection.
Related: OS#6427
Change-Id: I82da9c283205c69b19ceb4ba40ac5aa7f37d159b
When the creation of the transaction structure fails, the MSC will
send a RELEASE COMPLETE message.
This patch ensures that the MSC_A use counter is decremented, so
that the BSS connection is released, if it is not used by any other
transaction.
Without this patch, the msc_a_fsm would wait 5 seconds for an initial
transaction before releasing the BSS connection.
Related: OS#6427
Change-Id: Icb893d5c1ce4c77a29259ce66189576dcaa5a44a
An SMS deliver report may be returned from the UE for any MT SMS. A
common use is for remote communication with the SIM (UICC) whereby a
command requires Proof of Receipt in an SMS deliver report (see 3GPP
31.115)
SMS-DELIVER-REPORT TPDU is defined in 3GPP 23.040 s9.2.2.1a and
carried as a RP-User-Data element within an RP-ERROR or RP-ACK PDU
In 3GPP 24.011, the definition of RP-ACK (s7.3.3) and RP-ERROR
(s7.3.4) shows RP-User-Data encoded as an optional TLV.
In MAP (3GPP 29.002) the MSC transfers the user data in either
SM-RP-UI parameter (s7.6.8.4) or SM-DeliveryFailureCause
diagnosticInfo (s7.6.1h)
With GSUP the osmo_gsup_message struct member sm_rp_ui is used to
carry the user data in both cases.
Change-Id: I90a607900ac7c86b200c79b7e8c460d4cbb3c3ce
To prepare for PS support, add related PS timers
and try to keep the code simple to support both domains.
Use osmo_tdef_fsm_inst_state_chg() where possible because
this way we can have a t_def pointer which we set at the start.
Change-Id: I364973b8d9e277ec5963343c0a83061e81a5baba
gsup_client_mux code was cloned a couple months ago to
libosmo-gsup-client, use it in osmo-msc and drop its own copy.
The code was not dropped at the time because it required tweaking the
unit tests, because they were wrapping some underlaying functions which
cannot be wrapped anymore since the code using them is now inside the
separate already-linked libosmo-gsup-client.so.
Solve it by actually wrapping one layer up in the gsup_client_mux itself
since it now something we mantain here anymore.
Change-Id: I34d02ae219f3ec8daf47942c46f52b21eab21242
The vlr must known if it is CS or PS. As this is a very
severe configuration entry, add it to the main allocation.
Change-Id: Ib77aad8492a198131c966d4ac4cf8f5f727edcfa
Like all the other libvlr fsm, they are private to their own files,
keep the vlr_auth_fsm the same and be consistant.
Change-Id: Iec85f299cd99879475ab094998433d935e980394
To prepare the split off into a separate library,
the logging can't use log category from a define.
Use the same strategy as all the other osmo libraries and
use a global array which is set on initialisation to define the logging
categories.
Change-Id: I6d87b38d6d7d704c7c7b2c90ad12187e4b953b8b