Commit Graph

3117 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther c11889f3dd Merge branch 'feature/multiple-msc-connections' 2012-09-11 18:00:59 +02:00
Holger Hans Peter Freyther f67d9a9bed bsc: Attempt to respond to paging to the MSC that paged
Inspect the message and see if it is a paging response,
then try to find the MSC that has paged this subscriber
and select this as the target MSC, also move the MSC to
the back of the list for 'load balancing'.
2012-09-11 17:48:01 +02:00
Holger Hans Peter Freyther 644b0bf3da bsc: Hand the msc_connection to the UDT handling, pass it to paging
Pass the osmo_msc_data to the paging sub system, change the code
to pass the osmo_msc_data instead of network + bsc_msc_conn.
2012-09-11 17:47:42 +02:00
Holger Hans Peter Freyther 076af1c54b bsc: Move the finding of a MSC into the filter code
For responding to paging on the right link we will need to
figure out if the msg is a paging response.
2012-09-11 17:47:30 +02:00
Holger Hans Peter Freyther 354c87cdfc bsc: Select a MSC in a round-robin fashion
Select a MSC, add it to the back of the list after we have
selected it.
2012-09-11 17:47:08 +02:00
Holger Hans Peter Freyther 8b902d74cf bsc: Allow to configure more than one MSC in the VTY 2012-09-11 17:47:01 +02:00
Holger Hans Peter Freyther 8c176cc6ab msc: Only kill connections belonging to the given MSC
When a MSC connection drops, only kill the connections that
belong to the given MSC and not all other connections.
2012-09-11 17:46:54 +02:00
Holger Hans Peter Freyther ffd6856249 gbproxy: Address two unaligned memory access warnings
The lines 461 and 303 were producing unaligned memory access as
the BVCI was not aligned properly. Introduce a tlvp_val16_unal to
read 16bit from the data, use memcpy to the stack to make sure
that it is working in the aligned and unaligned case.
2012-09-11 16:23:31 +02:00
Daniel Willmann 7a7c2f8567 osmo-bsc: Command bts_connection_status with TRAPS 2012-09-11 16:20:46 +02:00
Daniel Willmann 806d6549f8 osmo-bsc: Introduce command msc_connection_status and send TRAPs for it 2012-09-11 16:20:46 +02:00
Daniel Willmann 6dc6910b79 nat: Change the ctrl command path
The commands net.<netid>.bsc.<bscid>.* are now forwarded to the
appropriate osmo-bsc. <netid> for now is just 0. <bscid> is not the LAC
anymore (since that could be ambiguous), but instead the number as
configured in bsc-nat.cfg
2012-09-11 16:20:46 +02:00
Daniel Willmann 6088f149b5 libctrl, osmo-bsc: Get rid of net prefix
net is now implicit in the root node
2012-09-11 16:20:46 +02:00
Daniel Willmann 65924a5fe8 osmo-bsc: Include rf statistics in the location-state TRAP as well
The first fields are still the location up to the height.
The next field is "operational" if any of the trx are operational,
otherwise "inoperational"
The second to last field contains "locked" if all of the trx are in the
admin state, otherwise "unlocked".
The last field represents the rf policy currently in effect. It is one
of (on|off|grace|unknown).

<tstamp>,<valid>,<lat>,<lon>,<height>,<oper>,<admin>,<policy>
2012-09-11 16:20:45 +02:00
Daniel Willmann 11620111f4 osmo-bsc: Prepare to send more than just the location in the TRAP 2012-09-11 16:20:45 +02:00
Daniel Willmann d08ad7d6d9 ctrl: Use strtol instead of atoi to detect conversion errors 2012-09-11 16:20:45 +02:00
Daniel Willmann ebe22375a6 ctrl: Improve error messages in ctrl_cmd_handle 2012-09-11 16:20:45 +02:00
Daniel Willmann 7aa4f0a263 ctrl: Change the paths to bts.%i. instead of bts%i 2012-09-11 16:20:45 +02:00
Holger Hans Peter Freyther fa0ec157af ctrl: Do not allow to set the RF Lock for a single trx
The ip.access nanoBTS has issues if the admin changes are called
too often in too little time. This will lead to a situation where
the site manager will fail to start properly. Remove the TRX code
as the RF Control class does not support setting this per TRX.
2012-09-11 16:20:45 +02:00
Daniel Willmann a5352a0174 osmo-bsc: Change variable name to better reflect current/last location 2012-09-11 16:20:37 +02:00
Daniel Willmann 47b5b3eeb2 gsm_data: Include a structure for the geographical location in gsm_bts 2012-09-11 15:22:00 +02:00
Daniel Willmann 5e95f45af0 ctrl: Improve error handling if controlif setup fails 2012-09-11 15:20:55 +02:00
Daniel Willmann 5ff06af6f5 osmo-bsc: Put the control commands in osmo_bsc_ctrl.c 2012-09-11 14:53:51 +02:00
Daniel Willmann d5eb431c47 osmo-bsc: Only send a TRAP if the location changes 2012-09-11 14:46:48 +02:00
Daniel Willmann adcde9f8f5 osmo-bsc: Add support for traps to the location command 2012-09-11 14:43:27 +02:00
Daniel Willmann 47824541f0 osmo-bsc: Allow location tstamp to be zero if fix is invalid 2012-09-11 13:10:38 +02:00
Daniel Willmann ad2946ce03 osmo-nitb: Update control interface API in osmo-nitb 2012-09-11 13:10:18 +02:00
Daniel Willmann d79da3baac nat: Add support for traps to the nat 2012-09-11 13:09:03 +02:00
Daniel Willmann 721f0325b5 libctrl: Add function ctrl_cmd_send_to_all
Sends a command to all ctrl connections except the one it originated
from.
2012-09-11 13:08:48 +02:00
Daniel Willmann 114a010c33 libctrl: Add trap helper function 2012-09-11 13:05:30 +02:00
Daniel Willmann 6fc4a98fc5 libctrl: Change controlif_setup so it returns the ctrl handle
nat: Catch up with controlif_setup API change
We now save a control handle reference in the nat
osmo-bsc: Catch up with controlif_setup API change
We now save a control handle reference in the gsm network
2012-09-11 12:52:23 +02:00
Daniel Willmann f3b31eb349 libctrl: Keep track of connections in struct ctrl_handle 2012-09-11 12:43:40 +02:00
Holger Hans Peter Freyther 4dd84ff7c2 bts_hsl_femtocell.c: Use PRIx64 to printf the uint64_t
bts_hsl_femtocell.c: In function ‘hsl_sign_link_up’:
bts_hsl_femtocell.c:206:3: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64_t’ [-Wformat]
bts_hsl_femtocell.c:210:2: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ [-Wformat]
2012-09-11 12:41:23 +02:00
Holger Hans Peter Freyther 8c3d0695e4 mgcp_network.c: Address compiler warning on return
When adding the "omit RTCP" the method started to return with
a proper return statement.

mgcp_network.c: In function ‘send_to’:
mgcp_network.c:233:1: warning: control reaches end of non-void function [-Wreturn-type]
2012-09-11 12:41:23 +02:00
Holger Hans Peter Freyther d98136d25c bsc_init: Initialize rc on all paths to address a compiler warning
bsc_init.c:203:6: warning: ‘rc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
bsc_init.c:101:6: note: ‘rc’ was declared here
2012-09-11 12:41:23 +02:00
Holger Hans Peter Freyther a5050b14c9 misc: Address compiler warning on unused variables
abis_nm.c: In function ‘abis_nm_get_attr’:
abis_nm.c:1380:11: warning: unused variable ‘cur’ [-Wunused-variable]

abis_nm.c: In function ‘ipac_parse_bcch_info’:
abis_nm.c:2588:11: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]

bts_nokia_site.c:1310:6: warning: variable ‘constructed’ set but not used [-Wunused-but-set-variable]
bts_nokia_site.c: At top level:
bts_nokia_site.c:1364:12: warning: ‘dump_elements’ defined but not used [-Wunused-function]

gsm_04_08.c: In function ‘mm_rx_loc_upd_req’:
gsm_04_08.c:521:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]

osmo_msc.c: In function ‘msc_ciph_m_compl’:
osmo_msc.c:122:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]

bts_hsl_femtocell.c: In function ‘hslfemto_bootstrap_om’:
bts_hsl_femtocell.c:101:11: warning: variable ‘cur’ set but not used [-Wunused-but-set-variable]

bts_hsl_femtocell.c: In function ‘hsl_drop_oml’:
bts_hsl_femtocell.c:232:21: warning: variable ‘line’ set but not used [-Wunused-but-set-variable]

handover_logic.c: In function ‘ho_chan_activ_ack’:
handover_logic.c:197:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
2012-09-11 12:41:23 +02:00
Holger Hans Peter Freyther 86f240aded gsm_data: Address compiler warning of unhandled switch
gcc does not really know the _NR_OF_ELEMENTS_IN_ENUM approach, add
the _NUM_GSM_BTS_TYPE to the handled cases.

gsm_data.c: In function ‘gsm_set_bts_type’:
gsm_data.c:349:2: warning: enumeration value ‘_NUM_GSM_BTS_TYPE’ not handled in switch [-Wswitch]
2012-09-11 12:41:22 +02:00
Harald Welte 79c34ffb4f OM2000: don't silently send CON/IS/TF configuration request 2012-09-07 20:15:50 +02:00
Harald Welte 4c889a5c49 RBS2000: Don't sent IS configuration if we want to config TF 2012-09-07 20:14:47 +02:00
Harald Welte 0818f31144 OM2000: make sure to route messages to IXU/DXU over BTS oml link
Messages to CF and other core objects need to go to the BTS (IXU/DXU)
OML link, not to the OML link of the primary TRX!
2012-09-07 19:10:47 +02:00
Harald Welte 240a828ffd OM2000: don't signal operational state for a unknown MO
This case happens if the BTS signals operational state for a TRXC which
is not configured as TRX in the openbsc.cfg
2012-09-07 19:10:47 +02:00
Holger Hans Peter Freyther 037065deee contrib: Add some SQL statements to remove old subscribers 2012-09-07 19:09:10 +02:00
Harald Welte e422798866 RSL: Add basic support for CSD transparent mode
We now have a lchan->csd_mode member that determines if RSL should
activate the channel in CSD transparent services or not.  The previous
code always assumed CSD is non-transparent.

(This requires libosmocore >= eed26116c96f03c6128fac3dead9054714af6cab)
2012-08-29 16:33:54 +02:00
Harald Welte bb53e3577a reimplement chan_compat_with_mode() to take care of CSD 2012-08-29 16:33:54 +02:00
Harald Welte 9fc70f365a bsc_api: Invert logic of chan_compat_with_mode()
A function called this  way should return 1 if it is compatible, so
something like "if (!chan_compat_with_mode())" will check if it is not
compatible.
2012-08-29 16:33:53 +02:00
Eric Butler 6fcac63cc0 Add init script to osmocom-sgsn package. 2012-08-26 20:09:55 +02:00
Eric Butler b561459dd6 osmocom-nitb debian package improvements.
* Don't enable MNCC sock by default.
* Create important directories.
* Fix init script 'stop' command.
2012-08-26 20:09:55 +02:00
Eric Butler 6e7d137e79 Start osmocom-nitb with HLR path and RTP proxy enabled (debian package). 2012-08-26 20:09:55 +02:00
Eric Butler 3d610e63cc Fix init script. 2012-08-26 20:09:55 +02:00
Eric Butler dd68fcaeee Fix libdbi package dependency 2012-08-26 20:09:55 +02:00
Eric Butler 010c9551ff Use package version since git info won't be available. 2012-08-26 20:09:54 +02:00
Eric Butler a73ca05db6 Update debian package. 2012-08-26 20:09:54 +02:00
Harald Welte 570ce24deb VTY: improve VTY prompt and make sure exit/end works everywhere
Some nodes below 'config' didn't have ournode_exit / ournode_end,
and thus were not able to properly perform this function.  exit should
always only go back one level, while end drops us back to ENABLE_NODE.

The prompt now represents the nesting level, and there's one consistent
space after the final prompt character (typically #).
2012-08-17 13:16:10 +02:00
Harald Welte e555c2b545 VTY: dynamically create BTS "type" command syntax 2012-08-17 13:02:12 +02:00
Harald Welte 57e0724ed4 BSC VTY: use numeric ranges for bts/trx/timeslot numbers
This effectively limits the number of BTSs to 256, but I think that's
acceptable for now.  Unfortuantely there's no decent way to dynamically
update the valid number range depending on how many BTSs are actually
configured in the system :/
2012-08-17 12:50:14 +02:00
Harald Welte 4ab9d7c012 dynamically generate a proper VTY reference for phys_chan_config
this uses vty_cmd_string_from_valstr() from _very_ recent libosmocore,
so you have to update the library, sorry.
2012-08-17 12:42:06 +02:00
Harald Welte 13fe21939c ... and more VTY help fixes 2012-08-17 09:57:25 +02:00
Harald Welte d13e0cd6db Some more VTY documentation / help fixes 2012-08-17 09:52:03 +02:00
Harald Welte cfaabbb21e complete the VTY help messages so we don't get "null" in the manual 2012-08-16 23:23:50 +02:00
Harald Welte fe568f235f abis_nm: Add function abis_nm_get_attr() to get attributes from BTS 2012-08-14 19:15:57 +02:00
Holger Hans Peter Freyther df49a983e2 docs: Do not remove too much from of the dumped online help
Use the len of the end and not the filename.
2012-08-14 00:14:36 +02:00
Holger Hans Peter Freyther b7b6cf5695 doc: Document a shortcoming of the current OML code
The BTS has 10s to respond to a command but we do not run any
timer. So it is possible that the BTS gets stuck in the process
of the bring up.
2012-08-06 12:41:45 +02:00
Holger Hans Peter Freyther f42e908cea contrib: Create a script that opens a SIP session before
Use the Smalltalk SIP implementation to create a call
and once the call has been established start the replay
using the commoncode. No patching of RTP occurs yet.
2012-08-05 16:10:32 +02:00
Holger Hans Peter Freyther 602559fd9f contrib: Move the shared code into a new file 2012-08-05 09:27:20 +02:00
Holger Hans Peter Freyther 4552d8061a contrib: Make the RTPReplay a a class so it can be shared 2012-08-05 09:25:25 +02:00
Holger Hans Peter Freyther 59043d8c94 typo: Mandantory -> Mandatory.. a common typo of mine 2012-08-03 11:05:29 +02:00
Holger Hans Peter Freyther 9b5db287c6 gb: suspend_ref was changed to a plain uint8_t, update the code
Require a 0.5.2+ libosmogb due the change of the suspend_ref type.
2012-08-03 10:08:32 +02:00
Holger Hans Peter Freyther 1a6b83c919 nat: Document all parameters of the VTY commands 2012-07-28 16:14:04 +02:00
Holger Hans Peter Freyther bc6a54dadc mgcp: Make sure "no rtcp-omit" is fully documented
One command missed the NO_STR in the documentation, share the
main text across all commands.
2012-07-28 15:46:45 +02:00
Holger Hans Peter Freyther d028807658 misc: Introduce a script tha generates the VTY reference
Update/Move/Create example configuration files for NiTB, BSC,
MGCP, NAT and the GbProxy. Create a script that starts, generates
the vty reference and terminates the application.
2012-07-28 15:30:09 +02:00
Holger Hans Peter Freyther 64c17fa598 libbsc: Add documentation to MM INFO, LAC, TSC, CI 2012-07-21 00:28:05 +02:00
Holger Hans Peter Freyther 3217fa2412 nitb: Document missing parameters, reword documentation, combine param
Change "pending send" to "pending-send" as there is no other pending
command right now, add missing documentation for parameters.
2012-07-21 00:01:01 +02:00
Harald Welte 70f9205cd9 MSC 04.08: RRLP messages are DRR, not DNM ! 2012-07-16 13:22:19 +02:00
Harald Welte ae1d010220 BSC API: Don't treat a RRLP message as NOTICE event
While generally we should log troly unknown RR messages, we can simply
pass along RRLP messages (which aren't unknown!)

In real networks, the RRLP would probably not end up at the MSC, but
well, sometimes we don't care what real/classic networks do.
2012-07-16 13:20:53 +02:00
Harald Welte fdf453c0a9 SGSN: Code to help debug / fix sgsn crash in cb_data_ind()
A crash was obsserved in cb_data_ind() when mm is dereferenced.

This patch adds some safeguards that try to prevent the library handle
back-pointer to the pdp_ctx to be NULL, and print a stack backtrace in
case we are free() ing the sgsn-side pdp_ctx while there's still a
library handle attached.
2012-07-14 12:18:28 +02:00
Harald Welte 7b022eed2d add some comments regarding the free() / release of pdp contextx
It might be that we're deleting structures instead of properly cleaning
up the attached libgtp handles...
2012-07-14 12:17:42 +02:00
Harald Welte 45f9171175 move BTS-specific timezone override into sub-structure
Group all three structure members involved in bts-specific timezone
handling into a sub-structure.
2012-07-12 01:14:28 +02:00
Harald Welte 25cf824edc handover: Not finding a HO record on CHAN ACT NACK is not an error
... it might well a completely non-ho-related establishment
2012-07-12 01:14:28 +02:00
Holger Hans Peter Freyther 153b13b02e msc: Attempt to release the lchan immediately on IMSI Detach
The Nokia E71 sends a "IMSI Detach" this msc code does not immediately
send the "RR Channel Release", the E71 is impatient and sends a DISC,
the "RELEASE INDICATION" is handled by starting the channel release
procedure. OpenBSC sends a "RR Channel Release" which will never be
answered, during the early release there is no timer and the lchan will
be in "RELEASE REQUESTED" forever.

This commit removes the anchor operation and checks if the channel can
be released immediately. Regarding the channel release handling there
is already a branch that needs to be tested.
2012-07-10 08:57:41 +02:00
Harald Welte 8c00496e42 GPRS LLC: fix segfault when transmitting downlink unit-data without mmctx 2012-07-04 21:53:12 +02:00
Harald Welte ad66a2d150 BSC VTY: Allow encryption to be set to A5/3
We are currently not checking if the BTS actually suports that cipher,
and we particularly don't have any hack for ip.access which apparently
seems to re-use the RSL algorithm identifier for A5/2.
2012-07-04 21:39:27 +02:00
Harald Welte f383aa11a5 BSC: introduce new "sysmobts" BTS model
so far, osmo-bts/sysmobts used to be entered as "sysmobts" type in the
configuration file.  However, there are some differences in the
protocol/behaviour and we should reflect that by a new BTS plugin (with
lots of code reuse from the nanobts driver).
2012-07-02 20:13:08 +02:00
Harald Welte 0c1bd61bb3 pre-fix measurement reports with subscriber identity
... otherwise it's impossible to distinguish them from each other.
2012-07-02 20:13:02 +02:00
Harald Welte 019f913ca3 gsm_data_shared: add structure for decoded parameters of RLC config
this is primarily needed on the BTS side, but we should also use it on
the BSC side and make the parameters VTY-configurable.
2012-06-28 09:03:07 +02:00
Harald Welte c95175fb88 ipaccess: some more comments on timer values 2012-06-28 09:03:00 +02:00
Harald Welte edcba4e307 use new external libosmogb (part of libosmocore.git)
This removes the libgb (GPRS NS/BSSGP) code from the openbsc.git
repository and uses the new version from libosmocore.git instead.
2012-06-17 23:34:34 +08:00
Harald Welte d24566ac6e libgb: separate header files related to spec and implementation
like in libosmogsm, we separate between header files that are just
reflecting information in the respective specs, and header files that
related to our specific implementation.
2012-06-17 13:12:51 +08:00
Harald Welte ce95b27b68 libgb: make sure all BSSGP functions have bssgp_ prefix
We change the minority of functions employing the gprs_bssgp_ prefix to
match with the majority without gprs_ in front.
2012-06-17 13:05:48 +08:00
Harald Welte 11461a6457 libgb/gprs: don't use log_info from libcommon anymore 2012-06-17 12:58:46 +08:00
Harald Welte e6599ee180 libgb: prefix all NS related functions with gprs_ 2012-06-17 12:38:07 +08:00
Harald Welte b1fd9022eb libgb: don't call directly into GMM / LLC layer
Instead of direct function calls to individual functions, we now
generate primitives (osmo_prim) and send them to one
application-provided function "bssgp_prim_cb()"
2012-06-17 12:17:22 +08:00
Harald Welte faa70ff2c6 libgb: remove dependency of BSSGP to include sgsn/gmm internal structs 2012-06-17 09:31:16 +08:00
Harald Welte 0d5e8e0b56 update .gitignore 2012-06-17 09:05:43 +08:00
Harald Welte 68d85d5610 libgb: Remove dependency to openbsc/debug.h 2012-06-16 17:53:38 +08:00
Harald Welte fdd8b3b40d libgb: remove dependencies to openbsc/vty.h and openbsc/gsm_data.h
Rather than using openbsc internal data/functions, we now use only
internal and libosmocore-provided ones.
2012-06-16 16:59:50 +08:00
Harald Welte a6a20b4ff6 libgb: Use library SS_L_NS instead lf local SS_NS
which removes some further dependencies of libgb to openbsc internal
code and data.
2012-06-16 16:40:42 +08:00
Harald Welte 8645e101da libgb: move GPRS specific msgb CB definitions to separate header 2012-06-16 16:09:52 +08:00
Harald Welte ea34a4e3a7 split libgb into a separate library for outside use
This also removes the dependency to osmo_sock() inside libcommon and
replaces it with osmo_sock_* from libosmocore
2012-06-16 15:14:00 +08:00
Harald Welte 704cb8680b gsm_data_shared: add handover related bits for osmo-bts 2012-06-16 15:02:13 +08:00
Harald Welte 67161f27d1 Allow VTY-based configuration of T3105
This timer will only be forwarded to BS11 and Ericsson Abis so far,
not to Nokia and ip.access BTS yet.
2012-06-03 16:58:18 +02:00
Harald Welte 66d360661a update year in copyright string 2012-06-03 16:58:09 +02:00