Commit Graph

97 Commits

Author SHA1 Message Date
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
Harald Welte 3ac7f10450 add code to GSM 04.08 to send MRPCI message once we have classmark2
* afert we receive a CM SERVICE REQUEST
* after we receive a PAGING RESPONSE
2009-08-10 10:12:45 +02:00
Harald Welte e58ca7c181 revert commit b400dd8f64 regarding NECI=0
As it turns out, we start to allocate SDCCH for voice calls.  Since we
don't yet implement switching from SDCCH to TCH during call setup,
this leads to various problems.
2009-08-10 02:14:46 +02:00
Harald Welte b400dd8f64 We're using NECI=0, but the channel reauest reasons we're seeing from MS's are wrong
So we don't know what's the problem.  Using the NECI=1 tables makes us allocate SDCCH
for MO SMS, which is good.
2009-08-10 00:26:50 +02:00
Harald Welte ee5ad16582 ensure we send the LOCATION UPDATE ACCEPT before issuing any signal 2009-08-09 19:07:00 +02:00
Harald Welte 1a6f79818e move search for existing lchan for subscriber to new function
There's now a new function called 'lchan_for_subscr()' which can be
used to determine if there is any existing lchan for this subscriber.
2009-08-09 18:52:33 +02:00
Harald Welte 76042188e0 first 'working' SMS implementation
we now have the full path from the MS into the database (SUBMIT), as well as
back from the database to the MS (DELIVER).  The database gets correctly
updated once a SMS has been successfully delivered.

What's still missing is the periodic scan over all undelivered messages,
trying to deliver them to the respective MS.  So far, you have to manually
trigger this on the telnet interface with 'sms send pending 1'
2009-08-08 16:03:15 +02:00
Harald Welte a1b285861e gsm_04_08 no longer needs to iterate over all BTS in LAC
this task is performed by the paging.c code already.
2009-08-01 19:31:47 +02:00
Harald Welte e34e117ff1 Merge branch 'master' into sms 2009-07-29 18:05:54 +02:00
Harald Welte 9943c5bbac generalize channel activation / channel mode modify
* we only need one piece of code to calculate rsl_ie_chan_mode from
  our run-time data structures (gsm_lchan)
* add some more channel modes for TCH/H and data
* use enum's to make the compiler warn us about unhandled enum values
* make sure the caller determines the (signalling,speech,data) mode
2009-07-29 15:41:29 +02:00
Harald Welte 13cac66bb7 postpone IPAC_BIND until we do a LCHAN_MODIFY
only after the LCHAN_MODIFY we know the final mode of the channel,
so we have to postpone our IPAC_BIND until then to make sure we set
the correct speech codec.
2009-07-29 12:10:35 +02:00
Harald Welte 2f33d01aaf Merge branch 'master' into sms 2009-07-28 18:40:45 +02:00
Harald Welte 805f64486b add RTP proxy mode for ip.access
Up until now, we only supported direct RTP streams between ip.access BTS.
With this commit, the user can specify '-P' to the command line to enable
a RTP/RTCP proxy inside OpenBSC.  The nanoBTS will then send all their voice
data to OpenBSC, which will relay it to the respective destination BTS (which
can be the same BTS).

The default behaviour remains unchanged.  Without '-P' on the command line,
RTP/RTCP is exchanged directly.
2009-07-28 18:25:29 +02:00