aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2020-04-01remove 'NAT' log categoryHarald Welte1-5/+0
This dates back to a time where osmo-bsc_nat was in the same repository, which is a long time ago. Change-Id: Id965295dfe04f8bd5ce831db70c86f67b8dc290b
2020-03-12osmo-bsc/bsc_vty: set default gprs cell bvci to 2Oliver Smith1-0/+13
Do not use 0 as default, as it is reserved for signalling. Related: OS#4408 Change-Id: I499272f16aadd89f3bdb5d749e3e4f9e07056c15
2020-03-11tests/Makefile.am: allow running only one VTY testOliver Smith1-1/+4
Add VTY_TEST variable, just like in osmo-hlr Change-Id I4ad7ddb31b2bfb668b3540cfef658417dd442375. Change-Id: Ieb08ae57bd8bb68c9a8593b3e1175eae9064ac57
2019-12-11debian, osmoappdesc.py, tests: switch to python 3osmith/fix-python3Oliver Smith2-224/+224
Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I438ca0c4b8e7957d0f347a5b2f5c4cb93f9325e6
2019-11-20bsc: Send MS Power Control msg upon max MS power changePau Espin Pedrol4-0/+5
Lots of times, the MS power class is unknown until after the first channel has been activated, at which point the MS power class is received in messages such as LU update or CM Service Requet. Since the MS Power level is sent upon CHAN ACT, the only way to communicate the change of maximum MS Power (based on MS power class) after CHAN ACT is to send a MS Power Control msg. Let's do that. Related: OS#4244 Change-Id: I3d6b75578e5cb9b2ad474a0ad01362d846ebe135
2019-11-13Fix some typosMartin Hauke2-4/+4
Fix typos and common misspellings in code comments and in the manual. Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c
2019-09-02Cell Broadcast: CBSP and CBCH scheduling supportHarald Welte1-0/+5
This adds code to handle CBSP (Cell Broadcast Service Protocol) from the CBC (Cell Broadcast Centre), as well as BSC-internal data structures for scheduling the various SMSCB on the CBCH of each BTS. There are currently one known shortcoming in the code: We don't yet verify if keepalives are received within repetition period. Change-Id: Ia0a0de862a104d0f447a5d6e56c7c83981b825c7
2019-08-13neighbor config: allow re-using ARFCN+BSIC pairsNeels Hofmeyr1-0/+2
Fix neighbor config to match OsmoBSC manual: implement the plan for neighbor configuration that was so far only described in the manual without actually being in operation. This first allows re-using ARFCN+BSIC pairs in and across BSS. So far the handover_start() code always looked for handover target cells across *all* local cells, even if they were not listed as neighbors to a source cell. Imply all cells as neighbors only as long as there are no explicit neighbors configured. As soon as the first 'neighbor' line appears in a 'bts' config, only the listed neighbors are regarded as handover target cells. (The 'neighbor-list' commands are not related to this, only the relatively new 'neighbor (bts|lac|cgi|...)' commands affect actual handover procedures.) TTCN3 tests TC_ho_neighbor_config_1 thru _7 play through the various aspects of neighbor configuration: both the legacy implicit all-cells-are-neighbors as well as allowing only explicit neighbors by config. Related: OS#4056 Related: osmo-ttcn3-hacks Ia4ba0e75abd3d45a3422b2525e5f938cdc5a04cc Change-Id: I29bca59ab232eddc74e0d4698efb9c9992443983
2019-08-13add vty 'no neighbors' to remove all HO targetsNeels Hofmeyr1-0/+25
This is required for an upcoming TTCN3 test that plays through various neighbor configurations. Related: OS#4056 Ia4ba0e75abd3d45a3422b2525e5f938cdc5a04cc (osmo-ttcn3-hacks) Change-Id: I8623ab581639e9f8af6a9ff1eca990518d1b1211
2019-07-26rest_octets: add Serving Cell Priority ParametersPhilipp Maier1-68/+68
When we add an EARFCN to to the SI2quater struct we do not add Serving Cell Priority Parameters. This essentially causes to MS to ignore the EARFCN because it is still undefined under which conditions the MS should change to LTE. Related: SYS#4510 Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
2019-07-24osmo-bsc.cfg: work with osmo-bts example cfgOliver Smith1-1/+1
Change cell_identity and unit-id to match osmo-bts-virtual.cfg. Related: OS#3369 Change-Id: Ie8001611756b661ff1871508c6248b2e990ba1d7
2019-07-09doc/manuals, vty doc: more handover doc clarificationsNeels Hofmeyr1-30/+30
Related: OS#3487 Change-Id: I1639efb2dbcca4f0e9c33a74f3067606ce5f4209
2019-07-08make bsc_clear_request() staticNeels Hofmeyr2-4/+0
bsc_clear_request() is in fact used only within gsm_08_08.c, make it static to that file. Since the gscon FSM, "real" BSSMAP Clear are sent only by gscon_bssmap_clear(). bsc_clear_request() remains in use for legacy code paths in gsm_08_08.c: - the bsc_filter, i.e. for IMSI filtering; - in move_to_msc(), from handle_cc_setup(), a code path that is in fact not entirely clear to me. It seems to be an old functionality to serve multiple MSCs? Both of which I personally haven't seen in use, are not tested and should probably be completely removed. For now contain legacy code in the static context. Adjust comment. Change-Id: Ic89d0afad42e4b11183a13d2dc6b7bbf0b822fd9
2019-06-18Re-introduce support for IPA-encapsulated MGCPHarald Welte1-0/+20
Old osmo-bsc-sccplite already supported this, but in the migration over to libosmo-sigtran and to real 3GPP AoIP, this functionality got lost. We now create a UDP proxy socket. Any MGCP commands received via IPA from MSC (or rather: bsc_nat) are retransmitted to the MGW via UDP on this socket. Any responses back from the MGW received on the UDP socket are retransmitted back to MSC/bsc_nat as MGCP inside the IPA multiplex. Closes: OS#2536 Change-Id: I38ad8fa645c08900e0e1f1b4b96136bc6d96b3ab
2019-05-03assignment_fsm: Properly support assigning signalling mode TCH/xSylvain Munaut1-1/+1
To support the 3 possible preferences, the changes needed were: - Replace 'full_rate' bool with a 3 option enum to represent the channels types for signalling - Switch from _pref/_alt to using an array sorted in preference order Originally merged as Change-Id I4c7499c8c866ea3ff7b1327edb3615d003d927d3, reverted because the change broke voice calls. Re-submitting with the fix: don't forget to set conn->assignment.requires_voice_stream. Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Change-Id: I7513d2cbe8b695ba6f031ad11560c63a6535cf2d
2019-04-30move mgw endpoint FSM to osmo-mgw.gitNeels Hofmeyr2-10/+9
osmo-mgw.git also includes fixes of the MGW endpoint FSM, for example I92a9944acc96398acd6649f9c3c5badec5dd6dcc. Depends: I9a3effd38e72841529df6c135c077116981dea36 (osmo-mgw) Change-Id: I03e6b48d9b0a5370310d5f56809259ff7909cf9d
2019-04-23use libosmocore osmo_tdefNeels Hofmeyr6-9/+3
Move the T_defs API to libosmocore as osmo_tdefs: remove the local T_defs API and use libosmocore's osmo_tdef* API instead. The root reason is moving the mgw_endpoint_fsm to libosmo-mgcp-client to be able to use it in osmo-msc for inter-MSC handover. When adding osmo_tdef, the new concept of timer groups was added to the API. It would make sense to apply group names here as well, but do not modify the VTY configuration for timers. The future might bring separate groups (or not). Depends: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5 (libosmocore) Change-Id: I66674a5d8403d820038762888c846bae10ceac58
2019-03-19codec_pref: fix special handling for AMR rate configuration (S15-S0)Philipp Maier1-6/+6
When match_codec_pref() is called and the codec selections from the ASSIGNMENT COMMAND are matched against the interal capabilities, the configurations are checked one by one. When a match is found that match is returned. However, the implementation currently does not check the AMR S15-S0 bits when the actual matching happens. This is done afterwards in case AMR gets picked. Unfortunately if the MSC implementation is not obeying the settings the MSC has previously communicated in the L3 COMPL message we may end up with an S15-S0 configuration that has all rate selection (which eventually end up as active set in RSL) bits set to zero. This is an invalid configuration and should be prevented. Also the handling of the S15-S0 bits should happen as part of the matching so that there is a chance to try the nect codec in the list if AMR is unuseable. Also S15-S0 has one special setting "Config-NB-Code = 1" (S1 = 1). When this bit is set, the four (in HR only three) most common rates are selected into the active set. If there are also other S-bits set besides S1 we should prefer S1 and discard the other bits. - Perform handling of S15-S0 while matching - If S1 is set, prefer this setting and discard all other settings Change-Id: Ie52376b51fe07ed07056e8df2e9557293ff67a78 Related: SYS#4470
2019-03-14Revert "assignment_fsm: Properly support assigning signalling mode TCH/x"Neels Hofmeyr1-1/+1
This commit breaks voice channel assignment. It results in the Assignment Complete sent to the MSC for a voice lchan lacking AoIP Transport Layer Address, Speech Version and Speech Codec. Hence the MSC cannot complete the Assignment for a voice call. Let's revisit this patch, test thoroughly and re-merge later. This reverts commit 4d3a21269b25e7164a94fa8ce3ad67ff80904aee. Reason for revert: <INSERT REASONING HERE> Change-Id: I72aaa03539919e7e85b5b75b133326cec5e68bc9
2019-03-14Move msc related code from gsm_data to bsc_mscPau Espin Pedrol1-0/+1
This way ipaccess utils can be built without requiring libosmo-sigtran. Change-Id: I508188896be58ddc3bd4e9c3c661c258c06866f4
2019-03-14assignment_fsm: Properly support assigning signalling mode TCH/xSylvain Munaut1-1/+1
To support the 3 possible preferences, the changes needed were: - Replace 'full_rate' bool with a 3 option enum to represent the channels types for signalling - Switch from _pref/_alt to using an array sorted in preference order Change-Id: I4c7499c8c866ea3ff7b1327edb3615d003d927d3 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-03-11handover_fsm: copy old S15_S0 to new lchanPhilipp Maier1-2/+3
When a new lchan is selected during handover, some of the properties of the old lchan are inherited by the new lchan. At the moment S15-S0 is not not inherited so that the value for those bits will always be 0x0000 for the new lchan. Since those bits also define the active set AMR codec the channel activation will fail because 0x0000 is invalid (active set with zero rates) Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2 Related: OS#3503
2019-02-21assignment_fsm: fix channel allocator preferencesPhilipp Maier1-5/+3
When the MSC allocates a channel through the ASSIGNMENT REQUEST, it may ask for a TCH/H and a TCH/F at the same time and tell which of the two types it prefers. The process of channel allocation currently selects, based on the BTS, MSC and MS capabilites exactly one apropriate codec/rate (e.g. TCH/H) and then tries to allocate it. If that allocation fails, there is no way to try the second choice and the assignment fails. For example: The MSC asks for TCH/F and TCH/H, prefering TCH/F, then the channel allocator will try TCH/F and if it fails (all TCH/F are currently in use), then TCH/H is never tried. Since the BSC currently only trys the first best codec/rate that is supported it also ignores the preference. Lets fix those problems by including the preference information and both possible codec/rate settings into the channel allocation decision. Change-Id: I5239e05c1cfbcb8af28f43373a58fa6c2d216c51 Related: OS#3503
2018-12-07handover_fsm: send HANDOVER PERFORMED msg on internal hoPhilipp Maier1-0/+1
When an internal handover is done the specification demands to inform the MSC about the event. - Add sending of BSSMAP HANDOVER PERFORMED msg. Change-Id: If26e5807280e0f75a423b3b04f8e3c698c82a351 Depends: libosmocore I825106858bd89afc9837811b8fed2e8accc82441 Related: OS#3645
2018-11-21gsm0408_rcvmsg: Release lchan if L3 fails to completePau Espin Pedrol1-0/+4
gscon_release_lchans stub is added to gsm0408_test.c to make linker happy. Change-Id: I1743f9d5cd0fdbc0fb9afe7bcc0271c897915210
2018-11-20bsc: si: Fix SI2ter L2 pseudo lengthPau Espin Pedrol1-1/+1
3GPP TS 04.08 V7.21.0, section "9.1.34 System information type 2ter" states: """ This message has a L2 pseudo length of 18. This message may be sent by the network with either a L2 pseudo length of 18 or some other value. A mobile station that does not ignore this message shall not discard the message due to a received L2 pseudo length different from 18. """ Change-Id: I45cb217ebdf89b82b0f37f38eef7a1e3a651f541
2018-11-20bsc: si: Fix SI2bis L2 pseudo lengthPau Espin Pedrol1-1/+1
3GPP TS 04.08 V7.21.0, section "9.1.33 System information type 2bis" states: "This message has a L2 pseudo length of 21.". Change-Id: I623c64c446c0973e939e9f1cba0a4d4d2f4f7237
2018-11-14lchan release: always Deact SACCHNeels Hofmeyr2-1/+3
If an lchan is being released and had a SACCH active, there is no reason to omit the Deact SACCH message ever. All of the callers that passed do_deact_sacch = false did so for no good reason. Drop the do_deact_sacch flag everywhere and, when the lchan type matches and SAPI[0] is still active, simply always send a Deact SACCH message. The do_deact_sacch flag was carried over from legacy code, by me, mainly because I never really understood why it was there. I do hope I'm correct now, asserting that having this flag makes no sense. Change-Id: Id3301df059582da2377ef82feae554e94fa42035
2018-11-14fix: send RR Release (e.g. after BSSMAP Clear Cmd)Neels Hofmeyr1-1/+1
After commit [1], the code makes sure to disassociate lchan and conn before invoking the lchan release. However, we only send RR Release if a conn is present, which clearly is nonsense after [1]. [1] commit 8b818a01b00ea3daad4ad58c162ac52b4f08a5cb "subscr conn: properly forget lchan before release" Change-Id: I4fd582b41ba4599af704d670af83651d2450b1db Manage sending of RR Release via a flag, set during invoking lchan release. Add do_rr_release arg to lchan_release(), gscon_release_lchans(). In lchan_fsm.c, send RR Release only if do_rr_release was passed true; do not care whether a conn is still associated (because it won't ever be since [1]). That way we can intelligently decide what release process makes sense (whether the lchan terminates the subscriber connection or whether the connection goes on at another lchan), and still disassociate lchan and conn early. BTW, this problem wasn't caught by the stock OsmoBSC TTCN3 tests, because the f_expect_chan_rel() don't care whether an RR Release happens or not. This is being fixed by Ibc64058f1e214bea585f4e8dcb66f3df8ead3845. So far this patch should fix BSC_Tests_LCLS.TC_lcls_connect_clear. Related: OS#3413 Change-Id: I666b3b4f45706d898d664d380bd0fd2b018be358
2018-11-07constify rsl_tx_ipacc_*cx() parametersMax1-1/+1
Change-Id: Ib34c8e3fb51d067581aefa1c80f8be1f6db9512e
2018-11-06vty doc: drop "(HO algo 2 only)" stringsNeels Hofmeyr1-17/+17
These indicators are a legacy of early handover_decision_2.c work, where there were no separate handover1 and handover2 config commands. No need to restate the abundantly obvious anymore. Change-Id: Id4d29542f7dd5bd125d6f10c7783569f13092612
2018-10-30fix build: revert bad neighbor_ident.vty changeNeels Hofmeyr1-93/+1
The commit acd29192deed0e1a243b35278b030bde7b1662b5 Change-Id Ifb9212fede2333ad68db94188b5cda4fcabe02f8 introduced a bad change to neighbor_ident.vty. Revert that bit. Change-Id: I8b80be6daef73f5864ba9f294bf2134c8a76ddb5
2018-10-24lchan_fsm: generate proper multirate configuration IE on RSLPhilipp Maier1-0/+6
During the generation of the multirate configuration IE in the channel activation message that is sent over RSL, all AMR rates except the highest one are trimmed. This was to ensure that the multirate configuration IE only contains one codec rate per active set. Lets fix that and generate a proper IE with threshold and hysteresis values. - extend lchan_mr_config so that it can generate a full multirate configuration IE Change-Id: I7f9f8e8d9e2724cbe3ce2f3599bc0e5185fd8453 Related: OS#3529
2018-10-24gsm_04_08: improve gsm48_multirate_config()Philipp Maier3-0/+143
The function gsm48_multirate_config() generates the multirate configuration IE, that is sent via RSL to configure the active set of AMR codecs inside the BTS. The function already works, but it does not check the input data for consistancy. Lets add some consistancy check to make sure that inconsistant parameters are rejected. Also allow the output pointer to be NULL, so that the function can be used to perform a dry run to be able to verify parameters. - Check for invalid / inconsistant configuration parameters - Perform a dry-run when lv pointer is set to NULL Change-Id: I06beb7dd7236c81c3a91af4d09c31891f4b910a4 Related: OS#3529
2018-10-16remote-BSS neighbors: allow only one cell IDNeels Hofmeyr1-21/+102
I believe I have initially misinterpreted the idea behind sending a Cell Identifier List in BSSMAP Handover Required messages. Instead of associating N Cell Identifiers with one ARFCN+BSIC, the idea is to add up N separate ARFCN+BSIC's Cell Identifiers into a list. To keep the door open for future code simplification, make sure to allow only one Cell Identifier per remote ARFCN+BSIC on the VTY UI. Related: OS#3656 Change-Id: Ifb9212fede2333ad68db94188b5cda4fcabe02f8
2018-10-10codec_pref: also check physical channelsPhilipp Maier1-0/+8
At the moment codec_pref only checks the codec configuration, but it does not check if there is actually a matching physical channel available. This should be checked too we must make sure that the codec we select fits the physical channels available on the BTS. Change-Id: I2d29dfed450e5ef93c26ed5ec9fdc0730eb3d7dd Related: OS#3503
2018-10-05codec_pref: handle S0-S15 in ASSIGNMENT REQUESTPhilipp Maier2-50/+52
Opposed to all other codecs that are common in GSM, AMR requires a codec configuration that is expressed by a bitmask (S0 to S15) in the speech codec list in the ASSIGNMENT REQUEST. Also the BSC acknowledges those configuration in the ASSIGNMENT COMPLETE message. At the moment osmo-bsc ignores all incoming configuration bits. The bits in the ASSIGNMENT COMPLETE speech codec (choosen) field are hardcoded. - Store the configuration bits while parsing the ASSIGNMENT COMPLETE - Create an intersection with the configuration that is actually supported by the BSS - Return the resulting (chosen) configuration bits with the assignment complete message. - Use the (highest of the) agreed codec rates in RSL channel activation. Change-Id: I2d8ded51b3eb4c003fe2da6f2d6f48d001b73737 Related: OS#3529
2018-09-27vty: write local neighbors by bts nr, not lac-ciNeels Hofmeyr1-14/+14
Change-Id: I35783f9624eacbdffccdb59a0179ffda54a26990
2018-09-27neighbor vty: allow setting local neighbors by CGINeels Hofmeyr1-0/+5
Add missing item in the landscape of VTY commands: allow identifying a local cell by CGI (besides BTS nr, LAC or LAC+CI, which already exist). Change-Id: I2d03de6b695904c4a86025bf250358d04f6e47de
2018-09-27neighbor vty: rather 'no neighbor', not 'neighbor del'Neels Hofmeyr1-19/+21
Now the scheme nicely matches: bts 0 neighbor bts 1 no neighbor bts 1 Change-Id: Ib6015b8b48c1f6b98a02cb5a68e568083466e0d5
2018-09-27neighbor vty: drop keyword 'add'Neels Hofmeyr1-108/+106
When writing the neighbor configuration documentation, I noticed that 'neighbor add' and 'neighbor del' make sense from an interactive VTY POV, but when looking at a static config file, it makes more sense to simply name the neighbors without the 'add' keyword, and to use the 'no' prefix instead of the 'del' keyword. It still makes sense to tweak cosmetics like this before inter-bsc handover is used anywhere. First, remove 'add' from all 'neighbor add ...' commands. Instead, prepend "Add" to the doc string for the cell identification argument in commands that add a neighbor: -OsmoBSC(config-net-bts)# neighbor add ? - bts Neighbor cell by local BTS number +OsmoBSC(config-net-bts)# neighbor ? + bts Add Neighbor cell by local BTS number (A subsequent patch will rename 'neighbor del' to 'no neighbor'.) Change-Id: I143f21f6069d1a86096cc8240cf69eb7ea9c8ac8
2018-09-27test neighbor ident vty docsNeels Hofmeyr1-0/+89
Change-Id: I83a2b03c6a081c4ed3225d79d342913a261d9c1c
2018-09-27make: allow vty-tests without configureNeels Hofmeyr1-4/+4
Change-Id: I8cb165890ed77bea8ae82f5228828fa19ff7e0b9
2018-09-24codec_pref: Add Codec List to COMPLETE LAYER 3 INFORMATIONPhilipp Maier2-0/+1161
The COMPLETE LAYER 3 INFORMATION message lacks the Codec List (BSS Supported) information element. This information element is mandatory for networks that use an IP based user plane (AoIP). - Add function to generate the speech codec list from the current codec settings (Available codecs) - Generate and embed information element in L3 Compl. message Depends: libosmocore I4e656731b16621736c7a2f4e64d9ce63b1064e98 Change-Id: Id6f2af3fdab45bf05f06aec03e222734d7a4cf70 Related: OS#3548
2018-09-14codec_pref: add AMR configuration bits to make_scl_config() in unit-testPhilipp Maier1-0/+6
The the function make_scl_config() is used to generate realistically looking speech codec lists to perform the unit tests for codec_pref.c. This function does not yet populate the S0-S15 bits for AMR codecs. Lets make sure that at least the default configuration is populated here. Change-Id: I534239416c038ea856c128659f314aa521f85c15
2018-08-29neighbor_ident_vty.c: fix CI format, should be 16bitNeels Hofmeyr1-14/+14
In the 'lac-ci' and 'cgi' neighbor identity VTY parameters, fix the CI part to <0-65535>. Use 65535 as CI in the neighbor_ident.vty test to verify the range. Change-Id: Ie93bfe176b9d2d9445966e4ab0b928b9aa62a77f
2018-07-28cosmetic: rename bsc_api.h to gsm_08_08.hNeels Hofmeyr1-1/+1
See also I91922f557072d0fb8cfe213a8a7b50f3bb23dea0, which renames osmo_bsc_api.c to gsm_08_08.c. Change-Id: I7179eb27183ee213f8fc8d548895b67aa43dc6a2
2018-07-28cosmetic: reduce bsc_api.hNeels Hofmeyr1-0/+1
Remove as much as possible from bsc_api.h. Use '#pragma once'. Tweak head comment. BSC_API_CONN_POL_{ACCEPT,REJECT}: only user is static complete_layer3(), just use a bool return value instead. msc_connected(): only used in osmo_bsc_api.c, make static there. Instead of including gsm_data.h, declare structs opaquely, include stdint.h. codec_pref_test.c used this as indirect gsm_data.h include via osmo_bsc.h, include gsm_data.h there directly. osmo_bsc.h: instead of including bsc_api.h, declare opaque structs. gsm_04_08_rr.h: declare opaque structs to replace indirect include of gsm_data.h. Change-Id: Ia9c0f9828317236048e40ec9ecf9990592e2190a
2018-07-28cosmetic: dissolve bsc_api.cNeels Hofmeyr1-1/+0
gsm0808_page() is just a thin wrapper for rsl_paging_cmd(), the only caller is page_ms() from paging.c. Directly call rsl_paging_cmd() instead. Move gsm0808_cipher_mode() to the only caller in osmo_bsc_bssap.c, make static. Change-Id: Ib7ce026b52d4ba3e53a8b2824e74ea92432c48c5
2018-07-28create separate logging categories for lchan,ts,as FSMsNeels Hofmeyr1-0/+18
Change-Id: Ie889b8860a4a63c7c22ef65025f690d64cd7330c