aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-09-12Install sample cfg file to /etc/osmocompespin/systemdPau Espin Pedrol2-0/+9
Change-Id: I19f3755f7637dfc017a89f503831f7df8098a919
2018-09-10Install systemd services with autotoolsPau Espin Pedrol7-3/+31
Change-Id: I3a87d5ad4cb43efdcfc25828144f825f4d3b1594
2018-08-23cosmetic: mute "COMPLETE_LAYER_3 not permitted"Neels Hofmeyr4-13/+8
For networks without Authentication, the conn is already accepted when SUBSCR_CONN_E_COMPLETE_LAYER_3 is emitted. Mute that misleading error message. All is actually fine. Adjust expected test logs. Change-Id: I2d19d0a7cf3226ee1456f75a68e007ba98232402
2018-08-20use __FILE__, not __BASE_FILE__Neels Hofmeyr2-9/+9
The intention was to use the file's basename, but __BASE_FILE__ means "the root file that is being parsed and contains #include statements". If we had a function using __BASE_FILE__ and that was defined in an #included file, __BASE_FILE__ would indicate the first file where the #include is, and not the file where the function is defined. __BASE_FILE__ works for us because we don't ever include function definitions that log something, so __BASE_FILE__ always coincides with __FILE__ for our logging; but still __BASE_FILE__ is semantically the wrong constant. Related: OS#2740 Change-Id: I1c8122c909938daaf782468c1c5b0262d555c3ce
2018-08-17msc: Set talloc ctx for osmo_signal structuresPau Espin Pedrol1-0/+1
Otherwise they end up in the NULL ctx. Depends: libosmocore Change-Id Id58ca18eb826b8f4183a7cf0dbb2b38cba702a09 Change-Id: I5d5b456eb85fbdb0ca2140c56ebf3d207b4a0bba
2018-08-14osmo-msc: track the use of talloc NULL memory contextsVadim Yanitskiy1-0/+3
Tracking NULL memory contexts allows one to detect memory chunks, allocated outside the application's root context, which in most cases are results of some mistake. In b874486e8e48f033204bfcc86871dd851266d440 the repotring of NULL-context state was introduced, but without asking talloc to track the use of NULL memory contexts it doesn't make sense. Change-Id: I4b5e3946ee21c7d0ed6c66b1059dbce5ad312f88
2018-08-14osmo-msc: free the VTY talloc context on exitVadim Yanitskiy1-0/+3
This is a follow up change before enabling the track of NULL talloc contexts. Since there is no other way to deinitialize libosmovty, let's free its root context on exit. Otherwise one would see lots of memory chunks on exit... Change-Id: I278f85f023210de6b4626d4493d10d20996f606a
2018-08-13osmo-msc: Improve shutdown due to signal and print talloc report on exitPau Espin Pedrol1-5/+26
Same as we do in osmo-hlr. Change-Id: If6ea9171fd79f03251342f75987690b0d9dc3814
2018-08-10libmsc/mncc_sock.c: Add lchan_type_offset in queue_hello()Keith1-0/+1
lchan_type was removed from gsm_mncc and the hello message on initial import from legacy OpenBSC in Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c This patch follows on from Change-Id: Ia02373a36df7605507ee3de49173a9fd6547b726 which reintroduced lchan_type to the gsm_mncc struct. This patch restores the lchan_type_offset to the hello protocol message Without this patch, LCR will issue an error and disconnect from the MNCC socket. Change-Id: I65312082fa5dc0721170f923840e992ef9481a63 Closes: OS#3461
2018-08-09doc: update mgw settings in example config filePhilipp Maier3-0/+6
This example configuration files lack port settings for the mgcp client. Lets explicitly assign a port for the MGW and a local port. For the local port lets use the IETF port number + 1. The reason for this is that the default config for osmo-bsc already uses the IETF port and in osmo-bsc and osmo-msc run on the same machine in many setups. Change-Id: I17453e0d30eec757aba9530b63eb5d1539cbdffc
2018-08-07mgcp: use codec information returned with ASSIGNMENT COMPL.Philipp Maier4-14/+76
When the assignment completes a choosen codec is returned. At the moment we do not use this information. - add struct members for codec info (both, RAN and CN) - parse codec info in BSSMAP ASSIGNMENT COMPLETE - use codec info on mgcp Since the MNCC API is not complete yet, we currently only use the codec info only on the internal MNCC yet. Change-Id: I9d5b1cd016d9a058b22a367d0e5e9f2ef447931a Related: OS#2728
2018-08-05RRLP: print log when sending a position requestVadim Yanitskiy1-0/+4
Change-Id: Ia2446e05f63ac219f630ab9db1ea9bf305f0a4b9
2018-08-05RRLP: migrate and share mode definitions from msc_vty.cVadim Yanitskiy3-20/+28
Change-Id: I9560e6eab0ad1b5d57ca732741fc0b6f61f1a4a2
2018-08-05RRLP: fix: actually init the RRLP signal handlersVadim Yanitskiy1-0/+3
Change-Id: I3618b4af48839d6d4b747be4eef2f57fa8f870c9 Closes: OS#3129
2018-08-05RRLP: properly name the init functionVadim Yanitskiy2-2/+2
We don't actually deal with DSO loading here... Change-Id: I24d0c9ad52f07f08176ad129878b48a591a3af6c
2018-08-05Remove local libgsupclient; Use libosmo-gsup-client from osmo-hlrHarald Welte19-808/+39
osmo-hlr has recently (as of Change-Id Iad227bb477d64da30dd6bfbbe1bd0c0a55be9474) a working shared library implementation of libosmo-gsup-client. We can remove the local implementation in osmo-msc and use the system-installed shared library instead. Change-Id: I6f542945403cf2e3ddac419186b09ec0e2d43b69
2018-08-05libmsc/gsm_09_11.c: clean up the local GSM 04.80 APIVadim Yanitskiy3-149/+13
Since we don't process SS/USSD requests in OsmoMSC anymore, there are some useless GSM 04.80 functions remained from the past. In particular, this change does the following: - removes both gsm0480_send_{ussd_response|return_error} functions because they are not used anymore; - changes symbol prefix from 'gsm0480_' to 'msc_', in order to avoid possible conflicts with the libosmogsm's GSM 04.80 API; - cleans up useless includes; Change-Id: I2990d8627bce0ce6afb1dcf6b11bb194292380d3
2018-08-04libmsc/rrlp.c: add missing includeVadim Yanitskiy1-1/+1
Change-Id: Id33c9e5c04d61d08110ae80209f73ed14a5ef59c
2018-08-04msc/rrlp.h: use #pragma once include guardVadim Yanitskiy1-5/+1
Change-Id: Ie68b2092a0a9ceae3519ab9059ac2c1e3d8d7450
2018-08-04msc/signal.h: use #pragma once include guardVadim Yanitskiy1-4/+1
Change-Id: I114026808abeff72a3f4f3cb1b84680c116409d4
2018-07-31migrate to oap_client in libosmogsmHarald Welte7-375/+11
libosmogsm in libosmocore.git from Change-Id Ie36729996abd30b84d1c30a09f62ebc6a9794950 onwards contains oap_client.c, so we don't need our local copy here in this repo anymore. Change-Id: Ib6496c35d0ce6eb531e97129dc45a9f68e503b34 Requires: libosmocore.git Change-Id Ie36729996abd30b84d1c30a09f62ebc6a9794950
2018-07-30libmsc/gsm_09_11.c: introduce counter for active sessionsVadim Yanitskiy3-0/+11
Change-Id: Ia17e7c747fffb5267d3ca5bc4193c1be4a57ef3a
2018-07-30libmsc/gsm_09_11.c: introduce rate counters for NC_SS sessionsVadim Yanitskiy3-0/+38
This change introduces some new rate counters for call-independent SS/USSD connections. As OsmoMSC doesn't handle the messages itself, and only responsible for dispatching messages between both A and GSUP interfaces, the following is taken into account: - MS-initiated and network-initiated requests to establish a NC SS/USSD session (transaction) - "nc_ss:m{o|t}_requests"; - successfully established MS-initiated and network-initiated SS/USSD sessions (transactions) - "nc_ss:m{o|t}_established". Change-Id: I23c9475abc9951d82f3342fdc5aaa367836f7741
2018-07-30libmsc/gsm_09_11.c: properly handle MS-initiated releaseVadim Yanitskiy1-2/+5
According to GSM TS 02.90, section 4.3, release of the connection used for SS/USSD is normally the responsibility of the network. But the user may also initiate connection release, e.g. by pressing the 'red button'. TTCN-3 test case: I7936ed5072ed2ae02f039dc90a1fece1e7f70a70 Change-Id: I76fc277bf9db614a97824b1541cd5bb75aa3e29d
2018-07-30libmsc/gsm_09_11.c: implement network-initiated sessionsVadim Yanitskiy5-10/+500
This change introduces a possibility to establish network-initiated SS/USSD transactions with a subscriber in either IDLE, or DEDICATED state. In the first case, a new transaction is established using Paging procedure. If a subscriber already has an active connection, a separate new transaction is established. TTCN-3 test case: I073893c6e11be27e9e36f98f11c1491d0c173985 Change-Id: Ief14f8914ef013bd6efd7be842f81fbf053f02e2
2018-07-30libmsc/gsm_09_11.c: forward SS/USSD messages to HLR over GSUPVadim Yanitskiy5-61/+223
In order to be able to support external SS/USSD gateway, we should not terminate the GSM 04.80 messages at OsmoMSC. Instead, we need to follow the GSM TS 09.11 specification, and forward all messages unhandled by OsmoMSC to OsmoHLR over GSUP protocol. This change implements forwarding of MO SS/USSD messages. The forwarding assumes transcoding between GSM 04.80 messages and GSUP messages. The payload of Facility IE is carried 'as is'. As a side-effect, this will disable the osmo-msc internal handler implementing the "*#100#" for obtaining the subscribers own phone number. In order to re-gain this functionality, you will need a modern osmo-hlr (Change-Id I1d09fab810a6bb9ab02904de72dbc9e8a414f9f9) and the following line in your osmo-hlr.cfg: hlr ussd route prefix *#100# internal own-msisdn TTCN-3 test case: I01de73aced6057328a121577a5a83bc2615fb2d4 Change-Id: Ide5f7e350b537db80cd8326fc59c8bf2e01cb68c
2018-07-29libvlr/vlr.c: forward unhandled GSUP messages towards MSCVadim Yanitskiy3-4/+20
Some internal sub-systems, such as SS/USSD or SMS implementation, may also need to use GSUP connection with HLR. Previously, it was only available within the libvlr code, and nowhere else. Let's introduce the generic GSUP message router, which will receive messages unhandled by VLR itself, and route them to a handler depending on the message type. Change-Id: Ib8146ce5788c8f249dcaa39d61bd0388574bf892
2018-07-29msc_vlr_tests: don't abuse USSD-request to conclude connectionsVadim Yanitskiy19-659/+488
Previously the '*#100#' USSD-request was abused in order to conclude the current subscriber connection. This makes the unit tests depend on each other, for example, if one break something in the GSM 09.11 implementation, a half of tests would fail. Moreover, the further changes in the GSM 09.11 implementation will make the results less predictable (i.e. session ID, etc.). So let's introduce a separate unit test with simple request- response logic, while more complex tests will be in TTCN. Change-Id: I40b4caac3113263f5a06c861dff5e10d43c319b5
2018-07-26cosmetic: typos in log and commentNeels Hofmeyr1-6/+6
Change-Id: I2416d9a45e88f4317aa8e6644f5581a6f4f119c8
2018-07-26Iu MGCP: no need to loopback on the cn sideNeels Hofmeyr1-8/+0
Change-Id: I501a7846c76dd703beb3991362b1ccbd62dfd155
2018-07-26vlr_access_req_fsm.c: use osmo_strlcpy and avoid compiler errorNeels Hofmeyr1-2/+1
gcc 8.1.0: ../../../../src/osmo-msc/src/libvlr/vlr_access_req_fsm.c:679:3: error: ‘strncpy’ output may be truncated copying 15 bytes from a string of length 31 [-Werror=stringop-truncation] strncpy(par->imsi, mi_string, sizeof(par->imsi)-1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The Mobile Identity is a union of various kinds, but the IMSI is at most 15 digits, so truncation is "intended". I hope other layers validate the correct length of an IMSI MI. Change-Id: I0a17a188fc91e42e252ae4bf1d6cd0bf0e5eb077
2018-07-25libmsc: move L3 call-control to separate C file (gsm_04_08_cc.c)Harald Welte4-2066/+2142
The CC sub-layer is fairly self-contained, so let's move it to a separate C source file. The old gsm_04_08.c file now only contains the 04.07 / DTAP core and MM sub-layer handling. I did this initially as an experiment to see how self-contained our CC implementation really is. Given this rather straight-forward patch builds fine, CC really is self-contained (yay!). Change-Id: Idb8dd7a8d9d8b4a28c492f12da3cc3305b695cca
2018-07-24git-version-gen: Don't check for .git directoryDaniel Willmann1-2/+2
This check is not in all our repos that use git-version-gen. Indeed it seems to be a leftover of openbsc where I think it wanted to ensure being called in the openbsc subfolder or something? libosmocore e.g. doesn't have it. In any case .git being a directory is not always true (if using git worktree) so remove this check. Change-Id: I9d895fa90991d47e9626a8e7fa701540b658194c
2018-06-27configure.ac: drop unused dependenciesVadim Yanitskiy1-12/+0
Change-Id: I82083c33b0448113c74b21ed6c51cda121bc9f79
2018-06-25VLR: reject overlong IMSIs in ID RESP messagesStefan Sperling1-2/+13
Overlong IMSIs in ID RESP messages were accepted and used in truncated form. Log an error when truncation occurs, and prevent truncated IMSIs from being installed for a subscriber via ID RESP messages. Other code paths leading to vlr_subscr_set_imsi() with truncated IMSIs will only a leave a trail of log entries for now, because vlr_subscr_set_imsi() is currently unable to return an error code. Change-Id: I785c994f41a646d8d83d3d82f5a9ae6b572eb641 Related: OS#2864
2018-06-20jenkins.sh: Use --enable-werror only when iu support is disabledPau Espin Pedrol1-2/+5
The flag cannot be enabled in all cases because current osmo-iuh header contain compilation warnings which are then propagated to this project when building against them. Change-Id: I799ae49567c8e9ff7a98d296873ac0b12e926558
2018-06-17.gitignore: ignore src/libgsupclient/gsup_test_clientVadim Yanitskiy1-0/+1
Change-Id: I1edf048207aaa0ced7a6ad0ae48df3f7d2533dc1
2018-06-15msc_main: Fix typo in description of version paramPau Espin Pedrol1-1/+1
Change-Id: I553a2695aec19517b3c67f5eb5d495180e24d7e8
2018-06-12libmsc/gsm_04_80.c: make the API abstract from ss_request structVadim Yanitskiy3-28/+77
There is no need to pass a pointer to a ss_request struct when calling the gsm0480_send_ussd_* functions, because they only use both transaction ID and InvokeID from there, which may be passed directly. This change allows one to use this API without parsing the whole GSM 04.80 message, or when parsing is failed. Moreover, if InvokeID is not available, one can pass any incorrect, (e.g. negative) value, so the universal NULL tag will be used. Finally, setting a TI flag is also up to the caller. Change-Id: I13d5abbfdcf8238ebaf0566c420f09cd9255b648
2018-06-12libmsc/gsm_09_11.c: properly indicate transaction errorsVadim Yanitskiy1-5/+6
Previously it was intended that we are always parsing the whole GSM 04.80 message, including the Invoke ID. But there is no need to do that, since we are going to forward the Facility IE payload to HLR in near future. Moreover, there was a mistake (my bad) - transaction is being established before parsing of the message, so the req structure remains uninitialized until that. Let's just send RELEASE COMPLETE message without any Cause or Facility IEs. We could indicate a problem using the first one, but according to GSM TS 04.80, the Cause IE only makes sense when "its functional handling is specified in the service description or GSM TS 09.11". Change-Id: Iecba2dccada9bbcdeb3a9dfd868719aeedc07022
2018-06-12libmsc/gsm_04_08.c: expose gsm48_tx_simple()Vadim Yanitskiy2-4/+10
This function could be also used by other parts of code, e.g. by gsm_04_11.c or by gsm_09_11.c, during initialization of a new transaction. No need to hide it. Change-Id: I9a9d17fca4901163dae10d76455aa4cf54497156
2018-06-12Use proper naming for GSM TS 09.11 implementationVadim Yanitskiy6-15/+16
During a long time, we had both file and symbol names, actually related to Supplementary Services, with the 'ussd' abbreviation. This is not absolutely wrong, but isn't correct at the same time. USSD is a kind of Supplementary Services, this is only a part of them. There are also 'structured' Supplementary Services, which can be call related or call independent. The "Signalling interworking for supplementary services" is defined by GSM TS 09.11, and this is exactly what MSC should implement. Let's use the specification number for naming, as we do e.g. in the GSM 04.11 (SMS) implementation. Change-Id: Ic1eaceddb58132318e4e941be542da34b8ebefe1
2018-06-10libmsc/ussd.c: use connection ref-counting and transactionsVadim Yanitskiy8-31/+248
A subscriber may have a few active transactions at the same time. For example, one can receive SMS messages during a call, or during an active SS/USSD session. We already have connection ref-counting and transactions for CC and SMS, so let's also use both for SS/USSD. Change-Id: I21c6777cb88f1f4f80f75dcd39734e952bd4e8b0
2018-06-10libmsc: properly name the MSC_CONN_USE token for SSVadim Yanitskiy2-2/+2
Previously the MSC_CONN_USE token for Supplementary Services was called 'MSC_CONN_USE_TRANS_USSD'. Non-call related Supplementary Services is not only about USSD, so let's rename it. Change-Id: I5b3517c87a32fa64dea6b0c912f2b76c5c25a112
2018-06-08libmsc/ussd.c: FIX: properly indicate errorsVadim Yanitskiy3-8/+41
There are error and problem codes defined by GSM TS 04.80: - Error codes are used when a message is structured correctly, but something is wrong in context of the current operation. Usually they are carried by 'Return Error' component. - Problem codes are used when something is wrong with the message structure, or with carried values. They are carried by 'Reject' component. There are three groups of them (see table 3.13): - General Problem Codes (table 3.14), - Invoke Problem Codes (table 3.15), - Return Result Problem Codes (table 3.16), - Return Error Problem Codes (table 3.17). The first group is general purpose, and can be sent in response to any kind of message, excluding 'Reject' itself. Other ones are bound to specific component types, such as 'Invoke', 'Return Result' and 'Return Error'. For some reason, a 'Reject' component with the general problem code 'GSM_0480_GEN_PROB_CODE_UNRECOGNISED' was always used in OsmoMSC. Even when the message structure is correct. Let's properly indicate errors in the following way: - 'Reject' with GSM_0480_GEN_PROB_CODE_UNRECOGNISED when the gsm0480_decode_ss_request() fails to decode a message. It can only return 0 or 1, so it's hard to guess which exact part of message caused the error. - 'Return Error' with GSM0480_ERR_CODE_ILLEGAL_SS_OPERATION when the operation code is not related to USSD. - 'Return Error' with GSM0480_ERR_CODE_UNEXPECTED_DATA_VALUE when the requested USSD code is unhandled (not supported). There is a TTCN-3 testcase for this: https://gerrit.osmocom.org/9470/ Change-Id: I800e7ec98dc9d0bca2d45a8b8255d60253d63e14
2018-05-29mgcp: hack to keep IuUP workingPhilipp Maier1-0/+40
Since change If9a81d057f73150e483286472e73c45e7a453a6d removes the RTP loopback at the beginning. This also means that the Hack we do to run the IuUP negotiation via looping back the first few RTP packets will not work anymore. However, we should keep that hack as long as we do not have IuUP support in the MGW. - Start RTP connection in loopback mode for IuUP Change-Id: I4c7d90de4dc87e8baf7cf4a0c69d0e9e8c92e27b
2018-05-29mgcp: do not start connections in loopback modePhilipp Maier1-2/+2
When the MSC creates the connections for the BSS side and for the PBX Change-Id: If9a81d057f73150e483286472e73c45e7a453a6d
2018-05-23implement periodic Location Update expiry in the VLRStefan Sperling9-3/+264
Remove subscribers which fail to send periodic Location Updates from the list of subscribers known to the VLR. This complements the IMSI detach procedure: periodic LU expiry triggers an implicit IMSI detach. Expired subscribers are purged from a periodic timer which iterates over all subscribers once per minute. Subscribers with an active connection do not expire. This is controlled by the subscriber conn FSM which sets a subscriber's the LU expiry timeout value to GSM_SUBSCRIBER_NO_EXPIRATION while a connection is active. Add support for fake time with osmo_clock_gettime() to msc_vlr tests. This functionality existed in OpenBSC but was lost during the nitb split. This code took some inspiration from the OpenBSC implementation. Related: OS#1976 Change-Id: Iebdee8b12d22acfcfb265ee41e71cfc8d9eb3ba9
2018-05-18remove redundant unconditional PKG_CHECK_MODULES for libsmppStefan Sperling2-3/+1
The configure script should only check for libsmpp with --enable-smpp. Also, disable the build of smpp_mirror with --disable-smpp. Change-Id: Ic4a8a5c970c04a6257ee4c8e3977e98c4ddfda13 Fixes: a55dda703fc5e367bd58b5f9f6986d62ffbbdb6c Related: If7e1af11cdac8587bb4d66fb4eacee4b79945359 Related: OS#3232
2018-05-17a_reset: cleanup + remove dead codePhilipp Maier5-159/+59
a_reset.c/h was originally developed to be used in both, bsc and msc without changes. Unfortunately no suitable library has been found for a_reset.c/h so the file ended up as duplicated code in both split brances. Eventually we decided to specialize the generalized code again, which means some of the functions needed only by osmo-bsc are removed. - Remove dead code - Fix timer identification number (T16) - use fi->priv to hold context info - Minor cosmetic fixes Change-Id: I8e489eb494d358d130e51cb2167929edeaa12e92 Depends: libosmocore I36d221c973d3890721ef1d376fb9be82c4311378 Related: OS#3103