Commit Graph

6613 Commits

Author SHA1 Message Date
Neels Hofmeyr ab2248e8c9 BTS codec pref legacy compat: allow all codecs per default
Legacy compat: we used to not check the BTS codec-pref settings upon assignment
until we added checks for the BTS codec-pref in osmo-bsc
5bc43cd107, change-id
I285234e9c81de74d9fb9907fca2c443b08537435, "codec_pref: check bts codec
support". From that commit onwards, config setups without a 'codec-pref'
potentially stop working (like all osmo-gsm-tester runs just did), because with
no codec-pref settings, now only FR is permitted, while before the patch, we
would allow any codecs as long as MSC and the overall BSC config agree on them.
So, upon BTS initialization, enable all codecs. These get reset to a more fine
grained selection IF a 'codec-support' config appears in the config file (see
bsc_vty.c).

Change-Id: I4650a1f8e350c6f74f48391f43ddfe771be01e1b
2018-07-24 15:27:50 +02:00
Neels Hofmeyr 629a43a4c2 various logging: fix missing/extra newlines
Change-Id: Id2619d0d45eb2686246c03643b4a578392a54cfe
2018-07-23 01:29:23 +02:00
Neels Hofmeyr 31716f981a hodec2 log: less verbose, more concise logging
Drop numerous log statements that merely bloat the ho decision log.

Logging HO candidates: log more compact in a single line, do not use LOGPC and
multiline output. The result is more useful information in a quarter of the log
lines.

LOGPHOLCHAN(), LOGPHOLCHANTOBTS():
- log lchan->type instead of lchan->ts->pchan
- always log the speech mode

===== Before =====

DHODEC handover_decision_2.c:1131 (lchan 0.010 TCH/F) (subscr IMSI:000001) MEASUREMENT REPORT (1 neighbors)
DHODEC handover_decision_2.c:1136 (lchan 0.010 TCH/F) (subscr IMSI:000001)   0: arfcn=871 bsic=63 neigh_idx=0 rxlev=30 flags=0
DHODEC handover_decision_2.c:261 (lchan 0.010 TCH/F) (subscr IMSI:000001) neigh 871 rxlev=30 last_seen_nr=3
DHODEC handover_decision_2.c:1158 (lchan 0.010 TCH/F) (subscr IMSI:000001) HODEC2: evaluating measurement report
DHODEC handover_decision_2.c:1175 (lchan 0.010 TCH/F) (subscr IMSI:000001) Measurement report: average RX level = -110
DHODEC handover_decision_2.c:1190 (lchan 0.010 TCH/F) (subscr IMSI:000001) Virtually improving RX level from -110 to -105, due to AFS bias
DHODEC handover_decision_2.c:1220 (lchan 0.010 TCH/F) (subscr IMSI:000001) Attempting handover/assignment due to low rxlev
DHODEC handover_decision_2.c:899 (lchan 0.010 TCH/F) (subscr IMSI:000001) Collecting candidates for Assignment and Handover
DHODEC handover_decision_2.c:407 (lchan 0.010 TCH/F)->(BTS 0) (subscr IMSI:000001) tch_mode='SPEECH_AMR' type='TCH_F'
DHODEC handover_decision_2.c:313 (lchan 0.010 TCH/F) (subscr IMSI:000001) FR3 supported
DHODEC handover_decision_2.c:313 (lchan 0.010 TCH/F) (subscr IMSI:000001) HR3 supported
DHODEC handover_decision_2.c:489 (lchan 0.010 TCH/F)->(BTS 0) (subscr IMSI:000001) removing TCH/F, already on TCH/F in this cell
DHODEC handover_decision_2.c:573 (lchan 0.010 TCH/F)->(BTS 0) (subscr IMSI:000001) TCH/H would not be congested after HO
DHODEC handover_decision_2.c:605 (lchan 0.010 TCH/F)->(BTS 0) (subscr IMSI:000001) TCH/H would not be less congested in target than source cell after HO
DHODEC handover_decision_2.c:609 (lchan 0.010 TCH/F)->(BTS 0) (subscr IMSI:000001) requirements=0x30
DHODEC handover_decision_2.c:704  - current BTS 0, RX level -110
DHODEC handover_decision_2.c:707    o free TCH/F slots 3, minimum required 0
DHODEC handover_decision_2.c:709    o free TCH/H slots 4, minimum required 0
DHODEC handover_decision_2.c:714    o no requirement fulfilled for TCHF (no assignment possible)
DHODEC handover_decision_2.c:737    o requirement A B fulfilled for TCHH (not congested after assignment)
DHODEC handover_decision_2.c:407 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) tch_mode='SPEECH_AMR' type='TCH_F'
DHODEC handover_decision_2.c:313 (lchan 0.010 TCH/F) (subscr IMSI:000001) FR3 supported
DHODEC handover_decision_2.c:313 (lchan 0.010 TCH/F) (subscr IMSI:000001) HR3 supported
DHODEC handover_decision_2.c:563 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) TCH/F would not be congested after HO
DHODEC handover_decision_2.c:573 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) TCH/H would not be congested after HO
DHODEC handover_decision_2.c:595 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) TCH/F would not be less congested in target than source cell after HO
DHODEC handover_decision_2.c:605 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) TCH/H would not be less congested in target than source cell after HO
DHODEC handover_decision_2.c:609 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) requirements=0x33
DHODEC handover_decision_2.c:701  - neighbor BTS 1, RX level -110 -> -80
DHODEC handover_decision_2.c:707    o free TCH/F slots 4, minimum required 0
DHODEC handover_decision_2.c:709    o free TCH/H slots 4, minimum required 0
DHODEC handover_decision_2.c:712    o requirement A B fulfilled for TCHF (not congested after handover)
DHODEC handover_decision_2.c:737    o requirement A B fulfilled for TCHH (not congested after handover)
DHODEC handover_decision_2.c:914 (lchan 0.010 TCH/F) (subscr IMSI:000001) adding 2 candidates from 1 neighbors, total 2
DHODEC handover_decision_2.c:1020 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) Best candidate, RX level -80
DHODEC handover_decision_2.c:625 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) Triggering Handover
DHODEC handover_decision_2.c:688 (lchan 0.010 TCH/F)->(BTS 1) (subscr IMSI:000001) Triggering handover to TCH/F, due to low rxlevel
DHO handover_logic.c:133 (BTS 0 trx 0 ts 1 lchan 0 TCH/F)->(BTS 1 lchan TCH_F) Initiating Handover...
DMSC handover_logic.c:135 SUBSCR_CONN[0x612000000520]{ACTIVE}: Received Event HO_START
DHODEC handover_logic.c:172 (BTS 0 trx 0 arfcn 870 ts 1 lchan 0 TCH/F)->(BTS 1 trx 0 arfcn 871 ts 1 lchan 0 TCH/F) (subscr IMSI:000001) Triggering Handover

===== After =====

DHODEC handover_decision_2.c:1039 (lchan 0.010 TCH_F SPEECH_AMR) (subscr IMSI:000001) MEASUREMENT REPORT (1 neighbors)
DHODEC handover_decision_2.c:1044 (lchan 0.010 TCH_F SPEECH_AMR) (subscr IMSI:000001)   0: arfcn=871 bsic=63 neigh_idx=0 rxlev=30 flags=0
DHODEC handover_decision_2.c:1097 (lchan 0.010 TCH_F SPEECH_AMR) (subscr IMSI:000001) Avg RX level = -110 dBm, +5 dBm AFS bias = -105 dBm; Avg RX quality = -1 (invalid), +0 AFS bias = -1
DHODEC handover_decision_2.c:1122 (lchan 0.010 TCH_F SPEECH_AMR) (subscr IMSI:000001) RX level is TOO LOW: -105 < -100
DHODEC handover_decision_2.c:677 (lchan 0.010 TCH_F SPEECH_AMR)->(BTS 0) (subscr IMSI:000001) RX level -110; TCH/F={free 3 (want 0), [-] not a candidate}; TCH/H={free 4 (want 0), [ABC] good}
DHODEC handover_decision_2.c:671 (lchan 0.010 TCH_F SPEECH_AMR)->(BTS 1) (subscr IMSI:000001) RX level -110 -> -80; TCH/F={free 4 (want 0), [ABC] good}; TCH/H={free 4 (want 0), [ABC] good}
DHODEC handover_decision_2.c:928 (lchan 0.010 TCH_F SPEECH_AMR)->(BTS 1) (subscr IMSI:000001) Best candidate, RX level -80
DHODEC handover_decision_2.c:641 (lchan 0.010 TCH_F SPEECH_AMR)->(BTS 1) (subscr IMSI:000001) Triggering handover to TCH/F, due to low rxlevel
DMSC handover_logic.c:125 SUBSCR_CONN[0x612000000520]{ACTIVE}: Received Event HO_START
DHODEC handover_logic.c:169 (BTS 0 trx 0 arfcn 870 ts 1 lchan 0 TCH_F SPEECH_AMR)->(BTS 1 trx 0 arfcn 871 ts 1 lchan 0 TCH/F) (subscr IMSI:000001) Triggering Handover

Change-Id: If1add9b57a051d32b67a4a08ab47a9655aa9dd17
2018-07-23 01:29:23 +02:00
Philipp Maier 12f79f6e10 chan_alloc: reset rtp voice related bits in lchan_free()
The function lchan_free() is supposed to reset the lchan so that
it can be used by another connection. This function does not yet
reset the struct memebers in lchan->abis_ip. This may lead to
confusion if some other end re-uses that lchan and finds old RTP
voice port/ip settings there. Those data must be reset to
ensure it does accidently migrate into an unrelated conext.

- do a memset to 0 on lchan->abis_ip in lchan_free()

Change-Id: I0c99494292cd1d058a19a21413d0ddb51471c6be
Related: OS#3396
2018-07-22 07:26:52 +00:00
Pau Espin bd3de187e8 ctrl: Avoid sending back received ERROR msgs
Change-Id: If0cd4d435acd13dd132248c521e6bb0182de0deb
2018-07-22 06:23:01 +00:00
Philipp Maier 5bc43cd107 codec_pref: check bts codec support
The vty option bts->codec-support allows the user to set the supported
codecs per BTS level. However, those values are currently only used to
make the handover decision but the logic that handles the BSSMAP
ASSIGNMENT REQUEST does not check those flags.

- Do not ignore bts->codec-support flags on BSSMAP ASSIGNMENT REQUEST

Change-Id: I285234e9c81de74d9fb9907fca2c443b08537435
Closes: OS#3361
2018-07-22 06:16:11 +00:00
Philipp Maier 844876f8d5 codec_pref: move match_codec_pref() to separate c-file and add unit-test
At the moment there are three sources that may advertise a list of
supported audio codec/rate settings. There is the MS that advertises
advertises a speech codec list and the MSC that sends a channel type
information element over A and there are also settings in the bsc
configuration file that may restrict the codec/rate types that are
allowed to use.

The function match_codec_pref() looks at all of the three buckets and
selects a codec that satisfies all three. This is already a somewhat
complicated process, overit is very isolated, so lets give it its own
c-file.

Due to the lack of unit-tests it is very hard to make changes here so
lets add also unit-test to make sure that regressions are catched early.

- Put match_codec_pref() and all its helper functions into a separate
  c-file.
- Add a unit test.

Change-Id: Iabedfdcec8b99a319f2d57cbea45c5e36c7b6e29
Related: OS#3361
2018-07-22 06:16:11 +00:00
Neels Hofmeyr 16dd64a078 ho cfg: fix unit strings
Change-Id: Ie98a68de207aea69befd24af3f302b6ef9e6f8e4
2018-07-21 17:08:00 +00:00
Neels Hofmeyr bb7ea61725 fix handover start: dealloc ho if event not permitted
Before this, a handover request in a conn state that disallows it would leave a
lingering handover state in the conn, also thwarting any future handover
attempts. (It would be deallocated on conn teardown, so no memleak.)

Change-Id: I839a05495ae93c5dbbd1616efa2469e5b1990a61
2018-07-21 17:07:46 +00:00
Stefan Sperling e67ebf0d44 fix handling of invalid pchan names in vty
If an invalid phys_chan_config is specified in osmo-bsc.cfg, raise
a parsing error at program startup.

If an invalid phys_chan_config is specified in in the VTY while
the program is running, show a warning to inform the user that
the configuration change was not applied.

Change-Id: I97baa359464a0e94de2497bc9214b99ed2a24041
Related: OS#1876
2018-07-20 13:33:37 +02:00
Neels Hofmeyr fec10cfa89 call osmo_xua_msg_tall_ctx_init()
xua_msg allocations should not go unnoticed by our root ctx. libosmo-sigtran
recently added this API to fix that.

Depends: I618878680a096a7f7fc2d83098590f2e4cb08870 (libosmo-sccp)
Change-Id: I8d5edda17be82e0cb4a1af3e2a62cbcb3a2ddda3
2018-07-11 04:29:10 +02:00
Neels Hofmeyr e45d2daab4 cosmetic: name osmo-bsc's root ctx 'osmo-bsc', not 'openbsc'
Change-Id: Ie038bbed436069e7849ba78c3c77c80a68bc3dad
2018-07-11 04:29:10 +02:00
Pau Espin a43cea70cb filter: Allocate each ctr group with a different idx
Fixes following runtime warning:
libosmocore/src/rate_ctr.c:219 counter group 'nat:filter' already exists for index 0, instead using index 1. This is a software bug that needs fixing.

Forward-port from openbsc.git c08d58802e03a45f95b8f7d28b29dc7026f664ba.

Change-Id: I7c5054c374281bb1d4bd1ecd76ddcca7a010d50a
2018-06-28 13:24:05 +02:00
Pau Espin 5bdb5f3f46 filter: Replace '.' in counter names with ':'
The '.' is illegal character in counter names, as they are exported
via CTRL interface, where '.' has a special meaning that cannot be
used by strings comprising the variable name.

Forward-port from openbsc.git 360284d4d797519faed33559b0ae746b6c17e68a.

Change-Id: I57b78162701a6a101b5cbaf68aaea89d17a0f819
2018-06-28 13:20:10 +02:00
Pau Espin 653bee7d02 filter: vty: Print policy list in cmd show access-list
Change-Id: I3761819fb29f6fe49995ce4c1ae0e9bf92f993cd
2018-06-28 13:18:41 +02:00
Pau Espin a0f1196eda Rename bsc_msg_acc_lst_vty_init to have more uniform prefix
Change-Id: I6f125d040a8f511590ef67ba8babbd2e01c6bf21
2018-06-28 12:58:53 +02:00
Pau Espin 9ab47eb52d Init access_lists before passing it as a parameter
Previous state is harmless because the pointer is stored but not used in
that function. However, it's more clear this way.

Change-Id: I048ebc120306ea30ea973d6ee16ed84c9f341183
2018-06-28 12:55:49 +02:00
Pau Espin d99182c010 bsc_vty: Write access list entries when storing bsc config
Change-Id: Ice8ce203a52b918e1eddb56ea437d082efd634bc
2018-06-28 12:50:45 +02:00
Pau Espin 1e75d131c9 bsc-filter: Remove unused func barr_adapt and set barr_find static
bar_find is set as static because it's still being used internally by
other functions.

Change-Id: I2db8f0ba60cf01929ce2c63edd9859612724de48
2018-06-28 12:48:18 +02:00
Philipp Maier 116e05e91d lcls: set codec info when performing MGW operation
While GSCON is setting the codec info when operating on the MGW, LCLS
is not doing that yet. This means that the MDCX messages that are
sent by LCLS do not contain any payload type and also no ptime or
rtpmap fields. This also causes the following TTCN3 tests to fail:

TC_lcls_connect_break
TC_lcls_connect_clear
TC_lcls_gcr_bway_connect
TC_lcls_gcr_bway_dont_connect_csc

- Make mgcp_pick_codec() public as bsc_subscr_pick_codec()
- use bsc_subscr_pick_codec() to set codec info in osmo_bsc_lcls.c

Change-Id: I383d55fa602cda0926dd701ee517a299db578260
Closes: OS#3358
2018-06-26 18:34:24 +02:00
Philipp Maier 9eea6a9d05 gscon: pick suitable payload type / encoding name for MGCP
The GSCON FSM does not care about the codec information when performing
interactions with the MGW. Before upgrading the client the codec
information was hardcoded to AMR inside the client. Now the client
offers APIs to set the codec information. Since this feature is new,
osmo-bsc does not set any codec information yet, which causes many of
the TTCN3 tests to fail. So lets add some logic to pick suitable codec
info.

- Hardcode ptime to 20 (is the same for all possible codecs)
- Select a codec according to the flags in userplane

Change-Id: Ibddc3492572b39f166e3a1b8b8120813ce2dadc2
Related: OS#2728
2018-06-25 19:54:28 +00:00
Pau Espin f8cf5263f9 debian: Move meas related binaries into new package osmo-bsc-meas-utils
Only meas_json is added so far, since the other related ones are
conditionally built.

Change-Id: I35ba3c19fcdfb5663691a67c9876537765963c5d
2018-06-25 19:22:16 +00:00
Neels Hofmeyr d0d204aaa2 cosmetic / linking: move str_to_imsi() out of abis_rsl.c
Move to gsm_04_08_utils.c so that it's possible to use it without
linking/stubbing all of RSL.

Change-Id: I6e90831d7e618ce3c8e7417082a82c97f6681668
2018-06-18 07:53:03 +02:00
Neels Hofmeyr f0ff9a6711 fix dyn TS init: properly identify BTS on OML OPSTART ACK
Commit "dyn ts, bts_ipaccess_nanobts.c: init PDCH on Chan OPSTART ACK"
bf7099262a Icf6e25ff068e8a2600562d52726ead65e864ec02
introduced signal S_NM_OPSTART_ACK and passed the FOM header to identify the BTS
by. But the FOM header's BTS number is zero on each Abis/IP link, and the BTS
and TRX are actually identified by msgb->dst == e1inp_sign_link, member trx. So
the initial implementation associated *all* Channel OPSTART ACKs with BTS 0.

Pass the entire msgb as S_NM_OPSTART_ACK signal argument, implement a
abis_nm_get_ts() to retrieve the proper timeslot and use that during timeslot
init.

Related: OS#3351 OS#3205
Change-Id: I45ce5c24cb62d00f350df1af1be6c11104d74193
2018-06-15 21:00:31 +02:00
Pau Espin e7d29e34e4 osmo-bsc: Add -V param to print version
Change-Id: I74e0e40ee6b2ce66d76f151528d9a958683944c7
2018-06-15 16:34:00 +02:00
Pau Espin d05d5e6afd osmo-bsc: Clean help description of cmd line parameters
Change-Id: I2ce242e97445785c3f1d965d89e3f1b6ca6a37ab
2018-06-15 15:48:50 +02:00
Pau Espin 41da945848 pcu_sock: Log event pcu_sock created
Change-Id: If5691d8e8bae7166e06382db589850ce94c20a30
2018-06-15 11:43:34 +00:00
Harald Welte cc2fb61a16 absi_rsl: Fix segfault in rsl_rx_conn_fail()
When we receive a RSL CONN FAIL IND, it may be that this happens
before any RLL is established (and hence a lchan->conn exists),
or after the RLLs have been shut down (and hence a lchan->conn doesn't
exist anymore).

So in this function, it is not legal to unconditionally dereference
lchan->conn.

Change-Id: I6380f5d2cd9364560ce3947517c84247cf4af0d4
Closes: OS#3182
2018-06-14 14:27:21 +02:00
Harald Welte 3f5716ce5d bsc_subscr_conn_fsm: BSC must not release SCCP connection
3GPP TS 48.006 section 9.2 states clearly that any SCCP connection
release must be initiated by the MSC.

for bsc_subscr_conn_fsm, this means that even after sending the
BSSMAP CLEAR COMPLETE, we must not terminate the FSM, as this would
cause a N-DISCONNET.req to be sent to the stack for the associated
SCCP connection.

The bsc_subscr_conn_fsm instances will hence stay alive until the MSC
eventually decises to release them.

Change-Id: Iaaca220b598609b77b600fcfc2f9a78b221c1fbb
Closes: OS#3331
2018-06-11 13:57:29 +02:00
Harald Welte 422260d7a2 Add missing event string name for GSCON_EV_LCLS_FAIL
Change-Id: Ia8c8303a87412ce6456c38ae29e3c55de9522ac0
2018-06-11 13:57:29 +02:00
Harald Welte aefcb75d56 remove traces of osmo-bsc_nat in python test (osmoappdesc/test_runner)
Change-Id: I9127ddb7b29eb82defd3a8afac9c1dbfd424fb72
2018-06-10 22:13:47 +02:00
Harald Welte 7325d9379d Remove unused logging subsystems DCC and DMGCP
We use the newly-introduced logging_vty_add_deprecated_subsys() from
libosmovty to make sure old config files will still parse even after
this change.

Change-Id: Ib4f67bb00e1d5460e643717b53f6a4d81278dc5d
2018-06-09 17:44:12 +02:00
Harald Welte cd326b3c20 Explicitly register CTRL-over-IPA callback with libosmo-sigtran
In Change-Id OSI6b7354f3b23a26bb4eab12213ca3d3b614c8154f we introduced
a function called osmo_ss7_asp_rx_unknown() which was supposed ot
override a weak symbol in libosmo-sigtran.  However, the related change
in libosmo-sigtran (I8616f914192000df0ec6547ff4ada80e0f9042a2) was
modified later on to use explicit registration of a call-back function
instead of weak symbol override.

Let's adopt the osmo-bsc code to make use of this explict call-back
registration.

Change-Id: Id5880ec90dfa00b29cbb0ffea8c8dd50e24742bd
Related: OS#2012
2018-06-08 20:35:35 +02:00
Harald Welte bc4f542d1d Ignore "dest" command in MSC node
In Change-Id I6b7354f3b23a26bb4eab12213ca3d3b614c8154f we removed
the "dest" vty command, but we should simply ignore it and print
a related warning during start.

Change-Id: I531825061031918bbb1380e1b485b711e81bcd75
2018-06-08 18:53:52 +02:00
Neels Hofmeyr 0c1ac9f010 make T10 configurable like the rest of them
Change-Id: I112c0db17d355d57eb08bc67121ccf49fbf53943
2018-06-08 16:16:42 +00:00
Neels Hofmeyr fc622c7241 drop dead code: conn->T10, handled by gscon instead
Change-Id: Ief20cb0f46dd93f46dd765dca307724dc2b3487c
2018-06-08 16:16:42 +00:00
Neels Hofmeyr 0abe84e679 HO: introduce T7, T8, T101 timers
Will be used in upcoming inter-BSC handover.

Change-Id: If9ecccc793426d214019f299b19d6ffa5a186546
2018-06-08 16:16:42 +00:00
Neels Hofmeyr 76739a7109 cosmetic: gscon: drop odd use of OSMO_STRINGIFY
Do not invoke OSMO_STRINGIFY() with arbitrary names, just quote instead.

The idea was that OSMO_STRINGIFY() avoids typos by ensuring well-defined names
are stringified, but this highlights that OSMO_STRINGIFY() is in fact usable
with completely arbitrary arguments and actually lacks the validation part :/

Change-Id: I458cd2cd0d6ddb0e6db3bb8d546a20336ae8c5f1
2018-06-08 16:16:42 +00:00
Neels Hofmeyr 44fcc9f11e doc: charts: illustrate new plan for ts and lchans
Add lchan and timeslot FSM charts to illustrate planning of how osmo-bsc should
handle lchan assignment and release.

Modify assignment, handover, lchan-release charts according to the new plan.

Change-Id: I18d60de5ee932c962aad0a532965a55d570bb936
2018-06-08 16:16:42 +00:00
Neels Hofmeyr c4bb31dcad doc: add ms-channel-request.msc
Change-Id: Iab22b8ae85a1a54d2f4002733e6068356368101b
2018-06-08 16:16:42 +00:00
Neels Hofmeyr 9d8d0c6731 doc: add lchan-release.msc
Change-Id: Ibcf2326cbc5a5f3f249ae15564825c83b5a063c8
2018-06-08 16:16:42 +00:00
Neels Hofmeyr c8658ac06e doc: tweak msc charts on Assignment/Handover: act_timer
Change-Id: I6205e43c227652432548c5c99bed5a197c095da2
2018-06-08 16:16:42 +00:00
Neels Hofmeyr bb6c13b862 cosmetic: handover_test: add IMSI to subscr for logging
Change-Id: I52fa8f3183c93ed362d8252d20daf00c60a117c8
2018-06-08 16:16:42 +00:00
Neels Hofmeyr 7c68e9048f store subscriber identity on paging
Another small step towards being aware of the subscriber identity.

Any connection initiated by paging will subsequently log the subscriber's
identity -- of course not necessarily the IMSI, if paging was done by TMSI.

This is only for Paging, not the Paging Response; for that see, L3 Complete.

Related: OS#2969
Change-Id: I0ab7bedfe693bb4e42a04fb0585b94a730ff2d9b
2018-06-08 16:16:42 +00:00
Neels Hofmeyr 81e912fa78 try to pick up subsrc IMSI on l3-compl
This is a tiny step towards being aware of a connection's subscriber identity.
Iff the Layer 3 Complete message contains an IMSI, associate a bsc_subscr with
the conn, so that subsequent logging and possibly meas_feed contains the IMSI.

For any L3 Complete using TMSI, this has no effect whatsoever.

Related: OS#2969
Change-Id: I3b696a0c0932e3abcb682ba231db65755d8c27a6
2018-06-08 16:16:42 +00:00
Neels Hofmeyr 8d6f444191 gscon: put subscriber a little later
Keep the bsc_subscr associated with the conn as long as possible, to benefit
logging, which then contains the subscriber identity (if any).

Change-Id: Ifa528b58842a02509bfe0af6915c64bd67058bcd
2018-06-08 16:16:42 +00:00
Neels Hofmeyr d3fff6f532 cosmetic: bsc_subscr_alloc: log initial get
Instead of silently setting the use count to 1, instead increment with an
explicit bsc_subsct_get(), which then logs the event along with the place that
created the subscriber.

Change-Id: Ia72f8010b7b2e1ca44e3b005c0f2c05f3eeae8d5
2018-06-08 16:16:42 +00:00
Neels Hofmeyr fb75d109a1 cosmetic: penalty timers: constify, tweak doc
Change-Id: I28addc9a16a4c81978290303d368f630a8334228
2018-06-08 16:16:42 +00:00
Neels Hofmeyr dd24cd39c0 use libosmocore's gsm0808_permitted_speech(), gsm0808_chosen_channel()
The guts of bssap_speech_from_lchan() and lchan_to_chosen_channel() have been
moved to libosmocore; call those instead.

The return value of bssap_speech_from_lchan() used to be -1 on error, now the
error value is 0. The only caller did not handle -1 properly, but fed it
directly to a uint8_t.

On gsm0808_chosen_channel() error, log the error. Proper handling is missing.

Fixing the error handling in send_ass_compl() is a separate issue: currently it
is limited to logging, there is no way to return an error yet, nor any actions
to take on error.

Depends: Icca23940791f97fa64dbc3f2734270b99f9550c1 (libosmocore)
Change-Id: Ib5c940a9dae11c5e26d4b47fa9d95fef889ad2f6
2018-06-08 16:16:42 +00:00
Neels Hofmeyr 8cb570cd06 log: assignment: add two logs on unexpected lchan release
Change-Id: Ib61125ebc41e55dc4a6595db8c8559c62b3ed2c0
2018-06-08 16:16:42 +00:00