aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gsm_data.h
AgeCommit message (Collapse)AuthorFilesLines
2015-07-22sub: Add the ability to set prefix for randomly generated extensionsIvan Kluchnikov1-0/+1
Prefix is added before randomly generated extension. Prefix is useful in case of "accept-all" authentication mode is used and routing based on number prefix is used. Added optional configuration parameter "extension-prefix".
2015-05-30libbsc: Abstract out SIs update/generation for a BTS into a separate function.Alexander Chemeris1-0/+1
The code to do that doesn't belong to the control interface, so abstract it out to a separate function gsm_bts_set_system_infos().
2015-04-29sub: Remove the queue from the subscriber codeHolger Hans Peter Freyther1-1/+0
The idea of "subscriber_get_channel" was that different requests would be coordinated. At the same time we have seen that the "queue" can get stuck at both 31C3 and the rhizomatica installations. Voice calls and SMS do not need coordination. We should be able to send SMS on a voice channel and switch the MS from a SDCCH to a TCH in case we establish a voice call. The SMS code itself needs to coordinate to obey the limit of one SMS per direction but this should be enforced in the sms layer and not on the subscriber. Modify the code to have a simple paging coordination. The subscriber code will schedule the paging and register who would like to know about success/failure. This allowed to greatly simplify the paging response handling for the transaction code (and in fact we could move the transaction list into the subscriber structure now). The code gained to support to cancel the notification of a request (but not the paging itself yet). TODO: Cancel paging request in case no one cares about it anymore.
2015-04-04bts: "Repair" broken channels if we receive the release ackHolger Hans Peter Freyther1-0/+11
We had issues with odd behavior on the nanoBTS which lead to the introduction of the "broken" state. On busy multi BTS cells (e.g. rhizomatica) with wifi backhaul the timeout we set to wait for a RF Channe Release ACK is sometimes too little and channels are marked broken that look to be okay (besides the still to be determined delay). In case of a sysmoBTS we now know that we can change the state of a broken channel back to normal in case we do receive the right response. Manually verified using the Smalltalk BTS code PackageLoader fileInPackage: 'FakeBTS' bts := FakeBTS.BTS new. bts btsId: '1903/0/0'. bts connect: 'localhost'. bts waitForBTSReady. test := FakeBTS.OpenBSCTest new. test bts: bts. test requireAnyChannel ... wait for NITB output <0004> abis_rsl.c:223 (bts=0,trx=0,ts=0,ss=0) Timeout during deactivation! Marked as broken. ... process pending messages stdin next <0004> abis_rsl.c:735 (bts=0,trx=0,ts=0,ss=0) CHAN REL ACK for broken channel. Releasing it. So the channel went from broken to unallocated.
2015-01-31bsc/nitb: Allow to set the GPRS mode through the ctrl commandHolger Hans Peter Freyther1-1/+2
Create a control command to read and modify the gprs mode. Use the get_string_value to indicate if the value was found or not. This is useful for the ctrl interface where I didn't want to replicate "none", "gprs" and "egprs". Share code to verify that a BTS supports the mode. Related: SYS#591
2015-01-27nitb: Allow the network to decide if a subscriber should be createdHolger Hans Peter Freyther1-0/+1
2014-12-30move gsm_bts_get_cbch() to gsm_data_shared() as its needed in osmo-btsHarald Welte1-0/+1
2014-12-17bts: When one link drops.. check what needs to be droppedHolger Hans Peter Freyther1-0/+1
In case a BTS is dropped, iterate over the list of BTS and check if a dependency is now missing and then drop the BTS. This check could lead to check of 256*256 checks (e.g. all BTS on each other in the chain and the master is being dropped). The performance aspect of it doesn't matter for our usecase. We expect to have pairs of BTS right now.
2014-12-17bts: Add some simple dependency between different BTSHolger Hans Peter Freyther1-0/+5
E.g. for the sysmoBTS2050 we have the requirement that the first board connects before the second due clocking. The easiest point to enforce this is the BSC. Add a simple bitmask based system to allow to express dependencies for IP based systems.
2014-12-05msc: Add and use gsm_subscriber_groupJacob Erlbeck1-1/+2
Currently every subcriber object directly refers to the gsm_network which contains a flag shared by every related subscriber (keep_subscr). This adds a dependency on gsm_network even if only the function defined in gsm_subscriber_base.c are used. This patch adds a new struct gsm_subscriber_group which contains the keep_subscr flag and a back reference to the network object. The latter is not dereferenced in gsm_subscriber_base.c, so it can safely be set to NULL when only that part of the gsm_subscriber API is being used. It also changes that API to use gsm_subscriber_group instead of gsm_network parameters. Since there are some places where a pointer to the gsm_network is needed but where only a gsm_subscriber is available, a 'net' back pointer is added to the group struct, too. Nevertheless subscr group and network could be separated completely, but this is not the topic of this commit. Sponsored-by: On-Waves ehf
2014-11-21bsc: Allow to generate new system information onlineHolger Hans Peter Freyther1-0/+1
Increase the bcch_change_mark and generate a new copy of the system information. Make the method public, add a small test case. Manually verified using the FakeBTS. I don't know if the MS will re-read these SIs. Related: SYS#739
2014-08-24move gsm_bts_num() to gsm_data_shared.[ch]Harald Welte1-2/+0
this way we can drop a copy of this function from osmo-bts.
2014-04-30sms: Kill the sms->sender and use addr/ton/npi throughout the codeHolger Hans Peter Freyther1-1/+0
This is an incompatible database schema change. Store the type of the address in the database for both the sender and the receiver. Currently it is possible to use SMPP to store a SMS and the NPI and TON will be lost on the delivery of the SMS. The schema is changed to make the delivery always use the right NPI/TON. This patch is not ready for the master branch as there is no upgrade path for the HLR yet.
2014-03-23nitb/ctrl: Add command to add/modify a subscriber to the databaseHolger Hans Peter Freyther1-0/+1
The test has been manually verified. Executing the select for the subscribers showed: sqlite> select * from Subscriber; 1|2014-03-23 12:12:46|2014-03-23 12:19:09|2620345||445567|1||0| This created a subscriber with the right IMSI, MSISDN and has it authorized. Fixes: SYS#275
2014-03-04libbsc: Add ctrl command for MNC, MCC, short-name and long-nameHolger Hans Peter Freyther1-0/+3
Add the framework for adding more setting commands.
2014-02-20sms: Increment the RP Message Reference for each transactionHolger Hans Peter Freyther1-0/+2
Each RP-DATA should have a unique msg reference. Currently 42 is used for all of these. Remember the last reference we used and increment it on the next SMS. Do not track if the reference is still in use a clash is a lot less likely now. First unless SMPP is used only one SMS is delivered at a time, second the transaction space is a lot smaller than the one for the reference.
2014-01-27Add function to update TRAU muxer after assignment or handoverAndreas Eversberg1-0/+14
E1 based BTS use TRAU muxer to decode TRAU frames. After changing channel from one timeslot to another (due to handover or assignment), the TRAU muxer must be updated. The call reference of the call is disconnected from the old channel and connected to the new channel.
2014-01-09Add VTY option for Nokia BTS that does not send RELease CONFirm messageAndreas Eversberg1-0/+12
This option is a workarround for a bug found in Nokia InSite BTS firmware version 3.0.0. There is no RELease CONFirm message for local end release. Nokia MetroSite with firmware version 4.178.16 is not affected. TS 04.06 Chapter 5.4.4.4 "Local end release procedure" states that a confirm must be sent by layer 2 when receiving a local end release request. In order to correctly switch a channel (handover or assignment), local end release is required.
2013-07-27expiration: Speculative fixes for the periodic expiring handlingHolger Hans Peter Freyther1-0/+3
We were expiring subscribers during active calls. This is because the T3212 is stopped under certain conditions but we didn't stop that timer at all. Remember if T3212 timer was stopped due something done by NITB and update the expiration time at the end of the radio connection, as the phone should restart it when returning to MM Idle. It is a bit difficult to decide when we should set the flag. E.g. in a CM Service Request we don't know if we accept the service and during a LU we already send MM messages before we accept or reject the subscriber. The easiest is to set the flag when receiving a paging response on known subscribers and at the end of the authentication process. Do not expire a subscriber that has an active connection that is marked with the flag, e.g. we would still expire a subscriber that is being paged. Manual tests executed/passed: * gst LUTest.st verified that a expiration date was set * gst SMSTest.st (doing another LU but forcing a timeout on the SMS sending). Verified that the expire_lu was updated.
2013-07-11Fix: Handle CM service request on already secured channel correctlyAndreas Eversberg1-0/+1
A CM service request must be acknowledged also, when encryption is already enabled. Without encryption enabled, the security status is GSM_SECURITY_NOTAVAIL, which causes a CM service acknowledge. On initial CM service request, the security status is GSM_SECURITY_SUCCEED, if encryption is enabled. This will not lead to an acknowledge, because the cyphering command implies an acknowlege. An additional CM service request requires an acknowledge, so I added a new security status: GSM_SECURITY_ALREADY
2013-04-29smpp: Attempt to fix a memory leak of the msgbHolger Hans Peter Freyther1-0/+3
The smpp_pdu_rx method does not free the msgb. Introduce an annotation (currently defined to nothing) to indicate what will happen to a msgb.
2013-02-08Fix of IMMIDIATE ASSIGNMENT REJECT messageAndreas Eversberg1-0/+1
The message was corrupt at several points. They are fixed now and successfully tested. A default T3122 timer value of 10 is defined by default now. If set to 0, the reject message will not be sent. Note that when using existing configs with T3122 value set to 0.
2013-01-01libmsc: Track and update the location update expiryJan Luebbe1-0/+3
Set the subscriber expiry timeout to twice the duration of the location update period and provide functions subscr_expire() and db_subscriber_expire() to mark subscribers offline that have missed two location update periods. This patch increases the DB revision to 3, so the hlr will be incompatible with prior versions. We should allow 0 for T3212 as well to disable the location update period. In that case we will need a way to indicate that in the database.
2012-11-24SMPP: add small utility program 'smpp_mirror'Harald Welte1-3/+1
This program binds as ESME transceiver to a SMSC and simply mirrors back all SMS that it receives.
2012-11-24SMPP: Implement support for MO SMSHarald Welte1-0/+8
Each ESME can have a number of prefix-matching routes, or it can be a 'default route' to whcih all otherwise unknown SMS destinations are routed.
2012-11-16SMPP: Implement transaction mode for SUBMIT-SMHarald Welte1-0/+17
WARNING: if the ESME disconnects, osmo_esme gets freed, and sms->smpp.esme might point to invalid/unallocated memory!
2012-09-11libctrl: Change controlif_setup so it returns the ctrl handleDaniel Willmann1-0/+3
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-08-17VTY: dynamically create BTS "type" command syntaxHarald Welte1-0/+3
2012-07-02BSC: introduce new "sysmobts" BTS modelHarald Welte1-0/+2
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-06-16libgb: move GPRS specific msgb CB definitions to separate headerHarald Welte1-25/+0
2012-06-03Allow VTY-based configuration of T3105Harald Welte1-0/+1
This timer will only be forwarded to BS11 and Ericsson Abis so far, not to Nokia and ip.access BTS yet.
2012-03-16bsc: Create a osmo_bsc_data and embed osmo_msc_dataHolger Hans Peter Freyther1-1/+1
We want to have multiple MSCs but we also have some data that is only present on a per BSC basis. Right now the MSC data is not allocated with talloc, so we have some change in the talloc contexts.
2012-01-15abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflagsHolger Hans Peter Freyther1-1/+0
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same time as we only build .a archives.
2011-11-06mncc: Address the fixme and put the mncc_sock_state in gsm_networkHolger Hans Peter Freyther1-0/+3
Remove the unused mncc_sock_write_pending, switch over from the static s_state to net->mncc_state.
2011-08-22audio: Remove the hardcoding of the RTP PayloadHolger Hans Peter Freyther1-1/+0
The MGCP config must be correct and use 99 for RTP AMR.
2011-08-19src: port openBSC over libosmo-abisopenbsc/0.9.15Pablo Neira Ayuso1-0/+4
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
2011-06-05split gsm_data.c in gsm_data_shared.c and gsm_data.cHarald Welte1-0/+10
This facilitates the use of gsm_data.c from osmo-bts
2011-06-03split gsm_data.h in gsm_data_shared.h and gsm_data.hHarald Welte1-513/+4
gsm_data.h is the part that contains BSC-specific data, whereas gsm_data_shared.h is now shareda with osmo-bts
2011-06-03gsm_data: Use osmocom/gsm/sysinfo.hHarald Welte1-3/+3
and include rest_octets.h only in case of BSC
2011-05-24move some more abis_nm related code into libosmocoreHarald Welte1-23/+0
This syncs openbsc.git with libosmocore.git commit rev 11c7193ad8ceb4f3898799dc44b700b8b93a59b8
2011-05-24prepare gsm_data.h header file sharing with osmo-btsHarald Welte1-114/+132
This should not introduce any functional changes, it just re-arranges some definitions in the header file, and introduces the ROLE_BSC define that we enable for the BSC-specific fields.
2011-05-22bsc: on-demand setup of nanoBTS and HSL femto socketsPablo Neira Ayuso1-0/+3
The daemons set up nanoBTS and HSL femto sockets by default, ie. the three sockets to support these two drivers are open even if we have no BTS of that kind. This patch enables on-demand socket creation, ie. we only enable them if we have one BTS at least that requires it. I added two new attributes to the gsm_bts object, they are: * the start() function includes the code that we need to run to start the BTS. This new function contains the socket creation in the particular case of nanoBTS and HSL femto. * the started boolean, which is used to know if we have already started the BTS, ie. we have already invoked start(). Note that, I have splitted the bts_model_*_init() function into two functions, the _init() functions that register the BTS driver and the _start() functions that start BTS driver on-demand. While I was at it, I added several changes/cleanups to this patch: * Group all bts_model_*_init() calls into one function bts_init(), which is called in the initialization path of osmo-nitb and osmo-bsc. * Add openbsc/bss.h that contains the declaration of bsc_bootstrap_network, bsc_shutdown_net and bts_init. * Add missing e1inp_init() in osmo-bsc. * Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-30/+30
Summary of changes: s/struct counter/struct osmo_counter/g s/counter_inc/osmo_counter_inc/g s/counter_get/osmo_counter_get/g s/counter_reset/osmo_counter_reset/g s/counter_alloc/osmo_counter_alloc/g s/counter_free/osmo_counter_free
2011-05-06src: use namespace prefix osmo_timer* for timer functionsPablo Neira Ayuso1-8/+8
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2011-04-18misc: Remove sys/types.h includes from the filesHolger Hans Peter Freyther1-1/+0
These are not needed any more. We used them for u_int types but we now use uint which comes from stdint.h
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-81/+81
This was done with sed on the files.
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-8/+8
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-06OM2000: Track the Operational Info and MO stateHarald Welte1-0/+8
2011-03-04[HSL] initial support for the HSL 2.75G FemtocellHarald Welte1-0/+4
The HSL Femtocell seems to be a poor man implementation of the ip.access Abis/IP protocol, but cutting corners wherever possible. We try to workaround those corners wherever possible...
2011-02-15Allow configuration of SI5 neighbor list != SI2 neighbor listHarald Welte1-1/+10
This introducecs the new VTY command "neighbor-list mode manual-si5" in combination with "si5 neighbor-list (add|del) arfcn <0-1024>", which allows you to (optionally) have neighbor channel lists that differ in SI5 and in SI2.