aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-01-19HO: add handover algo 2 parameters; skip HO 1 if HO 2 is configuredNeels Hofmeyr1-12/+217
Change-Id: I8811ee8a75be09048042b511ee4bd9bc1de63976
2018-01-19Correctly set T3105 for ipaccess BTS typeAndreas Eversberg2-3/+3
The given value is 10 * ms, so 13 is used instead of 128. If T3105 is set at config to something greater 0, it is used instead of the default value. Adjusst nanobts_omlattr_test.c accordingly. Change-Id: I3d9687619ba4de35f5d2eff3026d903534b2bbd4
2018-01-19HO prep: introduce per-BTS handover config, with defaults on net nodeNeels Hofmeyr2-0/+290
It is desirable to allow configuring handover for each individual network cell. At the same time, it is desirable to set global defaults. Treat the 'network' node handover parameters as global defaults, add another set of parameters for each individual BTS. This raises questions on how the 'network' node should affect the individual BTS. The simplistic solution would have been: on creating a BTS in the config, just copy the current defaults; with serious drawbacks: - tweaking any parameter in the telnet VTY on network node will never affect any running BTS. - network node defaults *must* be issued before the bts sections in the config file. - when writing a config back to file, we would copy all net node defaults to each BTS node, making the network node configs pointless. Instead, add a handover_cfg API that tracks whether a given node has a value set or not. A bts node ho_cfg gets a pointer to the network node config and returns those values if locally unset. If no value is set on any node, use the "factory" defaults, which are hardcoded in the API. Only write back exactly those config items that were actually issued in a config file / on the telnet VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if we so desire in the future.) Implement ho parameters as an opaque config struct with getters and setters to ensure the tracking is always heeded. Opaqueness dictates allocating instead of direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts. This is 100% backwards compatible to old configs. - No VTY command syntax changes (only the online help). - If a 'bts' sets nothing, it will use the 'network' defaults. - The 'show network' output only changes in presence of individual BTS configs. On 'show network', say "Handover: On|Off" as before, iff all BTS reflect identical behavior. Otherwise, output BTS counts of handover being enabled or not. Use the same set of VTY commands (same VTY cmd syntax as before) on network and BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure out which ho_cfg to modify. For linking, add handover_cfg.c (the value API) in libcommon, while the handover_vty.c is in libbsc. This is mainly because some utility programs use gsm_network and hence suck in the ho stuff, but don't need the VTY commands. Review the VTY online help strings. Add VTY transcript test for handover options, testing config propagation from network to bts nodes, 'show network' output and VTY online help strings. (Needs recent addition of '... !' wildcard to osmo_interact_common.py.) I considered leaving parts of this more readable, but in the end decided for heavy use of macros to define and declare the API, because more values will be added in upcoming patches and I want to prevent myself from messing them up. Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level Depends: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 (osmo-python-tests) Change-Id: I79d35f6d3c0fbee67904378ad7f216df34fde79a
2018-01-16Move BTS selection for paging from osmo_bsc_grace.c into osmo_bsc_bssap.c.Stefan Sperling2-5/+14
We can now either page an invidual BTS directly or page several BTS in a given location area. This decision is taken based on the contents of the cell identifier list in the paging request. Select a set of BTS for paging while processing the cell identifier list, rather than requiring the paging layer to loop over all BTS in the MSC. This change requires some adjustment in bssap_test. In particular, this test must now add a BTS to its network in order to pass. The purpose of this change is to make the layering a bit cleaner. There is one functional change: We no longer abort paging if paging fails for a particular BTS. Instead, we keep trying to page on other BTS. Change-Id: Ic1c72c7f83e53988eb9fedf314b1dc459836833d Suggested-by: Harald Welte Depends: Ic7772e75c3d7fb0df6e17e118bb33b3248352d4d Related: OS#2753
2018-01-15Make libcommon, libcommon-cs, libfilter, utils depend on mgcp/sigtranHarald Welte1-0/+1
The stow-enabled jenkins builds are currently failing like below: make[3]: Entering directory '/build/src/libcommon' CC bsc_version.o CC common_vty.o CC debug.o CC gsm_data.o In file included from debug.c:34:0: ../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory #include <osmocom/sigtran/sccp_sap.h> ^ compilation terminated. In file included from common_vty.c:27:0: ../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory #include <osmocom/sigtran/sccp_sap.h> ^ compilation terminated. In file included from gsm_data.c:37:0: ../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory #include <osmocom/sigtran/sccp_sap.h> ^ compilation terminated. Let's make sure the common gsm_data.h have all required CFLAGS to compile. Change-Id: I30b75db6ffba227b05b5413b84b15f69e0c213f2
2018-01-11Implement support for paging by LAI.Stefan Sperling2-3/+13
Also, parse the complete cell identifier list for both LAC and LAI. Change-Id: Ic3c62ff0fccea586794ea4b3c275a0685cc9326e Related: OS#2751
2017-12-27Migrate from OpenSSL to osmo_get_rand_id()Max1-1/+0
This avoids potential licensing incompatibility and makes integration of Debian packaging patches easier. The libosmocore version requirements are fine already but for jenkins tests to pass we have to have Ic77866ce65acf524b768882c751a4f9c0635740b merged into libosmocore master. Change-Id: Ia57bf1300525cf3c247284fe966b1c415c2d53e2 Related: OS#1694
2017-12-23bsc_test.c: Use proper network/bts/lchan structuresHarald Welte1-4/+4
don't mock them, simply call the respective functions to get a gsm_network and a gsm_bts with all its subordinate members. Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
2017-12-19remove libosmo-sccp dependency for osmo-bscHarald Welte1-2/+0
libosmo-sccp is the old sccp-lite-focused SCCP implementation that we used before libosmo-sigtran was created. The new osmo-bsc in this repository is using libosmo-sigtran and shouldn't be using parts of libosmo-sccp anymore. We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat, which is not even built in this repository anymore (or 'again yet'?) Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d
2017-12-19Remove dead code left over from NITB splitHarald Welte17-158/+4
There still is a lot of dead code that we inherited from the NITB days, let's remove more of it. libtrau will be re-introduced as part of osmo-mgw later. Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8
2017-12-19Remove unneeded .py scriptsMax2-10/+2
The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py are not BSC-specific: leftovers from repository split which are now available in osmo-python-tests as well. Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1
2017-12-18Fix tests after rate_ctr changeMax2-48/+62
Recent change lin libosmocore disallow registering rate_ctr with the same name and indexing multiple times. To accommodate to this: * allocate network struct once and use it for all tests * deregister rate_ctr group after each test * free bts struct after each test Related: OS#2757 Change-Id: Ie1537a1ee9ee812eaaf9f58dc4bc86d4add8c31f
2017-12-12Generate SI2bis Rest OctetsMax1-1/+1
According to the spec it's an empty 1-byte element reserved for future extension but we still have to generate padding properly. Add stub function similar to the used for SI2ter and adjust test output accordingly. Related: OS#2711 Change-Id: I3c278c57880a173df3c4648c9724339d23ce94fd
2017-12-11Generate SI2ter Rest OctetsMax1-1/+1
Previously we simply omitted SI2ter Rest Octets which is spec violation which lead to 'Malformed Packet' error in Wireshark RSL dissector. Fix this by generating empty 'no rest octets' with proper padding. Adjust test output accordingly. Change-Id: Ie4419aaaf93a462f501f8d8f7bf2677d37c58f94 Fixes: OS#2711
2017-12-10OML: expand status reporting checksMax2-0/+2
* check GPRS state: if GPRS is enabled for the BTS but NSE, CELL or both NSVC are locked than report it as degraded * check TRX usability: use already available function to check that TRX is actually usable when reporting OML status via CTRL * fix tests linking: libbsc is using gsm48_create_mm_serv_rej() which is defined in libcommon-cs but neither libbsc itself nor tests using it are actually linked against libcommon-cs Related: OS#2486 Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc
2017-11-24tests: Fix selection of python versionPau Espin Pedrol3-4/+4
According to documentation (and personal experience), AM_PATH_PYTHON selects the highest version of python, no matter if major version is different, which means if both python2 and 3 are available, 3 will be chosen an PYTHON will point to "/.../python" which is python3. Apparently, the macro cannot be easily used to pick highest python2 version. As {vty,ctrl}_test_runner.py require python2 and are incompatible with python3, let's instead rely on the system having a "python2" binary available, which is the case in most distros. Change-Id: Id22e157d1bee453babdfa7ed04c506390b0f17bb
2017-11-07fix build: bssap test broke by undefined referencesNeels Hofmeyr1-0/+3
After the bssap test in Ie934c5d229140a89763bf2efff86d6a3766cd351, the subsequent commit Ia2882b7ca31a3219c676986e85045fa08a425d7a was not tested against the latest head, and its breaking bssap_test was not caught. Fix current master of osmo-bsc's 'make check' target: add osmo_bsc_mgcp.c and libosmo-mgcp-client dependencies to bssap_test linkage. Change-Id: I28719d267452f66d65581c43433e24a9f46cf7dc
2017-11-07bssap: paging: page entire BSS for unimplemented cell id listNeels Hofmeyr6-0/+200
3GPP TS ยง 08.08 defines various types of Cell Identifier List IEs, but we only implement "entire BSS" and "one LAC". If the MSC sends a Cell Identifier List that we don't implement, it is best for interoperability to page the entire BSS and post a log message instead of rejecting the paging altogether. Apart from resource management, it is not harmful to page more than the MSC requested; if use of resources becomes an issue, the log message will guide towards the solution of providing an actually implemented Cell Identifier List IE. Upon IE length that is other than we expect, log the error, but also fall back to paging the entire BSS. Overall message length correctness has been checked earlier. The particular case observed is that a Huwaei MSC sends a LAI for Cell Identifier List (MCC+MNC in bcd, followed by a LAC), parsing of which we may want to add later. Improve logging: identify the subscriber that is being paged. Coding style: use a switch() statement to clarify flow and provide a place to add more implementations later. Add regression test bssap_test.c: fabricates BSSAP Paging messages with the two implemented Cell Identifier List IEs as well as the unimplemented LAI identifier, verify the resulting paging LAC in wrapped function and stderr. Change-Id: Ie934c5d229140a89763bf2efff86d6a3766cd351
2017-10-24nanobts_omlattra_test: Initialize logging before executing testsHarald Welte1-0/+3
... the library code we call could want to log something, after all. Change-Id: Ic01e9bfb63d7b6def9432103e744c23c90f0f6b9
2017-10-24Fix nanobts_omlattr unit testHarald Welte1-0/+1
The test clearly fails unless bts->network is set correctly. Not sure why this hasn't shown up before? Change-Id: I47786ed06ff610213d7a0b56d0ebf1c537cd7568
2017-10-11SI1q: fix EARFCN appenderMax1-7/+13
Previously if we ran out of space while adding EARFCN, we simply return which might result in malformed SI2q. Fix it by proper rollback of entire EARFCN. While at it, let's be paranoid and introduce extra checks against integer overflow in budget calculations. Change-Id: I4b2aa3825e9affb6dfeadecdf24dd1a43a92b7b7 Related: OS#2357
2017-10-10SI2q: fix generation for multiple UARFCNsMax1-16/+14
* fix insert routine to keep the list sorted by UARFCN * fix rest octets generator to properly account for offset * adjust test results accordingly Change-Id: I443c5c5f937b490578354f3c8a0c5b92629f2794 Related: OS#2357
2017-10-02Fix repo split aftermathMax2-9/+6
* remove checks for non-existent tests * always enable bsc and nat-trie tests because both are built unconditionally * enable gsm0408 test which was removed by mistake * adjust gsm0408 test output to remove SMS-related results Change-Id: I73ad079a6333ba56e73b7c4d1d0e9c8255c2a03b Related: OS#2257
2017-10-01gsm0408_test: Verify that BA-IND is 0 in SI2xxx and 1 in SI5xxxHarald Welte2-4/+70
This adds a test case to explicitly verify the BA-IND is as expected by the behaviour introduced in Change-Id I1cd0dc51026dcd0e508e63eea4e333e6b184787a Related: OS#2525 Change-Id: I3e5b260af97ce96a221e4d51f6c1b41d58817a59
2017-10-01Make sure BA-IND in all SI2xxx is '0' and in all SI5xxx is '1'Harald Welte1-89/+89
In masurement reports sent by the MS, this can then be used to correlate if a given measurement report was in response to a BCCH/neighbor list received on BCCH (SI2xxx) or on dowlink SACCH (SI5xxx). Closes: OS#2525 Change-Id: I1cd0dc51026dcd0e508e63eea4e333e6b184787a
2017-09-26Remove unneeded dbi dependencyPau Espin Pedrol4-5/+0
Most probably a leftover from openbsc git Change-Id: I230564b6a6ad244ec6328a99a1c3dbd9bc5521ae
2017-09-25Further cleanup leftovers from BSC/MSC splitMax1-28/+0
* drop unused header * fix name of jenkins test * remove dead code Change-Id: I986904864741995910b6ba92173b9f7b1b03e2f1
2017-09-11fix vty tests: vty no longer goes to parent node implicitlyNeels Hofmeyr1-22/+0
Fix three instances of VTY tests working because it used to include implicit 'exit' commands to the parent node. Since libosmocore change-id Id73cba2dd34676bad8a130e9c45e67a272f19588 = commit d64b6aed235f6e4d84a2cb8e84b32c3179260254, we no longer do this implicit-exit in interactive VTY shells. *) in testPingPongConfiguration, the intention is to enter the /msc 0 node. Drop prior entry of the 'network' node, which looks like an oversight. So far the 'msc 0' caused an implicit 'exit' and thus worked, now fails. *) Two instances following comments "# Check searching for outer node's commands", which look like they are intended to check for this implicit-exit behavior. This is obsolete, drop those parts of the tests. Change-Id: I77931d6a09c42c443c6936000592f22a7fd06cab
2017-09-06move include/openbsc to include/osmocom/bscNeels Hofmeyr9-34/+34
Change-Id: I39e7b882caa98334636d19ccd104fd83d07d5055
2017-09-03configure.ac: remove --enable-osmo-bsc, --enable-natHarald Welte1-10/+1
This is the OsmoBSC project. Disabling the build of the BSC would be somewhat odd, so let's remove the option. Also, OsmoBSC depends on libosmo-sccp now, so we must unconditionally depend on it. As a result, we can remove the --enable-nat option, as this was only to avoid a mandatory libosmo-sccp requirement in historical times. Change-Id: Icfee8a904d33b7c13ab8d185d64fb5c2337d8640
2017-08-30split off osmo-bsc: remove files, apply buildNeels Hofmeyr80-37840/+5
Change-Id: I64d84c52f6e38e98144eb9be8f0ab82e0e1f6cca
2017-08-30msc_vlr tests: add IMEISV testsNeels Hofmeyr6-48/+1324
Change-Id: I752afef2ae3ce04e813c7e9fea0e883e607c0e14
2017-08-30move to osmo-mgw.git: osmo-bsc_mgcp and libmgcp as libosmo-legacy-mgcpNeels Hofmeyr16-3277/+19
Rewire build and includes to libosmo-legacy-mgcp. Drop osmo-bsc_mgcp and related python tests, now found in osmo-mgw.git. libosmo-legacy-mgcp is installed from osmo-mgw, hence add the dependency to jenkins.sh (so far using the pre_release branch). Change-Id: Ic99d681759edce11564da62500c2aac5cf5fffe2
2017-08-30cosmetic: msc_vlr_tests: drop unused varNeels Hofmeyr1-1/+0
Change-Id: I584c0dfffe005597563dbd72fad8a087c554ba3d
2017-08-30move libiu to osmo-iuh/libosmo-ranapNeels Hofmeyr4-33/+23
Remove libiu here, use the functions from libosmo-ranap instead, by applying the ranap_ / RANAP_ prefix. Corresponding change-id in osmo-iuh.git is I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0 To be able to run the msc_vlr tests for RAN_UTRAN_IU without Iu client headers available, add iu_dummy.h, containing mere function signatures that match iu_dummy.c and a mostly empty struct ranap_ue_conn_ctx. Make sure we can build with and without --enable-iu: include osmo-iuh headers only with --enable-iu. Change-Id: Ib8c4fcdb4766c5e575618b95ce16dce51063206b
2017-08-30Implement AoIP, port to M3UA SIGTRAN (large addition and refactoring)Philipp Maier21-19/+433
This was originally a long series of commits converging to the final result seen in this patch. It does not make much sense to review the smaller steps' trial and error, we need to review this entire change as a whole. Implement AoIP in osmo-msc and osmo-bsc. Change over to the new libosmo-sigtran API with support for proper SCCP/M3UA/SCTP stacking, as mandated by 3GPP specifications for the IuCS and IuPS interfaces. From here on, a separate osmo-stp process is required for SCCP routing between OsmoBSC / OsmoHNBGW <-> OsmoMSC / OsmoSGSN jenkins.sh: build from libosmo-sccp and osmo-iuh master branches now for new M3UA SIGTRAN. Patch-by: pmaier, nhofmeyr, laforge Change-Id: I5ae4e05ee7c57cad341ea5e86af37c1f6b0ffa77
2017-08-27sgsn_test: Fix wrong definition of wrap funcPau Espin Pedrol1-5/+5
Commit 058cd573d8 added 2 new pointer parameters to gprs_subscr_request_auth_info, but forgot to update wraps of the function in sgsn_test. I catched this today because openbsc build test sgsn_test was failing. Closed look up to the logs showed: Assert failed (auts != NULL) == (auts_rand != NULL) openbsc/openbsc/src/gprs/gprs_subscriber.c:791 Change-Id: Ie9e4af6da0339536fb20ca0b7bbcf6f485bd522c
2017-08-27Migrate from gprs_apn_to_str() to libosmocore osmo_apn_to_str()Harald Welte2-96/+2
In 2015, Jacob moved/copied related functions to libosmocore, but for some reason didn't remove the copies here. Let's follow-up on that and remove duplicated code. The libosmocore commit introducing osmo_apn_to_str() was 8114294bf29ac6e44822c0ae43d4b0819f11b022 Change-Id: I7315ffcbed8a54cca2056f313bb7783ad82d0ee9
2017-08-27libcommon: Fix log output for bts>0.Alexander Chemeris3-5/+36
Fixes regression probably introduced in c696cc28. For bts>0 logging doesn't show bts number correctly when printing lchan identification string - it will always show it as "bts=0". The reason for this is that the identification string is cached before bts->nr value is set to a proper value. This patch sets bts->nr as part of the first step of the bts structure initialization, before caching happens thus making sure the cached identification string is cached with the correct values. Change-Id: I61c18a7f021fcb1ec00d34a745f4e3ab03416c2d
2017-08-27libmsc: update database to accomodate SMS status-report fieldsPablo Neira Ayuso1-0/+1
SMPP DELIVER_SM messages with esm_class = Delivery Receipt need to send this message reference (that the mobile phone allocates) to the ESME. Thus, the ESME propagates it via SUBMIT_SM with esm_class = Delivery Acknoledgment so that the SMSC sends the GSM 03.40 status-report to the origin including this. Given this field is useful for status-reports, we need to store it in the HLR database. Moreover, we need a new field that specifies if the entry represents a SMS status-report, to do the right handling from the gsm411_send_sms() - such new handling comes in a follow up patch entitled "libmsc: handle delivery ack via SMPP SUBMIT SM / send GSM 03.40 status report". This patch includes the migration routines to the new database schema revision 5, it's quite a bit of dbi boilerplate code - copied-pasted and adapted. Change-Id: I7276d356d805a83ebeec72b02c8563b7135ea0b6
2017-08-27examples/sgsn: Use osmo-hlr with auth-policy remote by defaultDaniel Willmann1-1/+1
For the vty tests, add osmo-sgsn-accept-all.cfg (that does not need an HLR) and use in vty_test_runner.py, otherwise the 'show sgsn' command will reply that it could not connect to the HLR, failing the vty test which expects empty. Change-Id: Ie3b2013198d3e2b780a4e31c36b89b58129dcacd
2017-08-2704.08: log protocol discriminators and message types by nameNeels Hofmeyr10-901/+915
On incoming 04.08 messages, we log only the protocol discriminator in decimal. Enhance: log pdisc and message type in hex, and also log the protocol and message type as human readable string. Also adjust the msc_vlr tests' log statements for wrapped rx/tx functions of dtap from/to the MS. Adjust the expected output of msc_vlr_tests. Change-Id: Ida205d217e304337d816b14fd15e2ee435e7397d Depends: libosmocore change-id I0fca8e95ed5c2148b1a7440eff3fc9c7583898df
2017-08-27fix msc_vlr tests after libosmocore uses localtime for SMSNeels Hofmeyr1-2/+2
libosmocore change-id I4efdb1eaae43aced33961b64d4f14b0040321c10 changes the gsm340_gen_scts() from gmtime to localtime, meaning that by feeding a mere zero as timestamp, we get different results depending on the local machine's timezone setting. Instead of calling gsm340_gen_scts() with zero, simply write a bunch of bytes as time so that the tests get identical SMS bytes every time. Change-Id: I8a50e8963dce80609749571b61fc6ffe1c54660c
2017-08-27Implement IuCS (large refactoring and addition)Neels Hofmeyr25-1509/+2192
osmo-nitb becomes osmo-msc add DIUCS debug log constant add iucs.[hc] add msc vty, remove nitb vty add libiudummy, to avoid linking Iu deps in tests Use new msc_tx_dtap() instead of gsm0808_submit_dtap() libmgcp: add mgcpgw client API bridge calls via mgcpgw Enable MSC specific CTRL commands, bsc_base_ctrl_cmds_install() still needs to be split up. Change-Id: I5b5b6a9678b458affa86800afb1ec726e66eed88
2017-08-27mscsplit: various preparations to separate MSC from BSCNeels Hofmeyr11-72/+36
Disable large parts of the code that depend on BSC presence. The code sections disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of adding the A-interface. Don't set msg->lchan nor msg->dst. Don't use lchan in libmsc. Decouple lac from bts. Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication: Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to different interfaces depending on the actual subscriber connection. While iu_tx() is going to be functional fairly soon, the a_tx() is going to be just a dummy for some time (see comment). Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer and an indicator for the Integrity Protection status on Iu (to be fully implemented in later commits). Add lac member to gsm_subscriber_connection, to allow decoupling from bts->location_area_code. The conn->lac will actually be set in iu.c in an upcoming commit ("add iucs.[hc]"). move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi(). libmsc: duplicate gsm0808 / gsm48 functions (towards BSC). In osmo-nitb, libmsc would directly call the functions on the BSC level, not always via the bsc_api. When separating libmsc from libbsc, some functions are missing from the linkage. Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also add a _tx to gsm0808_cipher_mode(): * add msc_gsm0808_tx_cipher_mode() (dummy/stub) * add msc_gsm48_tx_mm_serv_ack() * add msc_gsm48_tx_mm_serv_rej() Call these from libmsc instead of * gsm0808_cipher_mode() * gsm48_tx_mm_serv_ack() * gsm48_tx_mm_serv_rej() Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places. Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC, this will be done with an external MGCP gateway. Remove LCHAN_MODIFY from internal MNCC state machine. Temporarily disable all paging to be able to link libmsc without libbsc. Skip the paging part of channel_test because the paging is now disabled. Employ fake paging shims in order for msc_vlr_tests to still work. msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values for return val, to avoid dependency on libbsc headers. Make callable from other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c add gsm_encr to subscr_conn move subscr_request to gsm_subscriber.h subscr_request_channel() -> subscr_request_conn() move to libmsc: osmo_stats_vty_add_cmds() gsm_04_08: remove apply_codec_restrictions() gsm0408_test: use NULL for root ctx move to libbsc: gsm_bts_neighbor() move to libbsc: lchan_next_meas_rep() move vty config for t3212 to network level (periodic lu) remove unneccessary linking from some tests remove handle_abisip_signal() abis_rsl.c: don't use libvlr from libbsc gsm_subscriber_connection: put the LAC here, so that it is available without accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of transition: Iu and A will use this new field to pass the LAC around, but in a completely separate OsmoBSC this is not actually needed. It can be removed again from osmo-bsc.git when the time has come. Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall be added in osmo-bsc once the A-Interface code has settled. See OS#2389. Related: OS#1845 OS#2257 OS#2389 Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-08-27vlr: LU FSM: enable Retrieve_IMEISV_If_RequiredNeels Hofmeyr11-50/+51
Change-Id: I121b95ad6d5ecb7603815eece2b43008de487a8a
2017-08-27osmo-nitb: change default db name to sms.dbNeels Hofmeyr1-1/+1
libvlr now delegates subscriber management to osmo-hlr, so the database no longer represents a HLR. It basically only stores SMS, so reflect that fact in the default database name. Change-Id: I3289d68d3eb63aff940b48a25b584d5e83cd0197
2017-08-27Add msc_vlr test suite for MSC+VLR end-to-end testsNeels Hofmeyr32-0/+14774
Change-Id: If0e7cf20b9d1eac12126955b2f5f02bd8f1192cd
2017-08-27Use libvlr in libmsc (large refactoring)Harald Welte18-839/+400
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of trial-and-error development collapsed in one patch. This may be split in smaller commits if reviewers prefer that. If we can keep it as one, we have saved ourselves the additional separation work. SMS: The SQL based lookup of SMS for attached subscribers no longer works since the SQL database no longer has the subscriber data. Replace with a round-robin on the SMS recipient MSISDNs paired with a VLR subscriber RAM lookup whether the subscriber is currently attached. If there are many SMS for not-attached subscribers in the SMS database, this will become inefficient: a DB hit returns a pending SMS, the RAM lookup will reveal that the subscriber is not attached, after which the DB is hit for the next SMS. It would become more efficient e.g. by having an MSISDN based hash list for the VLR subscribers and by marking non-attached SMS recipients in the SMS database so that they can be excluded with the SQL query already. There is a sanity limit to do at most 100 db hits per attempt to find a pending SMS. So if there are more than 100 stored SMS waiting for their recipients to actually attach to the MSC, it may take more than one SMS queue trigger to deliver SMS for subscribers that are actually attached. This is not very beautiful, but is merely intended to carry us over to a time when we have a proper separate SMSC entity. Introduce gsm_subscriber_connection ref-counting in libmsc. Remove/Disable VTY and CTRL commands to create subscribers, which is now a task of the OsmoHLR. Adjust the python tests accordingly. Remove VTY cmd subscriber-keep-in-ram. Use OSMO_GSUP_PORT = 4222 instead of 2222. See I4222e21686c823985be8ff1f16b1182be8ad6175. So far use the LAC from conn->bts, will be replaced by conn->lac in Id3705236350d5f69e447046b0a764bbabc3d493c. Related: OS#1592 OS#1974 Change-Id: I639544a6cdda77a3aafc4e3446a55393f60e4050
2017-08-27fix make distcheck with python testsNeels Hofmeyr2-2/+2
- bscs.config needed by the vty tests was not picked up as a dist file, because its suffix is not 'cfg'. Rename to *.cfg. Apply this rename in vty_test_runner.py and osmo-bsc_nat.cfg. - Remove restart counters after external tests, otherwise distcheck complains about uncleaned files. - Add contrib/ipa.py to EXTRA_DIST, hence add a Makefile.am to contrib/. Otherwise the python tests cannot find that dependency. Change-Id: I42b55cb1125099afc3a8e3f87c0e398426b2e2a9