Commit Graph

827 Commits

Author SHA1 Message Date
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
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
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 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 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 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 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 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 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 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 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 53cd7ac44c Dynamic PDCH: rsl_ipacc_pdch_activate() operates on a timeslot
... not on the lchan.
2010-12-23 14:41:40 +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
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 3547045c73 misc: Remove gsm_subscriber.h include to reduce dependencies. 2010-12-22 18:26:36 +01:00
Holger Hans Peter Freyther d85642a1a7 ts Make the e1inp_ts delay configurable
Currently the nanoBTS bootstrap code requires a high delay
otherwise we are not bringing the device up properly. Changing
the init code turns out harder than it seems like. So this is
a workaround for that to allow a high speed RSL/OML connection
after the bringup.

The line driver can have a default TS delay. It is set to the
current default for the nanoBTS and the BS11. For the ipaccess
case we will set the delay lower for the RSL connection and
inside the ipaccess-config we can set it low right away to
have fast firmware flashing and such.
2010-12-21 13:53:41 +01:00
Holger Hans Peter Freyther 6f615551a4 abis_nm: Band aid on OML initialisation by queuing messages
Instead of sending many messages we will queue the OML
messages and wait for the ACK/NACK before sending the
next message from the queue. We tag the msgb to remember
if we need to wait for an ack or not.

We keep the order of all messages, on ACKs and similiar
occassions we will drown the queue until we reach a message
that needs to be acked and then wait for that ack again.

Possible breakage can appear when we send an OML (e.g.
BS11 specific message) msg which does not need to be acked
through the abis_nm_sendmsg call. The fix will be to use
the _direct version of this method.

Re-Enable as it might have fixed something... who knows.

Conflicts:

	openbsc/include/openbsc/abis_nm.h
	openbsc/include/openbsc/gsm_data.h
	openbsc/src/abis_nm.c
	openbsc/src/gsm_data.c
2010-12-21 13:53:41 +01:00
Harald Welte f751a10018 bs11_config: show the BPORT0 / BPORT1 configuration in 'query'
This introduces abis_nm_bs11_get_bport_line_cfg() and a parser for the result.
2010-12-14 12:52:16 +01:00
Sylvain Munaut 98b53cba06 include: Add proper predeclaration for struct in mncc.h
We use them, so declare them. (avoid including all gsm_data.h)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:27 +01:00
Sylvain Munaut 81a8bf1039 include: Small fixes to gsm_data.h
We don't really need openbsc/gsm_04_08.h or abis_rsl.h
But we do need some definition from libosmocore

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:27 +01:00
Sylvain Munaut 12e373c218 include: Add proper predeclaration for struct in system_information.h
We use them, so declare them. (avoid including all gsm_data.h)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:26 +01:00
Sylvain Munaut 3f16da2032 include: Add proper predeclaration for struct in abis_rsl.h
We use them, so declare them. (avoid including all gsm_data.h)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:26 +01:00
Sylvain Munaut c7ff2572a7 paging: Give the msgb that caused paging_stop up to the paging callback
The handler might need to know some info of the paging response

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 22:39:40 +01:00
Sylvain Munaut e0b06b0293 bsc: Allow to configure Optional Cell Selection params from vty
The default values are those where the parameters are encoded
as '0' and they're not output in the config file if that case

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 20:23:34 +01:00
Holger Hans Peter Freyther 70c232f75a mid-call: Implement a timer to go from grace to off.
Start the timer... switch it off when we do the final
tranistion by a command.
2010-11-26 00:06:01 +01:00
Holger Hans Peter Freyther bb62b3f053 mid-call: Rename ussd-grace to mid-call 2010-11-26 00:03:32 +01:00
Holger Hans Peter Freyther 625b6e4dab mid-call: Introduce a timeout to switch from grace to rf off. 2010-11-26 00:02:12 +01:00
Holger Hans Peter Freyther b4e72f881c bsc: Implement queuing of messages to the MSC before the con is established 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther b79c3c97a2 bsc: The ip.access rtp-payload has no useful meaning
Sending this as the RTP_PAYLOAD2 will produce a MDCX NACK
as we send the RTP_PAYLOAD in the CRCX. It does not seem to
be necessary to send anything != 0 for the RTP_PAYLOAD2.
2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther 620c2e678a bsc: Add thr audio module to send the MDCX message to the BTS 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther 50c579b8c5 bsc: Implement the assignment command to the point of calling into the BSC API 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther fae3c65938 bsc: Parse the cipher mode command and pass it to the BSC api. 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 863a55d44d bsc: Make bsc_queue_for_msc work on the osmo_bsc_sccp_con
The gsm_subscriber_connection can die before the SCCP connection
so we should work on the osmo_bsc_sccp_con.
2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 3485feb49b bsc: Add module for handling BSSAP input
The current implementation is a stub. The code from
bssap.c of on-waves/bsc-master will be migrated into
this new structure
2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 00f4cc22c8 bsc: Implement closing the connections when the MSC goes missing
Refactor the closing code of the CC timeout to a new function,
also make sure that the SCCP Connection is forced closed before
we destruct the connection for real.
2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 7e9010892d bsc: Make open/close work on the sccp data 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther b8781d2cd5 bsc: Start to open a SCCP connection and prepare timers and such. 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther 9b17c769b9 bsc: Work a bit on opening the SCCP connection to the MSC.
Most of the code is still stubs but the structure is a lot
cleaner than the one in the on-waves/bsc-master branch.
2010-11-15 20:06:48 +01:00