aboutsummaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2017-07-25osmo-bsc/sigtran: add missing constPhilipp Maier1-4/+4
Change-Id: I36404b34b8a85fc98670a3eeb8aaf29a4a6f10ea
2017-07-25osmo-msc: rename called/calling address in struct a_conn_infoPhilipp Maier1-2/+2
Change-Id: I1b28652662d83f52db21cb78b512c501c7adf4bb
2017-07-25osmo-bsc: change calling/called_addr variable namesPhilipp Maier1-2/+13
"calling_address" and "called_address" is not very expressive. change the respective struct memeber names of bsc_msc_data to bsc_addr and msc_addr to increase readability of the code. Change-Id: I63b2e810b97131c690edd5a9cc5c7b3b54ec5e12
2017-07-25osmo-bsc: Make SCCP-Addresses configurable via VTYPhilipp Maier1-0/+10
Add VTY commands to configure the sccp-address of the BSC and the one of the MSC. Change-Id: I49cedc0ce339defa6fb354f6fb9b1af7820da7cc
2017-07-25osmo-msc: finish msc-sided resetPhilipp Maier3-12/+55
finish the implementation for msc sided reset, automatically register connecting BSCs. Ensure that all sccp connections are cleared when the reset procedure executes. Change-Id: Iba3f5523795c6972600bbfda2a02b06ba84ea12d
2017-07-25mgcp: Fix missing call id in DLCXPhilipp Maier1-1/+2
The call id field in the DLCX message is missing. Use the endpoint id as call id in all CRCX and DLCX messages. Change-Id: I8b78b76126c63c4882e982c64c3953dbe1dab179
2017-07-25reset: fix allocation and add deallocator for reset procedurePhilipp Maier2-2/+5
When the reset is started, state machines are allocated. The user must provide a correctly filled structure where the reset start function adds the state machine into. This is prone to errors, besides of that, a proper deallocator function which tears down the osmo fsm is missing. make a more cofmortable allocator function and add deallocator function. Change-Id: I0054fb31589fb9f4c63c45df436e83448c59bd97
2017-07-25aoip: don't use iu struct: move rtp ports from .iu to new subscr_conn.rtpNeels Hofmeyr1-2/+5
Change-Id: Ib1a84b0733655b2e87c1598ae9df0640cdca833b
2017-07-25AoIP+3G: use one common SCCP client for A and IuCSNeels Hofmeyr3-4/+4
Move osmo_sccp_simple_client() setup out of iu_init() and a_init(). In msc_main.c and sgsn_main.c, initialize the STP connection first and then pass to iu_init() and a_init(). This allows serving 3G (IuCS) and 2G (A) from one and the same MSC instance. Since both OsmoHNBGW and OsmoBSC are using PC 23 by default now, move BSC to PC 42 (because OsmoBSC typically has vty port 4242, bla). Also: a_iface.c: remove now unused defines a_init(): remove osmo_ss7_init() call that duplicated msc_main.c Change-Id: I963a94e1a0bfc455992d22940dcc9c67c44570b9
2017-07-25osmo-bsc: react on reset requests from MSCPhilipp Maier1-0/+6
The bsc side currently can not receive reset commands from an MSC. This patch adds required functionality to receive a reset command and acknowlege it properly. The effects are the same as with when sending resets (all drop all ongoing calls and sccp connections) Change-Id: I44c7e54c845948c54614b36d97d2ba1e760ac46b
2017-07-25libcommon-cs: genralize a interface reset fsmPhilipp Maier4-9/+63
The AoIP standard also describes an MSC->BSC reset procedure. We currently do not implement it. However, the fsm that is used to issue the reset request from the bsc side is not generalized. This patch generalizes the code in order to be able to use the same code on the MSC side to perform a reset procedure from there. Change-Id: I65e20bebb126ba35122ca3a545393d18fcadf5ad
2017-07-25fixup: remove unused counterPhilipp Maier1-1/+0
Forgot to remove the counter struct osmo_timer_list msc_reset_timer; Needs to be fixuped into the reset handling patches Change-Id: I6d397188732f4593edc12459de6f3b5f47b7f06a
2017-07-25cosmetic: make function names in a_iface_bssap more expressive.Philipp Maier1-4/+7
The function names in a_iface_bssap.c are not very expressive. The problem not only exists on the API side, but also for static functions. This patch replaces the function names with more expressive names. Change-Id: I1cdf37e4034ed8a9536c253c13910fc436c66f04
2017-07-25cosmetic: more expressive function names in a_ifacePhilipp Maier2-17/+13
The function names if the API function in a_iface.c are not very expressive. Besides of that, the prototypes are in the wrong header file. This commit gives the function more expressive names and moves the prototypes in the right header file. Change-Id: I6af4b7deed9d11ac5fe188eb5625fba50caad7c1
2017-07-25mgcp: make bts base port configurablePhilipp Maier1-0/+1
Currently the rtp base port of the BTS is hardcoded (4000) and not configurable. This patch adds VTY configuration options to make it adjustable. Change-Id: I76e008eb0bd95b2941b67ea2fbdc1a82eef3cc5f
2017-07-25Revert "mgcp: make sure all endpoints are closed on startup"Philipp Maier1-1/+0
Clearing all endpoints by sending a DLCX on startup has ben found to be a bit too offensive. It also will not help against inconsitancies that may occour during runtime (e.g. an overheard DLCX during regular call teardown). This reverts commit b669ea94cb78fd9b56ee8dd9392538151349f8ba. Change-Id: Ia3bd8bfe9a09e300cf11629f7d7e3012ca8f394d
2017-07-25a_iface_bssap: clear lingering subscriber connections on resetPhilipp Maier1-0/+3
When the BSC is vanishing, the subscriber connections will stay active until the MSC is instructed via tha A interface to clear the connections. Unfortunately, this will most likely not be the case because the BSC will most likeley have lost all its state and does not know about the old connections anymore. This patch fixes the problem by looping through the list with the active gsm subscriber connections and clearing them manually when the reset from the BSC is received. Only connections by the bsc who actually executes the reset are affected. Connections from other BSCs will not be touched. Change-Id: Ic2b43b937d08a6dea4fe70dbc3eb722323338dc1
2017-07-25cosmetic: fix typoPhilipp Maier1-1/+1
Change-Id: I2cfea36a5626605ecb72d0f0927ac1a731aa1609
2017-07-25mgcp: make sure all endpoints are closed on startupPhilipp Maier1-0/+1
If the MSC is crashing and restarting, it may leave some endpoints open. The endpoints can not be re-used until they are deleted (DLCX). This patch sends a DLCX to all possible endpoints (usually this is in a countable range) in order to clear possible open endpoints from a previous run Change-Id: I9de2f67ffe08b2d76574ef4470c7a9767ca74702
2017-07-25mgcp: make structs accessible from outsidePhilipp Maier1-1/+15
struct mgcpgw_client and struct mgcp_inuse_endpoint are not accessible from outside, making it difficult to look in the mgcp client properties and status. The commit moves the structs into the header file. Change-Id: I20dcdaac013e3bcbd870eaf34a17598eac373f95
2017-07-25mgcp: improve endpoint managementPhilipp Maier1-3/+7
Currently the assignment of endpoint identifiers works by just incrementing a counter. The mgcpgw only has a limited amount of endpoint identifiers avaliable, this means we will run out of endpoints after only a few calls. This commit adds a mechanism to keep track of used endpoint identifiers so unused endpoint identifiers can be re-used Change-Id: I081f9178975b6593a7ab8de5261a29a1d43d36a3
2017-07-25mgcp: use mgcp DLCX command to terminate endpoint after call is donePhilipp Maier1-0/+1
Currently no DLCX command is sent to the mgcpgw when a call is over, this leaves the endpoint open. This means that the endpoint can not never be reused by other calls. This patch adds a DLCX that terminates the the endpoint when the call is done. Change-Id: Ifc5a7a62fc07b4b7fee612d52e949fcd6a8e04ed
2017-07-25mgcp: add DLCX command to mgcpgw clientPhilipp Maier1-0/+4
The mgcpgw client currently lacks support for DLCX. This patch adds a generator function to generate a DLCX command as well. Change-Id: I1ac4635fc1371f2d3a46815f26a1f9ede3eedafa
2017-07-25fixup: in osmo-bsc-sigtran.h header (bsc_msc_data.h) was missingPhilipp Maier1-0/+1
Change-Id: I4220bc9a3a6f13fd6b09c3a7edadea5b8823d1c5
2017-07-25osmo-bsc: Handle RESET/RESET-ACK properlyPhilipp Maier5-1/+47
Improve the way the BSC executes its RESET/RESET-ACK sequence. Currently only a simple bool variable serves as a state holder. We set this variable to true when we receive the RESET-ACK message. Unfortunately no further checking is done. This patch replaces the old mechanism with a more elaborated implementation which also detects a loss of the connection and makes sure to reconnect properly afterwards. Also the all open connections are closed on connection loss Change-Id: I876319b15103cc395e74597a52ce4d1a934915f4
2017-07-25aoip: signal channel type to BSCPhilipp Maier1-0/+3
obtain the permitted speech and the prefered channel parameters and signal it to the MSC with the channel type field. Change-Id: I642480fa408dee7a4f40f7aab95f40383b3e91af
2017-07-25osmo-bsc: Negotiate rtp ip address/port with BTSPhilipp Maier2-0/+11
This patch adds the support for the RTP IP-Address/Port assignment. The post communicated via the assignment request is now transmitted via RSL/IPACC to the BTS. The Response containing the RX-Port at the BTS side is communicated back to the MSC. Since we plan to add a private MGCPGW to each BSC, this has to be extended. Currently it only creates a direct connection to the BTS. This will be introduced with a future patch. Change-Id: I693e428b6bfdd8534eb5b88fa4d47dac20db88ea
2017-07-25WIP: Integrate AoIP into MSCPhilipp Maier7-10/+97
Change-Id: Iaf7deff397ec95b744fe287e713bbdd6a1ee73cf
2017-07-25WIP: Integrate AoIP into OsmoBSCPhilipp Maier6-0/+62
Change-Id: I5ae4e05ee7c57cad341ea5e86af37c1f6b0ffa77
2017-07-25WIP: Port to new libosmo-sigtran API (with proper M3UA for Iuh)Harald Welte1-5/+9
This changes over to the new libosmo-sigtran API with support for proper SCCP/M3UA/SCTP stacking, as mandated by 3GPP specifications for the IuCS and IuPS interfaces. Only the ASP (client) is used, assuming that both the HNB-GWs and RNCs as well as the MSCs and SGSNs are all connecting as ASP to some STP/SGW which offers M3UA server functionality as well as point-code and/or global title based routing. Change-Id: I450e22d46e47eec350a152f7832428f226bf17fc Tweaked-by: nhofmeyr (test expectation)
2017-07-25mgcp: hack RAB success from nano3G: patch first RTP payloadNeels Hofmeyr1-0/+1
The ip.access nano3G needs the first RTP payload's first two bytes to read hex 'e400', or it will reject the RAB assignment. Add flag patched_first_rtp_payload to mgcp_rtp_state to detect the first RTP payload on a stream, and overwrite its first bytes with e400. This should probably be configurable, but seems to not harm other femto cells (as long as we patch only the first RTP payload in each stream). Only do this when sending to the BTS side. Change-Id: I5eff04dcb0936e21690e427ae5e49228cd459bd4
2017-07-25Implement IuCS (large refactoring and addition)Neels Hofmeyr18-19/+229
osmo-nitb becomes osmo-msc add DIUCS debug log constant add iucs.[hc] add msc vty, remove nitb vty add libiudummy, to avoid linking Iu deps in tests Use new msc_tx_dtap() instead of gsm0808_submit_dtap() libmgcp: add mgcpgw client API bridge calls via mgcpgw mgcp: hack RAB success from nano3G: patch first RTP payload The ip.access nano3G needs the first RTP payload's first two bytes to read hex 'e400', or it will reject the RAB assignment. Add flag patched_first_rtp_payload to mgcp_rtp_state to detect the first RTP payload on a stream, and overwrite its first bytes with e400. This should probably be configurable, but seems to not harm other femto cells (as long as we patch only the first RTP payload in each stream). Only do this when sending to the BTS side. Change-Id: I5b5b6a9678b458affa86800afb1ec726e66eed88
2017-07-25sgsn init: pass sgsn_config pointer to sgsn_vty_init(), not sgsn_parse_configNeels Hofmeyr1-2/+2
In an upcoming commit, sgsn_vty_init() will require access to the global sgsn config struct to initialize a generic VTY command with the proper config destination address, see Change-Id I5b5b6a9678b458affa86800afb1ec726e66eed88. Change-Id: Ie6b6e5422987586531a898e0c5b867623dbecb0f
2017-07-25mscsplit: various preparations to separate MSC from BSCNeels Hofmeyr7-17/+100
Disable large parts of the code that depend on BSC presence. The code sections disabled by #if BEFORE_MSCSPLIT shall be modified or dropped in the course of adding the A-interface. Don't set msg->lchan nor msg->dst. Don't use lchan in libmsc. Decouple lac from bts. Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication: Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to different interfaces depending on the actual subscriber connection. While iu_tx() is going to be functional fairly soon, the a_tx() is going to be just a dummy for some time (see comment). Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer and an indicator for the Integrity Protection status on Iu (to be fully implemented in later commits). Add lac member to gsm_subscriber_connection, to allow decoupling from bts->location_area_code. The conn->lac will actually be set in iu.c in an upcoming commit ("add iucs.[hc]"). move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi(). libmsc: duplicate gsm0808 / gsm48 functions (towards BSC). In osmo-nitb, libmsc would directly call the functions on the BSC level, not always via the bsc_api. When separating libmsc from libbsc, some functions are missing from the linkage. Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also add a _tx to gsm0808_cipher_mode(): * add msc_gsm0808_tx_cipher_mode() (dummy/stub) * add msc_gsm48_tx_mm_serv_ack() * add msc_gsm48_tx_mm_serv_rej() Call these from libmsc instead of * gsm0808_cipher_mode() * gsm48_tx_mm_serv_ack() * gsm48_tx_mm_serv_rej() Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places. Remove internal RTP streaming code; OsmoNITB supported that, but for OsmoMSC, this will be done with an external MGCP gateway. Remove LCHAN_MODIFY from internal MNCC state machine. Temporarily disable all paging to be able to link libmsc without libbsc. Skip the paging part of channel_test because the paging is now disabled. Employ fake paging shims in order for msc_vlr_tests to still work. msc_compl_l3(): publish in .h, tweak return value. Use new libmsc enum values for return val, to avoid dependency on libbsc headers. Make callable from other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c add gsm_encr to subscr_conn move subscr_request to gsm_subscriber.h subscr_request_channel() -> subscr_request_conn() move to libmsc: osmo_stats_vty_add_cmds() gsm_04_08: remove apply_codec_restrictions() gsm0408_test: use NULL for root ctx move to libbsc: gsm_bts_neighbor() move to libbsc: lchan_next_meas_rep() move vty config for t3212 to network level (periodic lu) remove unneccessary linking from some tests remove handle_abisip_signal() abis_rsl.c: don't use libvlr from libbsc gsm_subscriber_connection: put the LAC here, so that it is available without accessing conn->bts. In bsc_api.c, place this lac in conn for the sake of transition: Iu and A will use this new field to pass the LAC around, but in a completely separate OsmoBSC this is not actually needed. It can be removed again from osmo-bsc.git when the time has come. Siemens MRPCI: completely drop sending the MRPCI messages for now, they shall be added in osmo-bsc once the A-Interface code has settled. See OS#2389. Related: OS#1845 OS#2257 OS#2389 Change-Id: Id3705236350d5f69e447046b0a764bbabc3d493c
2017-07-23Use libvlr in libmsc (large refactoring)Harald Welte18-182/+147
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of trial-and-error development collapsed in one patch. This may be split in smaller commits if reviewers prefer that. If we can keep it as one, we have saved ourselves the additional separation work. SMS: The SQL based lookup of SMS for attached subscribers no longer works since the SQL database no longer has the subscriber data. Replace with a round-robin on the SMS recipient MSISDNs paired with a VLR subscriber RAM lookup whether the subscriber is currently attached. If there are many SMS for not-attached subscribers in the SMS database, this will become inefficient: a DB hit returns a pending SMS, the RAM lookup will reveal that the subscriber is not attached, after which the DB is hit for the next SMS. It would become more efficient e.g. by having an MSISDN based hash list for the VLR subscribers and by marking non-attached SMS recipients in the SMS database so that they can be excluded with the SQL query already. There is a sanity limit to do at most 100 db hits per attempt to find a pending SMS. So if there are more than 100 stored SMS waiting for their recipients to actually attach to the MSC, it may take more than one SMS queue trigger to deliver SMS for subscribers that are actually attached. This is not very beautiful, but is merely intended to carry us over to a time when we have a proper separate SMSC entity. Introduce gsm_subscriber_connection ref-counting in libmsc. Remove/Disable VTY and CTRL commands to create subscribers, which is now a task of the OsmoHLR. Adjust the python tests accordingly. Remove VTY cmd subscriber-keep-in-ram. Use OSMO_GSUP_PORT = 4222 instead of 2222. See I4222e21686c823985be8ff1f16b1182be8ad6175. So far use the LAC from conn->bts, will be replaced by conn->lac in Id3705236350d5f69e447046b0a764bbabc3d493c. Related: OS#1592 OS#1974 Change-Id: I639544a6cdda77a3aafc4e3446a55393f60e4050
2017-07-21Add libvlr implementationHarald Welte4-9/+415
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>. This is a long series of trial-and-error development collapsed in one patch. This may be split in smaller commits if reviewers prefer that. If we can keep it as one, we have saved ourselves the additional separation work. Related: OS#1592 Change-Id: Ie303c98f8c18e40c87c1b68474b35de332033622
2017-07-13gsup_client: allow passing a unit id to identify with HLRNeels Hofmeyr1-2/+5
Before, each GSUP client would contact the HLR with an identical unit id, i.e. "SGSN-00-00-00-00-00-00", with the result that some messages were sucked off by the wrong client. Pass explicit unit name from each gsup client user, so that OsmoMSC is "MSC" and OsmoSGSN is "SGSN". Hence the HLR can properly route the messages. Todo: also set some values instead of the zeros. Unrelated cosmetic change while editing the arguments: gsup_client_create()'s definition's oap client config arg name mismatched the one used in the declaration. Use oapc_config in both. Change-Id: I0a60681ab4a4d73e26fe8f0637447db4b6fe6eb2
2017-07-12move openbsc/* to repos rootNeels Hofmeyr93-0/+9944
This is the first step in creating this repository from the legacy openbsc.git. Like all other Osmocom repositories, keep the autoconf and automake files in the repository root. openbsc.git has been the sole exception, which ends now. Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7
2009-06-10move openbsc into its own subdirectoryHarald Welte36-4992/+0
2009-06-09* add support for storing classmark1/2/3 per subscriberHarald Welte2-2/+42
* add support for parsing measurement results (both BTS and MS side)
2009-06-09don't prefix every line with timestamp, this saves some screen real estateHarald Welte1-0/+1
2009-06-08openbscdefines.h: Add header file to control visibility of symbolsHolger Freyther2-1/+36
Add the hooks/configure detection to compile everything with -fvisibility=hidden and then make certain symbols visible. This will be used to make parts of the API public. There are no users yet but we should have some soon.
2009-06-06lchan: Handle the abnormal case of channel getting closedHolger Freyther1-0/+11
The abnormal case is that lchan_free ist getting called due a RSL_MT_CHAN_REL_ACK in the RSL but the refcount of this channel is not zero. This means that some "logical operation" is still going on that needs to be cancelled. Instead of always queuing up all operations in the struct gsm_lchan use the signal framework to inform higher layers about this abnormal case. In gsm_04_08.c a signal handler is installed and in the abnormal case the location updating request operation is freed.
2009-06-06Revert "[db] Keep track of the current gsm_network"Holger Freyther1-1/+1
This was a stupid decision. We will have to assign the network at some other place. The problem will be a problem when we have two gsm_networks in one process and the same subscriber is traveling in both networks.
2009-06-05BS11: add nm_state for EnveBTES, PA and BBSIG physical objectsHarald Welte1-1/+16
2009-06-04[subscr] Remove the struct gsm_bts pointer from subscriberHolger Freyther1-1/+0
The pointer was initially added to support to open a lchan by using the gsm_subscriber structure. We would have restored the struct gsm_bts from the db when loading the subscriber. Instead we will dynamically resolve the gsm_bts and might end up paging multiple bts in the same (stored/old) location area until it answers.
2009-06-04gsm_subscriber.h: Remove trailing whitespace...Holger Freyther1-1/+1
Cosmetic changed
2009-06-02[subscriber] Change id to long long unsigned int (Andreas Eversberg)Holger Freyther1-1/+1
Changes the subscriber id type defintion from "long unsigned int" to "long long unsigned int". Without, printf with '%llu' caused a crash.
2009-06-02[lchan] Log increase/decrease of channel use count (Andreas Eversberg)Holger Freyther1-1/+9
This is part of patch 22 and will log changes in the usecount of the lchan.
2009-05-28* give Siemens ObjClass reasonable names rather than A3/A5/A6Harald Welte2-10/+26
* add nm_state objects for RACK and CCLK * add obj_class human-readable printing for all vendor obj_classes * add human-readable printing of administrative state * add enum for cell_alloc numbers