Commit Graph

5123 Commits

Author SHA1 Message Date
Harald Welte fab4368a78 Merge commit 'origin/master' into mncc-harald 2009-06-12 20:15:16 +08:00
Holger Hans Peter Freyther 8426a83908 [misc] Fix make distcheck by adding compat_af_isdn.h 2009-06-12 08:54:08 +02:00
Harald Welte 3cfdb22214 SMS: fix parsing of destination phone number 2009-06-12 02:42:11 +08:00
Harald Welte b89550764a Increase LCHAN_RELEASE_TIMEOUT to 10 seconds
If we release the LCHAN after the CM SERVICE ACK too early, we can no longer
receive longer SMS messages... so let's increase it to 10 secs.
2009-06-12 02:41:10 +08:00
Harald Welte 92f70c5773 04.08: Make mncc-harald branch work
This fixes two reasons for crashes due to uninitialized memory or
wrong pointer passing introduced in my own mncc modifications
2009-06-12 01:54:08 +08:00
Harald Welte a718780253 SMS: fix parsing of destination address BCD
this bug was introduced in Andreas' MNCC patches while altering
decode_bcd_number().
2009-06-12 01:53:29 +08:00
Harald Welte 5d4b1c2c33 abis_nm: fix printing of ADMinistrative state 2009-06-12 01:34:29 +08:00
Harald Welte c66b71cb76 use less magic numbers (04.08 CC cause values)
Introduce a gsm48_cc_cause enum and use it from gsm_04_08 and MNCC,
also make sure we use gsm48_cause_loc rather than plain numbers.
2009-06-11 14:23:20 +08:00
Harald Welte 4bfdfe7f70 reworked MNCC codebase
This is Harald's reworked MNCC base, slowly heading towards integration
into master.  The key changes are:
* provide much more structure to the data in gsm_mncc
* encode_* and decode_* functions now take a structure rather than tons
  of individual arguments (whose order nobody can remember)
* make sure we don't have copies of the same code everywhere by introducing
  mncc_set_cause() and mncc_release_ind()
* save horizontal screen space if possible
* make sure we break lines > 80 characters
2009-06-10 23:25:50 +08:00
Harald Welte ec44e1ff41 Merge commit 'origin/master' 2009-06-10 23:21:25 +08:00
Andreas Eversberg 20152a35e3 [pcap] Write incoming packages without the extra mISDN header
This patch fixes the PCAP logging. If frames are received from E1
interface, an 8 byte mISDN header (MISDN_HEADER_LEN) is in front of the
RSL packet. When frames are transmitted to the E1 interface, the
pcap_write_packet function will get a message buffer without the mISDN
header in front of the RSL packet. The pcap file was tested and the
output is correct.

Follow up patches should make use the msgb->l2, make the ipaccess
code use the pcap writing too...
2009-06-10 14:47:33 +02:00
Holger Freyther 85a7b363d9 Handle and dispatch paging requests in gsm_subscriber
Implement subscr_get_channel and subscr_put_channel to
a degree that SMS Submit and phone call scheduled at the
same time will deliver both (one after the other).
2009-06-10 13:38:20 +02:00
Holger Hans Peter Freyther 800d29d798 [channel] Add a test case for the request foo in gsm_subscriber.c
This is simulating a successfull request and is causing
a segfault. The test is done with a "mock object" in this
case a minimalistic paging implementation which is enough
to show the crash.

Compare that the callback data is supposed to be the same....
2009-06-10 13:26:47 +02:00
Holger Freyther 04866d4279 Proposal for a "channel request" interface...
Reuqests for a subscriber a stored within the gsm_subscriber
datastructure and it will keep track how many channels are
allocated for this user and of which type to decide on policy...

e.g. attempt to submit SMS during a phone call and not doing
paging but a simple (immediate) assignment of the channel...
2009-06-10 13:20:39 +02:00
Holger Hans Peter Freyther fdac4cc176 [paging] Unbreak breakge when moving things into paging.c
By calling _paging_request_stop with NULL for the lchan we
have never used the paging complete callback... I didn't
spot that when moving the code over and thought it is a great
simplification to not call paging_request_stop first and then
loop... *sigh*

restore the old behaviour. Call the callback first and then
free the requests.
2009-06-10 11:49:01 +02:00
Holger Hans Peter Freyther 500f3ca19d [o&m] Dispatch a signal for nacked O&M messages
When trying to operate a nanoBTS900 on channels for 1800
or the other way around the "SET BTS ATTRIBUTES" message
will be nacked. Dispatch all nacked messages from abis_nm
via signals. Handle this in bsc_hack.c, print a small hint
and exit the application as this is considered a fatal
unrecoverable error (the exit is in the app, so a library
can be more robust).
2009-06-10 10:48:14 +02:00
Holger Hans Peter Freyther e91f57879d [bsc_hack] Sanity check for the GSM1800 nanoBTS
The GSM1800 requires us to use channels between 512-885. When
failing to provide such a channel the OML layer will fail and
no RSL connection will be opened.

Add a sanity check before creating the gsm_network and fail
when the channels are not within the allowed range.

Assume no one is operating a BS11 in the 1800 spectrum.
2009-06-10 10:27:09 +02:00
Holger Hans Peter Freyther 5c85ef9295 Remove use_lchan and put_lchan from location updating request paths
Andreas Eversberg is suspecting that some of these messages
are not balanced and we are seeing a leak here. The general location
updating request is guarded by the "location updating request" object
inside the lchan that will keep the channel open for at least five
seconds to get all the information we need.
2009-06-10 06:51:46 +02:00
Holger Hans Peter Freyther 2c45123807 Move the "finding" of the right BTS into paging.c
Move the secret of how to find the BTS in a LocationArea into
the paging layer. This allows to implement different strategies
without changing other parts. E.g. we might want to try the BTS
were the device was seen last and then try...

There should be no semantic change and things should continue
to work. It is sadly not tested though.
2009-06-10 06:40:48 +02:00
Holger Hans Peter Freyther cd1f751e4c Search for BTS's in the Location Area of the subscriber we call
Search for the MS at BTS in the location area of the
called_subscr. This makes the case work where caller and
receiver are not in the same location area. In fact this
looks like a breach of a BSC/MSC separation, I have no idea
if in true networks a BSC is managing BTS in different location
areas.
2009-06-10 06:40:47 +02:00
Harald Welte 0c3893078e introduce encoding/decoding functions for 04.08 CC
this patch implements the encoding/decoding of 04.08 call control information
elements.  It adds new functions to be used for the application interface
patch, and is basis for the application patch (currently patch 36).

Please ignore warnings about unused static functions for now.

(Andreas Eversberg)
2009-06-10 12:08:54 +08:00
Harald Welte be1431076d use gsm_bts_by_lac() function to start paging of all bts with same lac
when paging is successfull, the paging_request_stop() function is called
with the current lchan, so the callback function will be called. for all
other bts', the paging_request_stop() function is called without lchan,
so the paging is stopped, but the callback function is not called.

this ensures that only one paging result is received when paging
multiple BTS. (Andreas Eversberg)
2009-06-10 11:21:55 +08:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00