Commit Graph

109 Commits

Author SHA1 Message Date
Harald Welte 73ddaeddd2 measurement report: correctly parse BSIC of first neighbor cell 2009-12-16 23:29:12 +01:00
Harald Welte a2f74b8477 04.08: fix off-by-one error while parsing measurement results 2009-12-16 16:49:21 +01:00
Harald Welte d12b0fdf51 introduce cache of 6 last recently received measurement reports for each lchan 2009-12-15 21:36:05 +01:00
Harald Welte f1dae1924a 04.08 MEAS REP: Convert relative cell number to ARFCN
Since we are keeping a bitvec of the neighbor cells, we can now use
bitvec_get_nth_set_bit() to determine the ARFCN for each reported
cell in the 04.08 MEASUREMENT REPORT.
2009-12-14 22:24:28 +01:00
Harald Welte 1e191c59f6 fix compiler warnings in gsm_04_08.c 2009-12-14 17:51:15 +01:00
Harald Welte 648b6ce083 Add VTY setting for whether or not to sending MM INFO 2009-12-14 09:00:24 +01:00
Harald Welte 7659de1bcb introduce new signal every time we get a mobile identity 2009-12-13 12:39:18 +01:00
Harald Welte 09b7e7fa43 Gracefully reject non-speech calls
As we currently really only deal with voice/speech calls and don't
support FAX and DATA (CSD) calls, we now gracefully reject them.
2009-12-12 21:36:53 +01:00
Harald Welte b83d938565 [04.08] use lchan_auto_release to quickly close channel
In some cases, we can try to close the lchan a bit faster than our
lchan release timeout:
* After we've sent LOC UPD ACCEPT and MM INFO
* After a phone has confirmed the RELEASE of a call
2009-12-12 21:00:48 +01:00
Harald Welte 1085c097e3 location updating reject cause now specified on VTY rather than command line argument 2009-12-06 12:22:59 +05:30
Harald Welte 2c82899135 move RTP socket information from timeslot to lchan
With ip.access, in case of TCH/H, we have one RTP stream for each half-slot
(lchan), not just one per on-air timeslot.  This is quite different from
a classic BTS where the TRAU frames of the two TCH/H channels would be
part of the same 16k sub-slot in a E1 timeslot.
2009-12-02 01:56:49 +05:30
Harald Welte d011e8b958 [handover] Introduce new handover related LCHAN signals
This introduces the signals S_LCHAN_ACTIVATE_{ACK,NACK} and
S_LCAN_HANDOVER_{FAIL,COMPL,DETECT} as well as code that actually issues
those signals.  The signals are relevant for a yet-to-be-written handover
control logic.
2009-11-29 22:45:52 +01:00
Harald Welte ccd5a8892d print debug statement in case of HANDOVER COMPLETE or HANDOVER FAILED 2009-11-29 20:02:20 +01:00
Harald Welte 3c7dc6ed50 New complete measurement result/report handling
This patch extends struct gsm_meas_rep into a complete structure containing all
information from both uplink and downlink measurement results/reports.

This is a first step to provide this complete measurement data as a C structure
into a to-be-implemented handover decision algorithm.
2009-11-29 19:07:28 +01:00
Holger Hans Peter Freyther ea52802762 [lchan] RSL and RR need the multirate config, place it in the lchan
Both GSM 04.08 RR and GSM 08.58 RSL need the multirate config
in the channel modify. Place the config in the lchan, change
the gsm48 methods to not take the argument, change the RSL
implementation to make use of it with the right IE.

The other code should use the t(l)v_put routines as well but
were left untouched for now.
2009-11-19 11:42:03 +01:00
Holger Hans Peter Freyther 231163d365 [ipa] Change names of RTP methods to follow MGCP naming
IPA is naming these functions CRCX, MDCX, DLCX to follow
the naming of the MediaGatewayControlProtocol. Change the
code to go from BIND to CRCX (create connection) and from
CONNECT to MDCX (modify connection).

Connect indicates that it is only possible to call it once
while it is possible to call it more than once to modify
the audio parmaters and such. So the IPA terminology is
making a bit more sense here (now that we know it).
2009-11-19 09:40:03 +01:00
Holger Hans Peter Freyther a6bcc74716 [gsm48] When picking AMR we need to supply the multirate config
On channel mode modify and assignment command when using
the a multirate code the multirate configuration must be
present in the packet.
Add a parameter and add a warning when using it in a
broken way.
2009-11-17 18:20:17 +01:00
Holger Hans Peter Freyther ccf53c60c5 [mncc] Fix possible transaction/subscriber and real life subscriber leak
In the case a transaction has been already scheduled return 0 was
called but the subscriber and transaction would leak. Fix it by
calling subscr_put and trans_free.

After claiming the channel also remove the reference on the subscr.
2009-11-06 23:38:34 +09:00
Holger Hans Peter Freyther f520e6439a [gsm48] Handle the RR CHAN MODIFY ACK in the gsm04_08_utils
Move the handling code to the gsm_04_08_utils.c and add a
note that the method value needs to be checked.
2009-10-27 04:52:30 +01:00
Holger Hans Peter Freyther ff3f260e4f [gsm48] Move RR CHANNEL MODIFY to gsm_04_08_utils.c
Be able to send RR CHANNEL MODIFY from the BSC/MSC code
as well. Move the method that knows about the IPAccess RTP
and issues the "bind" to the utils tool
2009-10-27 04:52:29 +01:00
Harald Welte 6eafe9137c Add USDD code from Mike Haben
This is the initial checkin of the USSD code from Mike Haben.  I didn't
put it in the main branch as I think it still needs some cleanup.
2009-10-26 20:39:25 +01:00
Holger Hans Peter Freyther ca0fcbe157 [gsm48] Make method name consistent...
We use rx_rr to indicate that we have received a radio resource
message but one method was using rr_rx. Fix that.
2009-10-23 13:48:54 +02:00
Holger Hans Peter Freyther 8b77a34131 [rrlp] Fix compiler warnings
The apdu is static const u_int8_t. Change the signature to
have a const in there to make the compiler happy, include
chan_alloc.h for lchan methods.
2009-10-22 15:42:19 +02:00
Holger Hans Peter Freyther dc1e1058f3 Fix warnings by removing unused variables 2009-10-22 15:40:33 +02:00
Holger Hans Peter Freyther ea4088a7ea [gsm0408] Move encryption message creation to gsm_04_08_utils.c
Be able to use the cipher mode command message from the MSC code.
2009-10-06 04:34:25 +02:00
Mike Haben e2d8227499 [ipaccess] Add nanoBTS 1900 support
Add support for 1900 nanoBTS by using unified bts_type
GSM_BTS_TYPE_NANOBTS for 900, 1800 and 1900 versions.

Reduce the nanoBTS enum values to one and derive the
version from the user supplied band. In the future we
might want to do auto band detection.

The configuration file needs to be changed to refer
to nanobts instead of nanobts900/nanobts1800.

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-05 12:12:54 +02:00
Holger Hans Peter Freyther 3ee5d3e8af [gsm0408] Move paging handling to gsm_04_08_utils.c
Add one method to extract the MI which will allow to load
the gsm_subscriber depending on the MSC/BSC setup and then
use gsm48_handle_paging_resp to finish the paging response
handling.
2009-09-28 12:50:49 +02:00
Holger Hans Peter Freyther adc1478a47 [gsm0408] Move send_siemens_mrpci to gsm_04_08_utils.c 2009-09-28 12:50:49 +02:00
Holger Hans Peter Freyther 2223025e21 [tmsi] Make the tmsi a 4 octet number
tmsi is four octets long, there is no need to make it a string
and then jump through hoops to convert it to a number. Keep the database
using it as a string to benefit from the NULL handling of the db.

Introduce the reserved tmsi which has all bits set to 1 according
to GSM 03.03 §2.4 and start checking for it and make sure the db
code will never allocate such a tmsi.
2009-09-28 05:14:25 +02:00
Harald Welte 23b710fa4f Merge branch 'master' into encryption 2009-09-27 11:13:55 +02:00
Sylvain Munaut 1dcfc00192 [gsm_04_08] Fix gsm48_send_rr_ciph_mode algorithm ID
The algorithm ID used in the GSM 04.08 RR message is
(x-1) for A5/x. In RSL it's (x+1) for A5/x so there is
a difference of 2.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-27 11:11:41 +02:00
Sylvain Munaut 849f554c87 [gsm_04_08] Fix gsm48_tx_mm_auth_req implementation
It was mainly missing the key_seq field, causing the
command to just be rejected by the ME.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-27 11:10:17 +02:00
Mike Haben 59d284e8cf non-call related SS (USSD) is not unknown, but unimplemented
also, if we write 0x in front of a number, it should be hex.
2009-09-26 19:00:03 +02:00
Harald Welte 08d91a5b26 A5 support for RSL and 04.08 (not used yet)
This just adds the 04.08 and RSL bits for A5, but not the logic
for performing authentication.

The caller would first set lchan->encr and then call
gsm48_send_rr_ciph_mode(lchan), which encapsulates the 04.08
CIPHERING MODE COMMAND into a RSL ENCRYPTION COMMAND and sends it
to the BTS for execution + forwarding.
2009-08-30 15:37:11 +09:00
Holger Hans Peter Freyther 5d0e56f722 [gsm48] Introduce a gsm48_generate_mid_from_imsi method
Prefix generate_mid_from_tmsi with a gsm48_, create a new method
to binary encode the imsi. Add a unit test for parsing and decoding.

The implementation can parse the data it generated and the
last octet seems to be filled with the end mark.
2009-08-20 13:59:14 +02:00
Holger Hans Peter Freyther d1862d7cf9 [gsm48] Move parsing of the MI from to gsm_04_08_utils.c
The parsing of the IMSI is needed for the MSC part as well. Move
it to the gsm_04_08_utils.c so it can be used.
2009-08-20 13:57:12 +02:00
Holger Hans Peter Freyther 1494a768c1 [bsc] Move the GSM 04.08 helper functions to gsm_04_08_utils.c
The existing gsm_04_08.c implementation is mixing BSC and MSC
behavior. Move some simple parsing and generation functions over
to gsm_04_08_utils.c to allow a different MSC to define the policy.
2009-08-17 09:52:42 +02:00
Harald Welte (local) ee4410a4f3 actual code running at end of har2009 2009-08-17 09:39:55 +02:00
Harald Welte (local) 026531ec92 store all APDU's received from the MS in the database
This helps us to analyze data such as RRLP location information for
later analysis.
2009-08-16 10:40:10 +02:00
Harald Welte (local) 6eef564e2d add support for APPLICATION INFO RR messages 2009-08-15 23:32:44 +02:00
Harald Welte (local) d19e58b13c move talloc context creation out of on_dso / constructors
the various constructors get called in a non-obvious, linker determined
order, which makes certain objects disappear from the talloc report.

This change moves the talloc context creation into a new talloc_ctx.c file
2009-08-15 02:30:58 +02:00
Harald Welte (local) daef606502 respect the link_id, not only the SAPI from SMS code
SMS related messages are all sent over SAPI=3.  But in addition
to that, we also need to send it over the correct link identifier,
i.e. SACCH or main signalling channel
2009-08-14 11:41:12 +02:00
Harald Welte (local) ee9afe332d when in token auth mode, accept phones that are authorized 2009-08-13 20:44:23 +02:00
Daniel Willmann eea9337e9e Encode the network name int the MM info messages in GSM 7bit alphabet. 2009-08-13 16:38:56 +02:00
Harald Welte (local) aa9dc19ca7 remove FIRST_CONTACT signal, the subscriber flag is sufficient 2009-08-13 13:49:51 +02:00
Jan Luebbe 06513f26a1 replace the command line option -a with the auth-policy config option 2009-08-13 10:14:59 +02:00
Harald Welte 7984d5c260 add functions to send AUTH REQ and REJECT 2009-08-12 22:56:50 +02:00
Jan Luebbe 370b41d7f1 look up subscriber in memory before loading from DB 2009-08-12 21:04:33 +02:00
Jan Luebbe b0dfc31d7d flag new subscriber structs in memory and send a signal 2009-08-12 21:03:00 +02:00
Harald Welte 115d1036d6 rename rsl_channel_release to rsl_rf_channel_release
and add some more comments to help understand the complex release
procedures.
2009-08-10 11:43:22 +02:00