aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
AgeCommit message (Collapse)AuthorFilesLines
2020-01-06Introduce nm_fail_rep_signal_data for "SS_NM, S_NM_FAIL_REP" signalHarald Welte1-0/+14
Let's not just pass around the raw msgb, but also all other metadata, such as the decoded parts of the TS 12.21 message. As there's no current consumer of that signal, this creates no compatibility issues. Change-Id: I5d4d9d422b4e23348ffbe69c6e87a31d5574f90d
2019-11-19bsc: Adapt maximum MS Power Ctrl level based on band and MS Power classPau Espin Pedrol2-1/+7
Related: OS#4244 Change-Id: I6bff440b7797e710bca5af94fae546e5d55e6972
2019-11-13Fix some typosMartin Hauke8-15/+15
Fix typos and common misspellings in code comments and in the manual. Change-Id: I46fc9d424620c77ae9ccf78b58081bd303386d7c
2019-11-02osmo_bsc_main.c: verify the physical channel mapping at startupVadim Yanitskiy1-0/+2
As per 3GPP TS 45.002, section 3.3.2.3, and table 3 of clause 7, the following limitations apply mapping of CCCH/BCCH channels: - TS0/C0 shall be configured as CCCH/BCCH (optionally combined); - combined CCCH (CCCH+SDCCH4) can only be used on TS0; - additional CCCHs can be on TS2, TS4, and TS6; - additional CCCHs are not allowed if TS0 is combined. Let's make sure that OsmoBSC is properly configured before starring. Change-Id: I758ef80f7884ba35cdf59d671ee30222ffb9d68b
2019-10-31gsm_data.h: Remove unused func declarationsPau Espin Pedrol1-3/+0
Change-Id: I189d34b6db78de749e1901733d0df35411e0d583
2019-10-31gsm_data.h: Remove unused field classmark from gsm_subscriber_connectionPau Espin Pedrol1-3/+0
Change-Id: If2826a8f334afabfa3a0198a0bc1eed009962c81
2019-10-31Remove unused API classmark_is_r99()Pau Espin Pedrol1-2/+0
Furthermore, similar API already exist in libosmocore: osmo_gsm48_classmark_is_r99() Change-Id: I6763d8c894f0a0555a9801bddbc0a12c2b945599
2019-10-03gsm_08_08.c: Mark func bsc_find_msc() staticPau Espin Pedrol1-1/+0
Its currently only used by bsc_compl_l3() in same file. Change-Id: I7273a9452dbc4c1285cfa69269fa36ab09551d89
2019-09-08SMSCB: Send ETWS Primary Notifiation via RSL to BTSHarald Welte2-0/+2
In addition to transmission of the ETWS Primary Notification via all dedicated channels, we also need to send it to the BTS for transmission via PCH (P1 Rest Octets) and for forwarding to PCU for PACCH transmission. Change-Id: I7e45b0373458a4348b12b92dd92861062532548b
2019-09-06SMSCB: Send ETWS primary warning message via all dedicated channelsHarald Welte1-0/+2
As soon as we have received an ETWS primary notification message from the CBC, we should transmit it as "RR Application Information" to all dedicated channels. Change-Id: I913d0237cffdcb95037da8489acef5f32a7fc02e
2019-09-02Cell Broadcast: CBSP and CBCH scheduling supportHarald Welte6-0/+118
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 Hofmeyr3-14/+18
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-12bsc_msc_data: remove unused member is_authenticatedPhilipp Maier1-1/+0
The struct member struct bsc_msc_data->is_authenticated is set to true permanently. This is a leftover from the sccplite implementation and can be removed now. Change-Id: I966a48b383c85345c92c9a1fec791150e96cd7b9 Related: OS#3112
2019-07-16logging: introduce LOG_BTS and LOG_TRX and use it everywhereHarald Welte1-0/+6
It's quite ugly to have manual "bts=%d" printf-statements all over the BSC code. Let's change this to use shared logging helper functions all over the place, whenever we need to log something related to one BTS or one TRX. This can also help us as the first step to later add alternative logging of BTS identities, e.g. by printing the Cell Global Identifier or LAC+CI, or even a human-readable/vty-defined 'name' of the BTS, rather than its numeric bts number. With this change in place, we can introduce such changes at a single location in the code. Change-Id: I4a7814d164384eecfb6913c31802cf2faead6e6c
2019-07-13comment and VTY doc tweaksNeels Hofmeyr1-1/+1
Clarify some in-code comments. Fix descriptions of some handover timers, which still talked of "MO" and "MT" handover -- which we now call "inter-BSC out" or "inter-BSC in" instead. Change-Id: I8429a830edd0325893ac90f22fcc05309617bd2d
2019-07-09doc/manuals, vty doc: more handover doc clarificationsNeels Hofmeyr1-14/+17
Related: OS#3487 Change-Id: I1639efb2dbcca4f0e9c33a74f3067606ce5f4209
2019-07-08make bsc_clear_request() staticNeels Hofmeyr1-1/+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 Welte2-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-06-18Remove extern declarations of libosmovty symbolsPau Espin Pedrol1-3/+0
The library has the declarations since 2011, so it's time to get them removed from here. Depends: libosmocore d61d517a2e35f482519561bd325652ee7144679a Change-Id: I5c8d02605a78c6792f616ad423b4491b83f42545
2019-06-06Introduce msc_is_{sccplite,aoip}() helpersPau Espin Pedrol1-0/+20
Having the helper makes it easier to read/find for transport type checks. It will be ifurther re-used in forthcoming commits. Change-Id: Ic0ee4c472e29ec3092049e5e23b744395613616d
2019-05-26Allow VTY to set the CCCH Load Indication ThresholdHarald Welte1-0/+3
Add a new VTY command "ccch load-indication-threshold <0-100>" by which the user can configure the threshold after which the BTS shall send CCCH LOAD IND. It used to be hard-coded to a default value of 10. Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440
2019-05-24keep per-BTS stat_items about RACH busy / RACH access percentageHarald Welte1-0/+2
Change-Id: I3ad0cc4866d6210181cbafbab876e8028ad27540
2019-05-24abis_rsl: Add support for extended CBCH to rsl_sms_cb_command()Harald Welte1-1/+1
Now that OsmoBTS understands about extended CBCH, let's at least update the BSC side function to allow for other code to generate such messages. Change-Id: I77a16b75ce311d63fb022475c8ff25fbbcee7f55
2019-05-19bssap: Parse Osmux CID on BSSAP Assign Req recv and use it in MGCPPau Espin Pedrol1-0/+3
The Osmux CID obtained from the MSC is passed to the co-located BSC MGW to configure the MSC-side MGW conn of a call leg. Depends on: osmo-mgw.git I73b4c62baf39050da81d65553cbea07bc51163de Change-Id: I86e7e13fc7921e3209fb764c0e7797e7ec09b79e
2019-05-19bssap: Detect MSC Osmux support on RESET (ACK) recvPau Espin Pedrol1-0/+2
Related: OS#2551 Depends on: libosmocore I28f83e2e32b9533c99e65ccc1562900ac2aec74e Change-Id: I830e38cc1ffb8b6ebbe299567507160f19beb528
2019-05-19vty: Add option to enable osmux towards MSCPau Espin Pedrol3-0/+12
Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74
2019-05-05fix inter-BSC-HO-incoming for AoIP (1/2)Neels Hofmeyr1-3/+3
Move the HO_ST_WAIT_MGW_ENDPOINT_TO_MSC state up to right after the lchan is done establishing. For AoIP, the local RTP address towards the MSC already needs to be known before the Handover Request Acknowledge is sent, so the AoIP Transport Layer Address IE can be included. This patch only modifies the handover FSM, a subsequent patch adds the IE. Change-Id: I00c18b78573386145af71c4b39f7f22aec24579b
2019-05-03assignment_fsm: Properly support assigning signalling mode TCH/xSylvain Munaut2-8/+11
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 Hofmeyr5-73/+17
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 Hofmeyr4-61/+4
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-04-19Revert "fix inter-BSC-HO-incoming for AoIP (1/2)"Daniel Willmann1-3/+3
This reverts commit 94c9324fe07cd0ba1277278270c8979d949e49ec. Multiple ttcn3 handover tests were broken due to this commit. Let's merge this once all the other commits pertaining to that fix can be merged as well. Fixes: OS#3942 Change-Id: I01d93778fb19c601c21f99ec4d2a3ab8a4a48f67
2019-04-17gsm_data.h: Remove unused variable from OpenBSC timesDaniel Willmann1-1/+0
This variable does not seem to be used anywere in OsmoBSC, seems to be a remnant from OpenBSC times. Change-Id: I5e4aa352fa5f16f6ff64738f25afd1a844fa4fcb
2019-04-15Drop unused old osmux leftover codePau Espin Pedrol2-42/+0
Let's better clean up old stuff before doing new implementation. Change-Id: Id4e254a1c24831afaba9ab7b330d4e09a2474c8e
2019-04-08fix inter-BSC-HO-incoming for AoIP (1/2)Neels Hofmeyr1-3/+3
Move the HO_ST_WAIT_MGW_ENDPOINT_TO_MSC state up to right after the lchan is done establishing. For AoIP, the local RTP address towards the MSC already needs to be known before the Handover Request Acknowledge is sent, so the AoIP Transport Layer Address IE can be included. This patch only modifies the handover FSM, a subsequent patch adds the IE. Change-Id: I4a5acdb2d4a0b947cc0c62067a67be88a3d467ff
2019-04-08Handover Request: also parse Chosen Algorithm IE, pass to lchan activationNeels Hofmeyr1-0/+4
During inter-BSC-incoming, the MSC sends the chosen encryption algorithm in the Handover Request message. Actually parse this Chosen Encryption Algorithm IE. Place the chosen algorithm and the CK into lchan_activate_info->encr so that the new lchan will use the same ciphering on this new BSS as it did on the old BSS. Change-Id: I5b269f50bd2092516bfdf87746196983d3ac49d1
2019-04-08lchan activation: add explicit encryption info to activationNeels Hofmeyr1-0/+1
For intra-BSC handover, the previous encryption is copied from the old lchan, which of course is not available during inter-BSC handover. Hence the lchan activation info needs to include an explicit encryption information, and we must not rely on the presence of the previous lchan to copy encryption information from. Add struct lchan_activate_info.encr to allow passing encryption info through lchan_activate() without requiring a previous struct gsm_lchan to be present. Instead of copying from the old lchan, always copy encryption info to lchan_activate_info, and during activation, just before sending the Channel Activation, copy the lchan_activate_info.encr to the new lchan. This prepares for upcoming I5b269f50bd2092516bfdf87746196983d3ac49d1 which obtains the encryption information from an intra-BSC-incoming Handover Request message. Related: OS#3842 Related: I5b269f50bd2092516bfdf87746196983d3ac49d1 Change-Id: Ib3d259a5711add65ab7298bfa3977855a17a1642
2019-03-19AMR: Signal usage of octet-aligned or bandwith-efficient mode to MSCPhilipp Maier1-0/+1
MGCP/SDP provides fmtp parameters in order to signal which of the two available AMR framing modes (octet-aligned or bandwith-efficient) should be used on the link between BSS and core network. osmo-bsc currently does not set up this mode which means that the RTP packets from the BTS are forwared without inspection/modification, which may lead to malfunction when a BTS is using a framing mode that is not supported by the other end. - Add VTY option to setup the framing mode - Generate related fmtp parameters in SDP Depends: osmo-mgw I622c01874b25f5049d4f59eb8157e0ea3cbe16ba Change-Id: If6d40b2407b87aad2227ea7f15533ef01a3771b3 Related OS#3807
2019-03-14Revert "assignment_fsm: Properly support assigning signalling mode TCH/x"Neels Hofmeyr2-11/+8
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 Pedrol2-2/+3
This way ipaccess utils can be built without requiring libosmo-sigtran. Change-Id: I508188896be58ddc3bd4e9c3c661c258c06866f4
2019-03-14Move LCLS references from gsm_data to osmo_bsc_lclsPau Espin Pedrol2-13/+17
This commit aims at better ordering of content in order to get rid of sigtran stuff in gsm_data. This way we can avoid requiring libosmo-sigtran when building ipaccess utils. Change-Id: I8941f059d6e4eb21a971d48d2b66c29ec3355a6d
2019-03-14assignment_fsm: Properly support assigning signalling mode TCH/xSylvain Munaut2-8/+11
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-04cosmetic: drop unused struct mgcp_ctx shadowNeels Hofmeyr1-1/+0
Change-Id: If9c705e9fe6dba9225f7dec045e790af7a875ee8
2019-02-21assignment_fsm: fix channel allocator preferencesPhilipp Maier2-7/+28
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
2019-02-06comments: clarify usage of conn.assignment and .handover scopesNeels Hofmeyr1-2/+13
Change-Id: I7ef602c3ce086aecbc3ae3ae6d3fd33ad2b9f85c
2019-02-06handover_fsm: do not access conn->assignment.req, it may be outdatedNeels Hofmeyr1-0/+2
handover_fsm.c accesses conn->assignment.req.s15_s0 to find out the current lchan's AMR configuration. However, conn->assignment.* values are only valid during an ongoing assignment. Those values may be overwritten by any failed Assignment attempt, at any time, and hence do not reflect the currently assigned conn->lchan. Those realms must be kept separate. The assignment.req.s15_s0 get passed to lchan_activate(), so it makes most sense to store these values in struct gsm_lchan once the lchan activation succeeded. Add gsm_lchan.s15_s0, store the s15_s0 received in lchan_activate_info during lchan_activate(). In handover_fsm.c, use conn->lchan->s15_s0 instead of conn->assignment.*. Change-Id: Id8018fd9d56421f2ab7be91703018f6d6f21c929
2019-02-05Implement CSFB "Fast Return" Handling at RR RELEASEHarald Welte1-0/+3
When the MSC sends a BSSMAP CLEAR CMD containing a CSFB Indication IE, it lets us know that the to-be-released connection related to a CSFB call. We as the BSC then subsequently should include the "Cell Selection Indicator after release of all TCH and SDCCH" IE in the RR RELEASE message sent to the MS/UE. This IE contains the LTE neighbor cells that we're configured to broadcast in si2quater. That in turn will make sure the MS/UE can return very quickly to the LTE cell. Closes: OS#3777 Change-Id: Ibfbb87e2e16b05032ad1cb91c11fad1b2f76d755 Requires: libosmocore Id4bd7f7543f5b0f4f6f876e283bd065039c37646 Requires: libosmocore I0e101af316438b56d63d43fc2cb16d7caf563d07 Requires: libosmocore I8980a6b6d1973b67a2d9ad411c878d956fb428d1
2019-02-05gsm_data: Add gsm_bts_name() just like we have gsm_{trx,ts,lchan}_name()Harald Welte1-0/+1
Change-Id: Icd7fd6273396026c5fe2da600f35631b1bac1614
2019-01-28LCLS: use libosmocore function to add statusMax1-2/+0
* use gsm0808_create_ass_compl2() to add BSS Status IE to Assignment Complete message * drop local helpers Depends-on: (libosmocore) I547c6b8707123aa8c1ef636db88908df112d90a4 Change-Id: I6916928391667cd9c345becf00e7c8561846c295 Related: OS#2487
2019-01-21LCLS: constify helper parametersMax1-1/+1
Related: OS#2487 Change-Id: I341f4ea172432b94e8e96919926a5fb6870c2a30
2019-01-17chan_alloc: remove references to lchan_alloc()Philipp Maier1-3/+0
The function lchan_alloc() does not exist anymore, however there is still a prototype definition in chan_alloc.h and a comment in abis_rsl.c. Lets remove those. Change-Id: I36227ea306d28587ac70acbe596c7756b23d88c7