Age | Commit message (Collapse) | Author | Files | Lines |
|
struct bsc_api was used to provide an abstract API for both osmo-bsc and
osmo-msc, between BSC and MSC. That's no longer needed, so get rid of it, to
prevent code turbulences it creates for no reason.
Change-Id: I3fd5888c63a0b4f95520a498320aa105a6d60579
|
|
Move all of libbsc/ into osmo-bsc/, and separate/move some implementations to
allow linking from utils/* and ipaccess/* without pulling in unccessary
dependencies.
Some utilities use gsm_network and gsm_bts structs, which already include data
structures for fairly advanced uses. Move initialization that only osmo-bsc
needs into new bsc_network_init() and bsc_bts_alloc_register() functions, so
that the leaner tools can use the old gsm_* versions without the need to link
everything (e.g. handover and lchan alloc code).
In some instances, there need to be stubs if to cut off linking "just before
the RSL level" and prevent dependencies from creeping in.
- abis_rsl_rcvmsg(): the only program currently interpreting RSL messages is
osmo-bsc, the utils are merely concerned with OML, if at all.
- paging_flush_bts(): ip.access nanobts models call this when the RSL link is
dropped. Only osmo-bsc actually needs to do anything there.
- on_gsm_ts_init(): the mechanism to trigger timeslot initialization is related
to OML, while this action to take on init would pull in RSL dependencies.
utils/ and ipaccess/ each have a stubs.c file to implement these stubs. Tests
implement stubs inline where required.
From src/utils/, src/ipaccess/ and tests/*/, link in .o files from osmo-bsc/.
In order for this to work, the osmo-bsc subdir must be built before the other
source trees. (An alternative would be to include the .c files as sources, but
that would re-compile them in every source tree. Not a large burden really, but
unless linking .o files gives problems, let's have the quicker build.)
Minor obvious cleanups creep in with this patch, I will not bother to name them
individually now unless code review asks me to.
Rationale:
1) libbsc has been separate to use it for osmo-nitb and osmo-bsc in the old
openbsc.git. This is no longer required, and spreading over libbsc and osmo-bsc
is distracting.
2) Recently, ridiculous linking requirements have made adding new functions
cumbersome, because libbsc has started depending on osmo-bsc/*.c
implementations: on gscon FSM and bssap functions. For example, neither
bs11_config nor ipaccess-config nor bts_test need handover_cfg or BSSMAP
message composition. It makes no sense to link the entire osmo-bsc to it, nor
do we want to keep adding stubs to each linking realm.
Change-Id: I36a586726f5818121abe54d25654819fc451d3bf
|
|
The TEST_SCAN_TO_MSC is completely unused, but still the code linked
bsc_scan_bts_msg() for the unused code path. This is unlikely to ever be
expanded. Remove TEST_SCAN_TO_MSC and reduce linking requirements.
(I am this close to dropping the test entirely to avoid continuous linking
annoyance, but ok, since nothing else tests timezones AFAIK, keeping it.)
Change-Id: I27521950432e412f919cde811c9473557d0ec25e
|
|
Rationale: channel_test is trivial and useless, probably only exists as a
legacy from openbsc.git.
- it tests two printf()s of "(bts=45,trx=0,ts=3,ss=4)", hardly useful.
- it tests ts_subslots() behavior for dyn ts, which will soon be replaced by a
most trivial mapping that does no longer need complex dyn ts state
evaluation (when introducing the new timeslot FSM to handle dyn TS switchover).
Change-Id: Ib2232da8e7fa964b92492d7b778320401dc97703
|
|
Rationale:
- All it does is compose four Paging Requests and feed it into the osmo-bsc
bssap_udt, and expects the cell identifier to be decoded properly.
- To do so it employs a comparatively huge linking effort. This linking effort
is becoming annoying in my ongoing work and is just not worth it.
- We have comprehensive cell identifier tests in ttcn3, verifying that the
proper cells are paged, and that actually for *all* cell identifier types.
Change-Id: I07cf23b66de36cfa1142a11b9f85e9c0190ee314
|
|
Only count paging responses which can be mapped to an active paging.
Unsolicited paging responses which do not correspond to an active paging
would increment the 'paging response' counter. This means the number of
paging attempts could be smaller than the number of paging responses,
which can look confusing in the 'show statistics' VTY command.
Change-Id: I7cfc7c29fb7570d41e3ac23cca17f5b98b303506
Related: OS#66
|
|
If we receive a BSSMAP ASSIGNMENT REQ for a speech channel
containing only a CIC but no AoIP transport layer address, then that's
illegal and must be rejected.
In Change-Id If362a0084de452727cd063063dfb645eca2f9beb we re-introduced
accepting CIC-only ASSIGNMENT REQ, but we failed to verify that this
actually only happens over a SCCPlite A interface.
This fixes the BSC_Tests.TC_assignment_cic_only testcase.
Change-Id: Ia6e3897edca48b9f838ea69939d9b8be7185abf8
|
|
The user might not want to enable LCLS support for administrative
reasons. So let's keep it disabled by default, until somebody
explicitly enables it with "lcls-mode mgw-loop".
In the future, we may want to introduce a "lcls-mode bts-loop" where we
don't loop at the BSC-colocated MGW, but where we instruct the BTSs to
feed the RTP directly to each other. This would require a
falt/transparent IP routing between the BTSs in the RAN.
Change-Id: Ied7985056c8cd182bf16119007a08cc5be14459b
Related: OS#1602
|
|
This code contains the following code:
* receive/parse/interpret LCLS specific BSSMAP IEs and PDUs
* osmo_fsm handling the various states and their transitions
* call leg correlation (finding the other subscr_conn with same GCR)
* communication between the two call-leg LCLS FSMs
* detection of supported / unsupported LCLS configurations
* display of GCR / LCLS information in "show conns"
* switch the media streams locally using MDCX to the MGW
Closes: OS#1602
Change-Id: I614fade62834def5cafc94c4d2578cd747a3f9f7
|
|
We now print information such as
* SCCP connection ID
* MSC number
* handover decision2 fail count
* channel mode (SIGN/SPEECH)
* MGW endpoint
* secondary lchan (if any, e.g. during assignment)
* don't crash if conn->lchan == NULL
Change-Id: I2f8000844afc9da93ca39976399e5f76a45530de
|
|
Change-Id: I7928d78e2ce3e6eca545455d08bc89ca67e01f9f
|
|
Change-Id: I67659275beda1b6a89bdf11eb0231438b0c8b912
|
|
Also change format of related debug message to match similar format than
gsm_ts_and_pchan_name().
Change-Id: Id4f875944c40fd862fc63feec82216c45d2e41c2
|
|
In doc/, add two message sequence charts with lots of implementation specifics,
to clarify the current code state. Mark various problems in red notes.
This chart and others should help to illustrate future code changes as I go
along refactoring handover, lchan allocation and adding inter-BSC handover.
Change-Id: I20999e938441d4fed2d37462b262b74a696f616d
|
|
Right now, it's impossible to see any ACC Ramping information unless RSL
category is set to DEBUG. Barring and Allowing Access Control Class is
an important event which should be printed in most cases.
Increase log levels of messages printed during some error conditions to
be handled as errors.
Change-Id: I5404e91fe7c0b3209e8033594e659387bbc924d6
|
|
It's not a good idea to keep extern declarations copied over
half a dozen C files. Let's move it to a header.
Change-Id: I6f643f1393ba0955d9c0cf1cf78d5c604e7b9451
|
|
The bsc_msc_connection dates back to the old pre-libosmo-sigtran
days, and 90% of the field members weren't used at all (even the
new sigtran specific ones!). Let's merge what remains into struct
bsc_msc_data.
As a side effect, the already dysfunctional "dest A.B.C.D" VTY
command has been removed from the MSC node.
There's quite a bit of fall-out in the CTRL interface, which was
the code with strongest ties to bsc_msc_connection. This was
resolved by properly porting CTRL handling over to libosmo-sigtran,
meaning that an IPA/SCCPlite connected MSC can now again send CTRL
GET/SET commands, and can also receive those selective few TRAPs
that old osmo-bsc-sccplite also sent to its MSC[s].
Change-Id: I6b7354f3b23a26bb4eab12213ca3d3b614c8154f
Related: OS#2012
|
|
osmo-bsc_nat is too heavily tied into legacy SCCPlite code, as it
is not using libosmo-sigtran/osmo_ss7 so far. It's also full of
customer-specific code and it's shared use of some libbsc code here
has been complicating osmo-bsc development.
The current plan is to continue to use osmo-bsc_nat from openbsc.git
for those legacy users that need it, and not use osmo-bsc_nat in
new 3GPP AoIP setups. Should we ever get a strong demand for an AoIP
based bsc_nat, we can still revisit this later.
Change-Id: Ia05dc76336a64a7f08962843b9a7cc19f2c83387
|
|
In IPA/SCCPlite, the MSC is handling MGCP to the BSC-MGW directly
and the BSC only takes care of the BTS-side MGCP connection. We
achieve this by transitioning directly from WAIT_MDCX_BTS into ACTIVE
in this case.
Change-Id: I96179b4324b976bded36023a8ccbdc007b6b3e05
Related: OS#2544
|
|
Change-Id: I6ace15f368b5ba6e5c8845ea21d17dd3a7a15be7
|
|
Change-Id: If362a0084de452727cd063063dfb645eca2f9beb
|
|
In IPA/SCCPlite, we have to use the CIC to construct the MGCP
endpoint name instead of the usual dynamic endpoint allocation.
Change-Id: I03e2cdbc8e40169e52df3720c40b66734e880525
|
|
Also: Move mgcp_timeslot_to_port() next to it, as they are
more or less the inverse transformation of each other.
Change-Id: Ica908e2bb8fc4e59e0d146b428c93a9efc385688
|
|
We used to have hard-coded M3UA. Let's allow the user to configure
this per MSC using a new "asp-protocol (m3ua|sua|ipa)" VTY command.
For SUA this should just work 1:1 without any trouble. For IPA,
this of course only changes the underlying transport without reflecting
the various differences in terms of BSSMAP ASSIGNMENT, MGCP handling,
etc.
Change-Id: I0800c709e574cedd7f5dd98be81c78782245cd13
Related: OS#2544
|
|
In gscon_fsm_wait_mdcx_bts() we try to allocate conn->user_plane.fi_msc
but then check whether conn->user_plane.fi_bts is set, possibly due to
a copy+paste error. Let's fix that.
Change-Id: I1f515910f67492257866791588f32b350fadf815
|
|
Use memcpy() to avoid unaligned access, instead of writing through a
pointer cast to uint32_t. Problem spotted by address sanitizer:
abis_nm.c:2802:24: runtime error: store to misaligned address 0x7ffc95396706
for type 'uint32_t', which requires 4 byte alignment
0x7ffc95396706: note: pointer points here
81 0b bb 80 00 00 00 00 ed 79 28 56 00 00 e0 9c 00 00 a0 61 00 00 ...
^
Related: OS#3196
Change-Id: I8e591a56ae522b371da01ea968151a7e6fa24bb9
|
|
The state ST_WAIT_MODE_MODIFY_ACK can never be reached by the
current FSM model.
- Remove ST_WAIT_MODE_MODIFY_ACK and all related code
Change-Id: Iacaae2ee50ca1956066b7dce4517bbc9c2b0897e
Related: OS#2762
|
|
* Check the message length once at the start, before any other actions.
* Use only one local gsm48_hdr pointer.
* Read the cause value once near the top, re-use it.
* Log "ASSIGNMENT COMPLETE" always, not only during handover.
* Fully initialize local struct lchan_signal_data.
Change-Id: Idcfd932d3dfb0b621ed6d8c4f92c0231abcdcec8
|
|
Change-Id: I5266d6e1ea0ea89c66fa481136c31e2f84bcb313
|
|
Change-Id: Iee47b4ffefedf9532e11f17d5f9b603fc8872cb9
|
|
Change-Id: I28a48dc9a1719793d369468aa9a4bdcf460d201c
|
|
bsc_api.c notoriously lacks log context. Provide gsm_lchan_name() and/or
bsc_subscr_name() in roughly a million instances, using new LOGPLCHAN macro.
Add LOGPLCHAN() to gsm_data.h, to encourage use of it in other .c files.
Change-Id: If469defcc6fe8950dac5df61db3f39d297893318
|
|
Default usage values are defined in mgcp node, and can be per-BSC
overriden on each bsc node.
This commit is a forward-port of openbsc.git Change-Id
Ibf3932adc07442fb5e9c7a06404853f9d0a20959.
Depends on osmo-mgw.git Change-Id Ie19a64ac09f9d51f2434ad0d7925610fc919a90e.
Change-Id: Ie07b8a577caf731d59d68e3b3510ae2f9fd3dc93
|
|
Add a global counter to the BSC which shows the number of failed
connections attempts due to a unit_id mismatch between the BSC
and the BTS.
Change-Id: I58866aff36a1c8463bf84b4392a5124ffeaa32ea
Related: OS#3245
|
|
The 'show statistics' VTY command was not showing all counters
maintained by osmo-bsc. Instead of printing just two counters
related to paging, print all available counters in a generic way.
Adjust descriptions of some counters for nicer display.
After startup (all counters are zero) is now looks like this:
OsmoBSC# show statistics
handover:attempted: 0 Received handover attempts.
handover:no_channel: 0 Sent no channel available responses.
handover:timeout: 0 Timeouts of timer T3103.
handover:completed: 0 Received handover completed.
handover:failed: 0 Received HO FAIL messages.
paging:attempted: 0 Paging attempts for a subscriber.
paging:detached: 0 Paging request send failures because no responsible BTS was found.
paging:responded: 0 Paging attempts with successful response.
OsmoBSC#
Change-Id: I58ae04e1960774d760e3ebb54a4f307c9f753655
Related: OS#3245
|
|
The function a_reset_free() is not used anywhere at the code. The
reason for this is that a BSC instance is never cleared once it
is started up. Also the timer number is not according to the spec.
- Remove a_reset_free()
- Fix timer identification number (T4)
- use fi->priv to hold context info
- Fix sourcecode formatting
Change-Id: I72095d52304c520e383755eee6c889bce492cbd4
Related: OS#3102
|
|
Change-Id: I5f6135b7e16cac95c58a1bbc147234e10ee37574
|
|
Reshuffle the decision not to activate PDCH when GPRS is off:
Even though all current callers should avoid passing a PDCH activation in case
GPRS is off, it's a better idea to not assert on it and crash osmo-bsc.
Move the decision to omit PDCH activation and logging about it into the actual
functions that do PDCH activation. If PDCH activation is skipped, the lchan
then just stays as it was, and that's what it should anyway be doing.
Change-Id: Ib26642f08044d71a2469e6dbabf1e6fbcb02044d
|
|
Change-Id: Iaaa710d0274fe813d227cb658d82a24db68c4161
|
|
For audio->hr == true, use HR1, and for hr == false use FR1; not vice versa.
Change-Id: Ifb4dba7c8e9c1d0a22a007355fbd2eda57e789d3
|
|
In osmo-nitb, the way TCH lchans were assigned often resulted in mismatching
TCH kinds, causing problems in the lack of transcoding. Hence
dyn_ts_allow_tch_f was introduced as a workaround.
Now however, we always assign an SDCCH to a requesting MS first, and only later
assign a TCH channel, which then adheres to the codec list configured at 'msc'
in the vty config. Hence it is now considerably harder to obtain a mismatch.
Furthermore, forcing specific codecs is possible by simply omitting the
unwanted ones from the msc config's codec-list. The equivalent of
'dyn_ts_allow_tch_f 0' could be e.g. 'codec-list hr3 hr2 hr1'.
Change-Id: Ib2335d02ea545aff837aadd49f15b2fdb418c46e
|
|
Change-Id: If0070b8f7b6cc7fffbc582cf9f472e60f3096000
|
|
In rsl_chan_activate_lchan(), remove a condition to also allow switching pchan
modes when not in PDCH mode, which is actually not needed and would hinder
switching from pchan=NONE or between TCH/F <-> TCH/H.
Refactor the part where lchan_alloc() decides to switch a pchan mode into a
separate function, ts_usable_as_pchan(), which transparently checks both dyn TS
kinds for:
- Already in switchover? (missing check for ip.access style dyn TS)
- Is the lchan->state in error? (missing check for ip.access style dyn TS)
- Switch from pchan=NONE? (missing feature for Osmocom style dyn TS, for proper
handling with gprs mode none)
- Switch between TCH/F <-> TCH/H when all subslots are unused?
(missing feature for Osmocom style dyn TS, also useful for gprs mode none)
Always pass the desired pchan in the dyn_as_pchan argument to the _lc_find_*
functions to make switchover decisions transparent. Use the _lc_dyn_find_bts()
function for ip.access style dyn TS for the same reason.
Related: OS#3244
Change-Id: I72d5d833b186b1e1925d513885b405d8c19aa496
|
|
Recent Icf6e25ff068e8a2600562d52726ead65e864ec02 changed the dyn_ts_init() hook
from bootstrap_rsl() to the Channel OPSTART ACK, but this is not sufficient.
Now RBS2k never calls dyn_ts_init(), and we may need to wait for RSL:
Dyn TS should actually be initialized only when *both* OML opstart and RSL link
are established. To that end, introduce a generalized API to query OML and RSL
status and to trigger a timeslot init at the appropriate time.
Add gsm_ts_check_init() to be called both when RSL and OML opstart are
established: trigger gsm_ts_init() only when both are given.
Add gsm_bts_trx_ts->initialized flag to mark whether initialization has already
taken place. Add gsm_bts_mark_all_ts_uninitialized() to conveniently clear this
flag for all TS in a BTS.
Add gsm_bts_model.oml_is_ts_ready() callback so that each BTS implementation
can return the OML status of a timeslot in its own OML implementation.
Actually, currently all BTS models that need this init mechanism store the TS'
OML status in ts->mo.nm_state. While we would in practice correctly init dyn TS
by just looking at ts->mo.nm_state, semantically, the decision whether the TS
is ready is up to the BTS models' specific OML implementations.
From bootstrap_rsl(), call gsm_ts_check_init(), in case the TS OML Opstart has
happened before RSL is established -- applies to all BTS models.
For all BTS models:
- call gsm_{bts,trx}_mark_all_ts_uninitialized() when OM is torn down, to make
sure the TS init mechanism will work a second time.
For all BTS models supporting dyn TS, i.e. osmo-bts, nanobts and RBS2k:
- implement oml_is_ts_ready().
- call gsm_ts_check_init() when a Channel OM is taken into operation.
Any BTS models that don't set oml_is_ts_ready() will see a ts init as soon as
RSL is bootstrapped (incidentally, the old dyn TS behavior before recent
Icf6e25ff068e8a2600562d52726ead65e864ec02).
This firstly fixes dyn TS for RBS2k by re-adding the initial switch to PDCH,
and furthermore does so only after both OML TS opstart and RSL are through.
This fixes the ttcn3-bsc-tests around dyn TS, since for the osmo-bts-virtual,
the RSL is established only after OML opstart on the TS, which was broken by
Icf6e25ff068e8a2600562d52726ead65e864ec02.
Nokia Site and Siemens BS11 practically do not require this init mechanism,
since all that happens there so far is dyn TS init, and these BTS models do not
support dyn TS of any kind. A future patch may add oml_is_ts_ready().
Related: OS#3205
Change-Id: I99f29d2ba079f6f4b77f0af12d9784588d2f56b3
|
|
Previously the MGW configuration was ignored during writing
of the MSC configuration. Let's fix this by calling the
mgcp_client_config_write() function.
Change-Id: I7d1eedb782a4f30bd089838969ce54f27cde060d
|
|
Typically, an lchan that is released should no longer be associated with
subscriber connection. If that is the case, an S_LCHAN_UNEXPECTED_RELEASE is
triggered, which aborts, e.g., an ongoing assignment.
However, with dynamic timeslots, we may set lchan->conn and then start to
switch over from PDCH to a TCH mode, in which case it is perfectly fine to
release an lchan that is associated to a conn.
In lchan_free(), do not fire S_LCHAN_UNEXPECTED_RELEASE for a dyn TS that is
currently in switchover.
This is the second and last part to fix dynamic timeslots handling of the
gscon.
Related: OS#3211
Change-Id: Id7d9dd06451722eb328db77bb586826c954bd85c
|
|
Set lchan->state to LCHAN_S_ACT_REQ in rsl_chan_activate_lchan(), not in
handle_new_assignment().
This is the first part of a fix for dynamic timeslots handling in the gscon.
Rationale:
In rsl_chan_activate_lchan(), we may choose to set the lchan state to
LCHAN_S_REL_REQ and wait for dyn TS switchover from PDCH.
So the caller from bsc_api.c handle_new_assignment() must not bluntly set the
state to LCHAN_S_ACT_REQ, which is not accurate in the case of dyn TS
switchover.
In case of dyn TS switchover, a later release ack received from the BTS will
cause rsl_chan_activate_lchan() to be called again, at which point we may
accurately set state LCHAN_S_ACT_REQ, and continue the Assignment.
Related: OS#3211
Change-Id: Iedb4fb63bf1959d5f1d2c6edb6a7f5097ff16bd7
|
|
Sending PDCH activation upon RSL bootstrap is too early. Introduce OPSTART ACK
handling to call dyn_ts_init() only when the dynamic timeslot is indeed ready
to receive a PDCH activation.
Related: OS#3205
Change-Id: Icf6e25ff068e8a2600562d52726ead65e864ec02
|
|
At this point, meas-feed is usable again, however, osmo-bsc is not able to
include the IMSI in every report like osmo-nitb did.
In consequence, the meas-vis and meas-web tools are unable to handle the
current measurement reports: these so far use the IMSI to list reports, and all
reports without an IMSI are collapsed onto the same line, swapping values.
So though osmo-bsc now sends usable measurement reports via meas-feed, two
avenues to improve should be pursued:
OS#3192: the visualization tools should use bts,ts,ss numbers, not IMSI.
OS#2969: osmo-bsc should always know a mobile identity.
Related: OS#2968
Change-Id: I186c7a995dd2b81746c32a58b55da64ed195a1ce
|
|
gsm0808_assign_req() checks if the new channel mode is compatible
with the new mode. If it is, it does a gsm48_lchan_modify(), but
it does not actually check if the new mode is equal to the current
mode.
- skip when the channel is compatible and the new mode is equal to
the old mode.
- send the ASSIGNMENT COMPLETE directly from ST_ACTIVE when no
mode modify was necessary.
Change-Id: I86a2d52836c54d2dbd77441b182f757327ec7262
Related: OS#2936
|