Commit Graph

3097 Commits

Author SHA1 Message Date
Harald Welte 76556376c3 MNCC: rename mncc_send() to mncc_tx_to_cc()
This name clearly indicates: MNCC api transmits to Call Control,
i.e. down from the L4/application into the L3 04.08 code.
2011-01-01 17:23:41 +01:00
Harald Welte 3e6376d20d MNCC: split into generic mncc.c and mncc_builtin.c
The built-in code to handle call switching inside OpenBSC is
now in mncc_builtin.c, whereas some core/utility functions remain
in mncc.c
2011-01-01 17:23:41 +01:00
Harald Welte 081e14d071 MNCC: make get_call_ref() function static 2011-01-01 17:23:41 +01:00
Harald Welte e6da14fde4 MNCC: clarify naming / rename mncc_recv() to int_mncc_recv()
the int_ perfix (internal) symbolizes that this is the internal
MNCC handler code, receiving messages from the MNCC interface point.
2011-01-01 17:23:41 +01:00
Harald Welte 54209c2dce MNCC: rename mncc_upq_enqueue() to cc_tx_to_mncc()
The new function name clearly indicates: The Call Control
(TS 04.08, msc-side in OpenBSC) wants to transmit something to the
MNCC interface.
2011-01-01 17:23:41 +01:00
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther 08eebd59b7 lchan: Every SS_LCHAN signal now sends a struct lchan_sig_data
The SS_LCHAN signals now always include the lchan_sig_data. For
the measurement report it will optionally include the measurement
report as well. Attempt to update all handlers of this signal as well
2010-12-27 13:32:20 +01:00
Holger Hans Peter Freyther 9ae7b29e3a bsc: Some S_LCHAN signals don't provide an lchan
Check the signal and only continue if it is any of the
signals we want to handle. In the case of measurement
reports we would cast some random code to a lchan.
2010-12-27 12:30:12 +01:00
Holger Hans Peter Freyther 59f787a4c1 auth: Release the security operation after we sent out a message
The release might release the lchan we want to send the response
on. Reorder the code to first send the message and then give up
the security operation which might release the lchan.
2010-12-27 10:58:55 +01:00
Holger Hans Peter Freyther 8ce8d3a00d bsc: Avoid crashing when no lchan is present in the subscriber connection
If someone wants to send a message but we have no lchan anymore
we will now complain, delete the message and return.
2010-12-27 10:58:55 +01:00
Sylvain Munaut cfcf7e84bd gsm_04_08_utils: Fix Channel Request mode for e0/e0 and neci=1
According to the specs (GSM 04.08 Table 9.9), the only possibility
if neci=1 and this cause is used is "Originating call and TCH/F is
needed"

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-27 00:59:23 +01:00
Holger Hans Peter Freyther f64a20f2e8 db: Quote the IMEI string before passing it into the database. 2010-12-26 21:19:29 +01:00
Holger Hans Peter Freyther 9d3e2ec698 ho: Access the network after we are known to have an entry. 2010-12-26 21:19:29 +01:00
Holger Hans Peter Freyther c839667324 ho: Set the conn to NULL before calling lchan_release
In case we fail to activate the lchan set the connection to
NULL before calling the lchan release function.
2010-12-26 21:19:28 +01:00
Harald Welte 019d0167b6 [db] Properly quote name and extension for SQL access 2010-12-26 19:20:15 +01:00
Harald Welte c728eeaf9b SGSN: Avoid duplicate MM contexts in case MS and SGSN disagree on P-TMSI 2010-12-26 19:20:07 +01:00
Harald Welte a9b473a3c2 SGSN: Implement network-initiated PDP CTX DEACT when GGSN restarts
If the GGSN restarts, its restart counter will increase.  We can
detect that and accordingly release/delete all PDP contexts for
that GGSN.
2010-12-26 19:20:03 +01:00
Harald Welte 3357add225 SGSN: some more comments 2010-12-26 19:19:56 +01:00
Holger Hans Peter Freyther c407ba5ed2 Merge branch 'zecke/sms-queue' 2010-12-26 09:42:19 +01:00
Holger Hans Peter Freyther 5479fc80d5 sms: Make sure that this loop is broken from time to time. 2010-12-26 09:40:49 +01:00
Holger Hans Peter Freyther 203845730f sms: Rewrite the queue to find SMS harder.
With the old code it was possible that we first saw SMS that
we have already in the queue. In that case we had free slots
available but have not filled them. With his new loop we try
harder to find SMS we can send, it attempts (and should work)
to detect a loop to break the loop before finding SMS to deliver.
2010-12-26 09:40:48 +01:00
Holger Hans Peter Freyther f7e2389eb6 sms: Move the finding of the next SMS to handle to a new method
Prepare changing the loop to fill all the available slots. Set
the last subscriber based on the SMS query.
2010-12-26 09:40:48 +01:00
Holger Hans Peter Freyther a37e3bc39a sms: Change the default values for the sms_queue
Increase the number of SMS we will try to send at a time and
decrease the failures we handle before going to the next item. With
the default timeout we will attempt to page the subscriber for 60
seconds and we can increase the queue speed by going to the next
item faster.
2010-12-26 09:40:48 +01:00
Holger Hans Peter Freyther a3a659ba5c sms: Workaround a bug in the db layer and update the data
The sync with the database might fail. Reread the updated
subscriber after we have written it. The source of this
failure is unknown.
2010-12-26 09:40:48 +01:00
Holger Hans Peter Freyther 445e615d03 sms: Always go through the database and the smsqueue to send messages
This is also fixing a memory and subscriber leak. Make sure to
always release the gsm_sms structure.
2010-12-26 09:40:48 +01:00
Holger Hans Peter Freyther 994dcbb201 sms: Allow setting amount of failures through the vty. 2010-12-26 09:40:30 +01:00
Holger Hans Peter Freyther 7e59c83d66 sms: Make the amount of failures configurable as well. 2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther 4dcc5e5f8a sms: Add vty command to clear the pending message 2010-12-26 09:40:03 +01:00
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