aboutsummaryrefslogtreecommitdiffstats
path: root/include/openbsc/gsm_data.h
AgeCommit message (Collapse)AuthorFilesLines
2017-08-30move to osmo-mgw.git: osmo-bsc_mgcp and libmgcp as libosmo-legacy-mgcpNeels Hofmeyr1-1/+1
Rewire build and includes to libosmo-legacy-mgcp. Drop osmo-bsc_mgcp and related python tests, now found in osmo-mgw.git. libosmo-legacy-mgcp is installed from osmo-mgw, hence add the dependency to jenkins.sh (so far using the pre_release branch). Change-Id: Ic99d681759edce11564da62500c2aac5cf5fffe2
2017-08-30move libiu to osmo-iuh/libosmo-ranapNeels Hofmeyr1-3/+3
Remove libiu here, use the functions from libosmo-ranap instead, by applying the ranap_ / RANAP_ prefix. Corresponding change-id in osmo-iuh.git is I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0 To be able to run the msc_vlr tests for RAN_UTRAN_IU without Iu client headers available, add iu_dummy.h, containing mere function signatures that match iu_dummy.c and a mostly empty struct ranap_ue_conn_ctx. Make sure we can build with and without --enable-iu: include osmo-iuh headers only with --enable-iu. Change-Id: Ib8c4fcdb4766c5e575618b95ce16dce51063206b
2017-08-30Implement AoIP, port to M3UA SIGTRAN (large addition and refactoring)Philipp Maier1-3/+36
This was originally a long series of commits converging to the final result seen in this patch. It does not make much sense to review the smaller steps' trial and error, we need to review this entire change as a whole. Implement AoIP in osmo-msc and osmo-bsc. Change 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. From here on, a separate osmo-stp process is required for SCCP routing between OsmoBSC / OsmoHNBGW <-> OsmoMSC / OsmoSGSN jenkins.sh: build from libosmo-sccp and osmo-iuh master branches now for new M3UA SIGTRAN. Patch-by: pmaier, nhofmeyr, laforge Change-Id: I5ae4e05ee7c57cad341ea5e86af37c1f6b0ffa77
2017-08-27libmsc: Use actual delivery time in delivery reports.Keith1-0/+1
Set the time on the status report to the time the message was delivered, as this may not be the same as the time when we are delivering the report to the originating MS. Change-Id: I9056429d40bf02731f004b7833f1de45a0d1add8
2017-08-27libmsc: add support for SMPP delivery receiptsPablo Neira Ayuso1-0/+1
If the mobile phone requests a status report via SMS, send a DELIVER_SM with esm_class = Delivery Receipt to ESME to indicate that the SMS has been already delivered to its destination. MS GSM 03.40 SMSC SMPP 3.4 ESME | | | | SMS-DELIVER | | |<----------------------------| | | GSM 04.11 RP-ACK | | |---------------------------->| | | | DELIVER-SM | | | esm_class = Delivery Receipt | | |------------------------------->| | | DELIVER-SM-RESP | | |<-------------------------------| | | | This patch implements "Appendix B. Delivery Receipt Format" as specified in the SMPP 3.4 specs. This string is conveyed in the SMS message as data, and it is only meaningful to the ESME, for logging purposes. The "submit date" and "done date" are not yet set, and other fields are just sent with dummy values, so they are left to be finished as future work. The new SMPP TLV tag TLVID_user_message_reference is added to the SMPP messages inconditionally now since this information is required by delivery-reports to associate the status-report with the original SMS. Change-Id: Ic1a9023074bfa938099377980b6aff9b262fab2a
2017-08-27GSM timers: User reasonable defaults; don't save if equal defaultHarald Welte1-2/+10
A number of the GSM timers (including T3109) had no reasonable default values if not specified in the VTY / config file. Together with unconditional writing to the config file, this created config files with a persistent setting for important timers as '0'. To make things worse, many of our example cofig files suffered from the same problem. Let's avoid this from happening by * having reasonable defaults if nothing specified in the config file * conditionally savingg timers only if they differ from default * reject any timer values that state zero during start-up (see previous commit) Change-Id: Iaac0bfca423852b61d8b9eb1438157ef00d0d8c8 Closes: OS#2380
2017-08-27Implement IuCS (large refactoring and addition)Neels Hofmeyr1-1/+24
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 Enable MSC specific CTRL commands, bsc_base_ctrl_cmds_install() still needs to be split up. Change-Id: I5b5b6a9678b458affa86800afb1ec726e66eed88
2017-08-27mscsplit: various preparations to separate MSC from BSCNeels Hofmeyr1-5/+25
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-08-27Use libvlr in libmsc (large refactoring)Harald Welte1-30/+39
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-08-27move openbsc/* to repos rootNeels Hofmeyr1-0/+596
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 Welte1-406/+0
2009-06-05BS11: add nm_state for EnveBTES, PA and BBSIG physical objectsHarald Welte1-1/+16
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 Welte1-4/+15
* 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
2009-05-23Add user-configurable BSIC settingHarald Welte1-0/+3
2009-05-23With this patch, the TRAU muxing code supports not just bridging only. Harald Welte1-1/+3
A new function trau_recv_lchan() is used to link a channel to a call reference of a transaction. (Transactions are used in later patches.) TRAU frames will then be forwarded to the application with the given call reference (in later patches). Also the application can send TRAU frames by using trau_send_lchan(). A new list is introduced in trau_mux.c. (upqueue_entry) All subslots that must be sent to application are listed here. Received TRAU frames are written in the upqueue of application interface, if a call reference is found in the upqueue-list. If an entry is found the ss_entry list, the TRAU frames are bridged as before. The frames have a message type (msg_type), a call reference (callref) and a trau frame (data). The length of trau frame is defined by the content of the c-bits inside the frame. There is no support for ip.access yet, as they don't use the traditional TRAU frame format. Harald must add this in order to use application interface with ip-access. The bridging with ip-access works as before. (Andreas Eversberg)
2009-05-23add new function gsm_bts_by_lac() to search for BTS based on location areaHarald Welte1-0/+2
2009-05-23* rename the timer functions to avoid name collisions with libmisdn.Harald Welte1-1/+1
* the return value of bsc_update_timers() is required for applications to find out if a timer was fired (Andreas Eversberg)
2009-05-01* Add support for multiple ip.access nanoBTS at one BSCHarald Welte1-0/+6
* keep track of site_id/bts_id in struct gsm_bts * dynamically match incoming OML/RSL over TCP connections by BTS Unit ID * introduce new debug category DINP (separate from DMI for hexdumps) * remove ia_config() as it is no longer needed * * ensure that signalling links / E1 line information is correctly printed * when bootstrapping RSL or OML, tell us for which BTS it is being doen * separate bootstrap_bts() out from bootstrap_network() * statically configure two ip.access BTS, one with unit id's 1800/0/0 and 1801/0/0
2009-04-19[bsc_hack] House keeping, remove dead codeHolger Freyther1-3/+0
This callback is not used from within the paging layer. We do have a different set of callbacks in place. Remove it here.
2009-03-30Store incoming SMS into SQL databaseHarald Welte1-0/+11
* gsm_util now uses caller-allocated data (rather than callee-allocated) * correctly parse destination address * parse (but not transcode) non-default encodings of SMS * reject SMS to unknown destination number * resolve target subscriber id and store incoming SMS (without header) in 'sms' table What we're now missing is the sending part, i.e. a regular task iterating over all pending SMS and trying to deliver them. Also, check for pending SMS once we get a LOCATION UPDATE.
2009-03-10move is_ipaccess_bts() and parse_btstype9) to gsm_data.cHarald Welte1-0/+15
2009-02-28make sure all channels in one BTS use the same TSC (training sequence code)Harald Welte1-0/+3
2009-02-19add gst_ts_name() function to obtain human-readable channel nameHarald Welte1-0/+1
2009-02-17various CC updates:Harald Welte1-2/+8
* correctly lchan_put the second lchan of a call at teardown * map the RTP streams of ip.access onto each other * fix bug that prevented a CONNECt message to ever reach the 'B' side
2009-02-17switch paging code to use a timer again, since not all BTS send reliable ↵Harald Welte1-0/+2
CCCH load indications
2009-02-16forgot the header files in last commit. sigh.Harald Welte1-0/+17
2009-02-16* introduce TLV parser definitions for RSL IE'sHarald Welte1-0/+6
* introduce functions for ip.access specific RSL commands
2009-02-15* add bs_power and ms_power attributes to each channel and use them in ↵Harald Welte1-0/+4
channel activation
2009-02-15* add bsc_hack commandline argument to select BTS typeHarald Welte1-3/+13
* add event-based OML bring-up for nanoBTS
2009-02-14introduce gsm_nm_state object in all our nm-relevant data structuresHarald Welte1-0/+17
2009-02-11[paging] Send paging requests as response to the PAGING LOAD indicatorHolger Freyther1-3/+0
Kill the paging timer and send paging upon paging load notifications.
2009-02-11[paging] Stop counting the requests... harald implemented sepc conform timer ↵Holger Freyther1-1/+0
support We do have a dispose timer, there is no need to discard the paging request this way... remove the code.
2009-02-10* fill the e1_link member of every bts_trx_ts structureHarald Welte1-1/+6
* introduce new timer as part of every paging request
2009-02-10[paging] Introduce a variable containing the free paging slotsHolger Freyther1-0/+3
Start with a large number of available slots. It is guranteed that we will - at some point - get a paging load and will properly update the counter and keep it updated.
2009-02-09[paging] Cleanup page -> paging in function namesHolger Freyther1-1/+1
2009-02-09* add trau_mux implementation to relay from one incoming TRAUHarald Welte1-4/+6
channel to another one (simple voice call switching) * add a way more generic E1 input layer, abstracting out the misdn low-level interface. This also adds infrastructure for multiple TRX in one BTS, as well as multiple BTS on one E1 link * add a E1 subchannel multiplexer for sending multiple 16kbit sub-channels one one 64kBps E1 channel * add TRAU IDLE frame generation * terminate bsc_hack in case there is a E1 / mISDN init error * introduce 'e1_config.c' file with static configuration of our E1 setup (which TRX/BTS is configured for which TEI/SAPI/E1). This should later become a config file rather than a compiled C file. WARNING: all this compiles but is not tested yet. Expect fix-up committs over the next hours or so
2009-02-06[paging] Move the paging state into struct gsm_btsHolger Freyther1-0/+33
There is a 1:1 relationship between gsm_bts and the paging operation. Move the paging state into the gsm_bts which is simplfying the code a lot. This was hinted by LaF0rge. (I'm not happy with the names of the structs)
2009-02-04[paging] Keep a copy of the Control Channel Description in the bts structHolger Freyther1-0/+3
- Initialize Control Channel Description of SI3 - Patch the table - Setting ATT now is easy - Paging can now extract all required information... to determine the right paging group.
2009-02-01introduce generic callback function and hook enumHarald Welte1-0/+10
2009-01-18add BTS TYPE field to facilitate future non-BS11 BTS supportHarald Welte1-0/+8
2009-01-18* use #define for number of TS in one TRXHarald Welte1-1/+14
* use data structure to indicate E1 timeslot/subslot for every TRX:TS
2009-01-04Make gcc happy and remove a couple of warningsHolger Freyther1-8/+0
Remove the callbacks from gsm_network for now. A set of different callbacks will be back. E.g. when the paging is completed, when the Q.931 like call handling is there... Remove var's or move them into #if 0, remove unused stuff that looks like we do not need it anytime soon or #if 0 them, move stuff around.
2009-01-04functions to convert lchan/pchan type into human-readable stringHarald Welte1-0/+4
2009-01-03Clean up struct gsm_network and remove the gsm_subscriberHolger Freyther1-6/+0
2008-12-31Introduce logical updating request operation on the gsm_lchanHolger Freyther1-2/+18
We are going to have logical operations like Phone Call, SMS, Paging, Updating Request on a logical channel and for each of these operations we might need to store state. For now pointers in gsm_lchan look like the best way of doing this and we start by introducing an operation for the location updating request. The new flow of things are: - We get the location updating request and update/create the subscriber and maybe send the identity requests to the mobile station - We start the updating timer, if it times out we will reject the mobile station. - Once we get the Identity Responses we have asked for and the reject timer did not fire yet we might accept the user.
2008-12-30Recylce a gsm_lchan when the refcount drops to zeroHolger Freyther1-2/+16
When a channel is allocated, start a timeout, when a lchan_use is used the timer will be restarted, when the timeout fires we will try to recycle or restart the timer.
2008-12-30* 04:08: add MM INFO information elementsHarald Welte1-0/+2
* gsm_data: add network name to gsm_network
2008-12-29Introduce new callbacks, remember that we have LOC UPD REQ, reject things ↵Holger Freyther1-2/+9
only once gsm_data.h add new callbacks, add some parameters, update bsc_hack and other call sites. Remember that we need to ACCEPT/REJECT the LOCATION UPDATE REQUEST and then send the ACCEPT or schedule the sending of the reject. Currently it is possible that for a new subscriber that we do not have a !subscbr yet, we will trigger an IDENTITY REQUEST and schedule the reject timer. This may lead to rejecting AND accepting (a new subscriber). This issue is triggered when allowing everyone to connect to the network.
2008-12-29Up on call released release the channel and take the next itemHolger Freyther1-0/+1
Once a call is released, release the gsm_lchan and move to the next item in pending_stations or wait for more work.