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
Some FAX machines, like Siemens based Possia Greta, refuse MT data
calls when the Rate Adaptation field is set to GSM48_BCAP_RA_V110_X30.
Using GSM48_BCAP_RA_NONE makes the Greta machine happy.
After looking at various tables in 3GPP TS 22.002, I deduced that
GSM48_BCAP_RA_V110_X30 shall only be used for Unrestricted Digital
Information. Use GSM48_BCAP_RA_NONE for both FAX and 3.1 kHz audio.
Change-Id: I3d608f412859df8988ce7a51aaef65949c80865b
Related: OS#4394, OS#5730
We should respect the Information Transfer Capability indicated
during the MO data call establishment. Hard-coding UDI breaks
FAX calls for some FAX machines, such as Possia Greta.
Change-Id: Ibfb9f0097ca86092320cebed13a7a642080370f1
Related: OS#4394, OS#5730
The location update type (IMSI attach, periodic, location area change) is
required when the SGSN is using the vlr code to send back the correct PDU to the MS.
The MSC always sends Location Update Accept/Reject, but the SGSN has to transmit
either Routing Area Accept/Reject or Attach Accept/Reject.
Change-Id: I980a637333e92b15f2d516683feeaded910105b6
In preparation of splitting up the libvlr code, set the CN domain
on all required GSUP messages which allow the CN domain to be present.
The test cases expect the exact GSUP message. The additional TLV is
280102 (IE: CN domain, length 1, CS (2)).
Change-Id: I045f29647b0f122a653881030d09de35b64f4dd1
Use correct types for vlr_timer. A timer T is always a signed integer.
Also osmo_tdef_get returns an unsigned long. Match the types from osmo_tdef.
Rename the vlr_timer() into vlr_timer_val() to make it more understandable.
Change-Id: Ic46ddb578962619fc08bd63645c76852e676fcc9
Use reject cause consistent within the VLR.
Convert the GMM cause code to reject cause, which contains the
exact same values. Reject cause includes both CS and PS cause codes,
because CS and PS cause codes uses the same numbering space.
See 24.008 annex G.
Filter early the HLR provided cause code based on the CN domain,
some values are invalid and will be converted into network failure.
Change-Id: Ib269e9f865cd23f9f2c0a1bac0e17c95974c1c9f
libmsc internal functions shouldn't be called from within the libvlr.
Re-use the paging callback with an osmocom specific indication to
inform it to cancel paging.
Change-Id: I7a3d15e8f0fb51c6b32add2de5024fc4d599ecf0
When an initial call-independent supplementary service message is
received, it is checked whether the message is a REGISTER message.
If it is not, the MSC will reject it by sending 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: Ic6765e5d480735e67d97f0f560da24653b26d487
This is useful for BER testing and figuring out if the baseband
supports the requested channel mode, e.g. half-rate data calls.
Going below 2.4k (0.6k, 1.2k, 1.2k_75) makes no sense, because:
* these rates are carried by TCH/[FH]2.4 channels anyway, and
* we never tell the user data rate to the MS (part of CC SETUP)
The same applies to transparent vs non-transparent channel modes,
but let's add non-transparent variants anyway, just in case the
BTS PHY does not support transparent modes.
Change-Id: Ife83f5bcb2b68a228a014f47c7cbb21660290593
According to TS 04.08 Clause 10.5.4.5.1, the octet 3a etc. shall not be
included, if only GSM full/half rate speech version 1 is supported.
As phase 1 mobile stations only support FR and HR speech, the speech
list in the bearer capability must be reduced to the codecs listed
above. If there is none of these codecs left, the call is rejected.
The octet 3a etc. must be omitted when encoding bearer capability for
phase 1 mobile stations. This is done by removing the speech list.
I do not use a "codec filter", because it is not required. The phase 1
mobile station can only respond with codecs it supports, so no filtering
is required.
Related: OS#6461
Change-Id: Idd267dad0ade18cee7d5be813a57e1ee3168e2db
osmo-msc had probably forever contained a configure.ac dependency
to libosmo-sccp (that's the old static library libsccp.a), which was
only added to use a single header file (sccp_types.h). This file
has recently been migrated to libosmo-sigtran, as libsccp.a
has been removed.
Change-Id: Ifcdad8684614c95982b6b471a5585dd42a7fb897
Make sure we wait for Assignment responses before dispatching an
Assignment Request towards RAN.
In particular, when the remote call leg sends its codecs, we may trigger
Re-Assignment to match that codec. Make sure this is done only once:
when receiving another SDP message, wait for the first Assignment.
Implement as an osmo_timer, since there still is no osmo_fsm
implementation for Assignment nor for CC trans FSM. Also it doesn't
belong in the msc_a FSM (it should remain in state COMMUNICATING).
Without this patch, new ttcn3 test TC_lu_and_mo_call_reass_for_mt_codec
sporadically fails, if MNCC with SDP falls in-between Assignment Request
and Assignment Complete.
Related: osmo-msc d767c73a1f == I8760feaa8598047369ef8c3ab2673013bac8ac8a
Related: osmo-ttcn3-hacks I402ed0523a2a87b83f29c5577b2c828102005d53
Change-Id: I0f1e1a551aed545b555b9f236fc5967b1e4cc940