Commit Graph

3019 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 3c6f6c25a6 sms: Make the max_pending tunable via a vty runtime setting
Make it possible to change the max pending via the vty. This
can be useful to play with the performance of the queue.
2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 7a0e166fb0 sms: Add vty command to trigger running the queue.
Allow to manually trigger running the queue. This can be useful
if SMS were manually added to the database or such.
2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 81c0e2582f sms: Provide some simple vty command for the state of the SMS queue 2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 17164061a6 sms: Begin sending SMS messages, handle failures
The sms queue will attempt to send one SMS per subscriber
to fill all the available slots. It will handle the case
where paging has not started, timed out or if there was
any kind of other failure. It is also retransmitting SMS
in case of failures.
2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 11b28f9c26 sms: Introduce a SMS queue that will be responsible for delivery
The SMSqueue will be responsible of sending to the user. It will
do so in a loop and will also try not to overload the BTS. This
means the throughput of SMS will be limited.
2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 04144c1905 sms: Create signal data for SMS with more information
This is providing access to the paging result, the sms,
the transaction. This will allow the SMS queue to do
decisions based on the source of the failure.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther 0eb7666efa sms: Dispatch a failed signal in many of the MT-sms points
This attempts to dispatch a signal whenever a MT-sms is failing. In
some cases, e.g. with freeing the transaction, this will also happen
for MO-sms.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther 41c5aaf62c sms: Use the SMS in the signals where it makes sense.
The signal_data was inconsistent. Sometimes we passed the transaction
and sometimes we passed the sms. Change it to always pass the sms. The
S_SMS_SMMA is a bit special as it does not involve any SMS.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther 69ac83dd54 sms: Add a simple SystemTap probe to see SQL queries
This will proble all queries done in the system. This can
help to identify some issues with libdbi's performance.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther 9d277d3b33 sms: Add a script to query for unsent SMS
This is generating the query statement. It can be used to
play with database indexes and such.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther e3018c7ad6 sms: Add dummy script to create subscribers and SMS
This is creating 1000 subscribers and 30 SMS each. The SMS
itself is badly formatted (not a valid 7bit encoding) but
it should be enough for a stress test.
2010-12-26 09:40:02 +01:00
Holger Hans Peter Freyther dd715bd2ee sms: Fix a small typo. 2010-12-25 21:39:04 +01:00
Holger Hans Peter Freyther 73b878a85a db: Introduce a limit in delivery attempts for the SMS search
We do not want to attempt submitting SMS that has failed for
too many times. The failure could be due RF failure or due
a bug in the message handling.
2010-12-25 21:39:04 +01:00
Holger Hans Peter Freyther 812dad0ff7 db: Add method to load a SMS by id. 2010-12-25 21:39:04 +01:00
Holger Hans Peter Freyther e25445b864 subscr: Sync the database before sending the attached signal
If a signal handler accesses the database he will still see
the old lac. Make sure he is seeing the new one. Update the
subscriber from the database in case the query failed or other
things have changed.
2010-12-25 21:39:04 +01:00
Holger Hans Peter Freyther 3d76e44968 subscr: Print the lac of the subscriber. 2010-12-25 21:39:04 +01:00
Holger Hans Peter Freyther d3baf415b1 paging: Introduce a GSM_PAGING_BUSY event for a special timeout
Start counting the attempts of each paging request and call
the callback with the PAGING_BUSY type when the paging request
timed out but the subscriber was not paged at all. This can
only happen with a huge paging backlog.
In case the system has so many pending paging
2010-12-25 21:39:04 +01:00
Holger Hans Peter Freyther ee139e7253 Merge branch 'zecke/subscr' 2010-12-24 21:43:14 +01:00
Holger Hans Peter Freyther abd0cac0c5 subscr: Add a VTY command to update the subscriber from the database. 2010-12-24 21:40:48 +01:00
Holger Hans Peter Freyther c577ca1822 subscr: Add VTY command to purge subscribers that are held in memory
Call the subscr_purge_inactive function and mention how many
subscribers were removed from the RAM.
2010-12-24 21:40:48 +01:00
Holger Hans Peter Freyther ae9006aeed subscr: Introduce VTY option to keep subscribers in ram. 2010-12-24 21:40:48 +01:00
Holger Hans Peter Freyther f694d5f47a subscr: Introduce subscr_purge_inactive to free unused subscribers
Introduce a method that will remove all subscribers that have a
zero use count. This is useful if someone wants to purge subscribers
from memory or wants to disable the everything in RAM feature.
2010-12-24 21:40:47 +01:00
Holger Hans Peter Freyther daee5ca7c1 subscr: Make it possible to keep subscribers in RAM.
This is implemented by not freeing the subscriber when the
reference count becomes smaller than zero. We hope that this
will save many database accesses during the congres.
2010-12-24 21:40:47 +01:00
Harald Welte a29e43a26f BSC Call Control: Actually implement call statistics
The existing call realated statistics counters apparently were
never used.  This introduces a new set of counters, two for the
MO and MT case.
2010-12-24 16:07:40 +01:00
Harald Welte 75e2defc7f BSC VTY: Print some more of the already-generated statistics 2010-12-24 16:07:35 +01:00
Harald Welte eafe22ca72 SGSN / GMM: Only allow non-roaming IMSIs
As we do not yet use the HLR from the SGSN, we allow all MS to
attach to our GPRS network.  However, if this is running in a public
environment, it could cause service interruption to users of commercial
GPRS networks.

Thus, we now check if the first 5 digits of the IMSI match the MCC/MNC
of the cell that they want to register to.  Thus, any subscribers with
SIM cards from real operators will no longer be accepted.
2010-12-24 15:42:26 +01:00
Harald Welte 2cafc4b309 BSC API: Make 'Got data in non active state' message as LOGL_INFO
LOGL_ERROR will make this message shpw up in everey default log
config.  However, as it seems, this is commonly observed in case
a MS still sends a MS STATUS (in respons to the MM INFO) at the
end of a location area update.

It might be best to actually change the channel release procedure
to make sure we can still pass such 'late' data to the MSC until
the time the Layer2 has been completely released.
2010-12-24 15:42:22 +01:00
Harald Welte 3a3c277b70 RSL: Make "waiting for SAPI=%d to be released" LOGL_DEBUG 2010-12-24 15:42:17 +01:00
Harald Welte b29cea1d9c Fix some stupid typos resulting in compile errors. 2010-12-24 12:26:13 +01:00
Harald Welte 712ddbcd72 BSC VTY: Fix off-by-one / segfault in 'show bts NR' 2010-12-24 12:24:03 +01:00
Harald Welte 85bded8b50 BTS VTY: Order bts-trx-ts-lchan in 'show lchan' 2010-12-24 12:22:34 +01:00
Harald Welte cd103a9a5d BSC VTY: Print the current mode of a dynamic TCH/F / PDCH 2010-12-24 12:14:52 +01:00
Harald Welte 026b4cab36 BSC VTY: Change order of elements in 'show timeslot' command
It's not logical to first show TS, then TRX, then BTS.  It should
always be ordered from big to small (BTS, TRX, TS)
2010-12-24 12:12:10 +01:00
Harald Welte 127af34eea BSC VTY: Remove extraneous 'else' from write_ts_single()
This caused the E1 parameters not to be displayed in case the channel
was using frequency hopping.
2010-12-24 12:07:07 +01:00
Harald Welte 274d015cbb BSC VTY: Fix 'show timeslot' command if BTS and/or TRX are specified 2010-12-24 12:05:03 +01:00
Harald Welte f6bd340df6 GPRS/GMM: Correctly look up MM Context in RA Update
If a MS changes RA, the RA will arrive in the new cell using the old
TLLI (masked as foreign TLLI).  So we need to look-up the TLLI
in a special way, using the old RA as indicated in the 04.08 GMM
message.

There is still another bug remaining: As we somehow create a new LLC,
the sequence numbers of our responses start from 0 again, which is not
what the MS expects.  This needs to be fixed in a follow-up patch.
2010-12-23 23:38:02 +01:00
Harald Welte 985263e55f GPRS: enhance msgb headroom/tailroom for SGSN (GMM)
In the GPRS NS protocol stack, the amount of NS/BSSGP headers like MS RADIO
CAPA INFO can be quite long.  In order to fit the full user message and
those headers, we have to enlarge the head/tailroom of the msgb allocations.
2010-12-23 23:37:55 +01:00
Harald Welte 082b01f18e More verbose logging of authentication internals 2010-12-23 23:37:49 +01:00
Harald Welte c9f499f7d3 IMM ASS REJ: Actually add t3122 parsing to vty code 2010-12-23 23:37:45 +01:00
Harald Welte 86dda08762 Authentication: use ENUM instead of magic numbers
This improves readability of the code...
2010-12-23 18:09:51 +01:00
Harald Welte 2862dcac58 Use 04.08 IMM ASS REJECT in case we run out of channels
If the user has a non-zero 'timer t3122' in the config file, we will
send an IMM ASS REJECT in case we run out of resources.
2010-12-23 14:41:50 +01:00
Harald Welte d0d2b0b605 Dynamic PDC: Add VTY comand 'bts N trx M timeslot O pdch [de]activate'
On a nanoBTS, this command can be used to manually switch a given 'dynamic
pdch/tch' timeslot from one mode into the other.

There are no safeguards that the timeslot is not in use at the given time.
2010-12-23 14:41:44 +01:00
Harald Welte 53cd7ac44c Dynamic PDCH: rsl_ipacc_pdch_activate() operates on a timeslot
... not on the lchan.
2010-12-23 14:41:40 +01:00
Holger Hans Peter Freyther d4e6872d6c gsm48: Release the LU procedure only after the TMSI REALL_COMPL
We send a LU Accept with the TMSI as the MI. According to the
spec the phone should store this new TMSI and send a TMSI
REALLOCATION COMPLETE to us. We will release the LU then and this
should trigger the release procedure.
2010-12-22 20:25:38 +01:00
Harald Welte 434bb3f39f MNCC: introduce mncc_upq_enqueue() wrapper around msgb_enqueue()
This wrapper will allow us to add queue related code at one single
location in the code as opposed to three locations.
2010-12-22 19:03:40 +01:00
Harald Welte 7ce5e259c9 mnccc.c: Add 2 line header describing what this file is all about 2010-12-22 19:03:40 +01:00
Holger Hans Peter Freyther f93e8fabd8 gsm48: Use NULL instead of 0 for pointers in C. 2010-12-22 18:26:36 +01:00
Holger Hans Peter Freyther 6003d6b928 rsl: Remove unimplemented/unused rsl_paging_cmd_subscr
RSL should not know the details of a GSM Subscriber anyway.
2010-12-22 18:26:36 +01:00
Holger Hans Peter Freyther 28dcbc5ee5 misc: Remove gsm_subscriber.h from the db.h file
Reduce the dependencies on the header files.
2010-12-22 18:26:36 +01:00
Holger Hans Peter Freyther c5faf66b82 misc: Reorder includes, move osmocore to the end 2010-12-22 18:26:36 +01:00