Commit Graph

2855 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 3268540fc3 nat: Parse the id response, extract the IMSI, compare it
Add a test case and also add a basic check that we got some
size checks correct. The next step is to act on the result.
2010-09-15 18:58:36 +08:00
Holger Hans Peter Freyther d880f54f4b nat: Update the test for the new <0,0,1 semantic of the filter function
A test case with a TMSI is missing, this would be needed for
better coverage of the filter test case.
2010-09-15 18:58:36 +08:00
Holger Hans Peter Freyther 74e0a1b91c nat: Start inspecting every message coming from the BSC for the IMSI
Return early in case the IMSI was already checked, if not we need
to look at the connection and check if the message could contain a
imsi we want/need to filter.
2010-09-15 18:58:36 +08:00
Holger Hans Peter Freyther 909e61fddc nat: Remember if we have check the imsi.
Return -1 if the IMSI should be filtered, 0 if the IMSI could not
be checked and 1 if the IMSI was checked and allowed to pass. In
the future this will be used to inspect every message coming by.
2010-09-15 18:58:35 +08:00
Holger Hans Peter Freyther 3837f99e89 nat: Keep the fiter status in the return message. 2010-09-15 18:58:35 +08:00
Holger Hans Peter Freyther 27640fc255 nat: Improve the log message in case we have SCCP data without a connection
Describe which kind of data we have and where it was coming from
as this makes debugging a bit easier.
2010-09-15 18:58:35 +08:00
Holger Hans Peter Freyther 5f54075a8b vty: Use \r\n in the copyright messages
We should use VTY_NEWLINE but our strings are static, always
use \r\n as unix terminals can handle that as well.
2010-09-11 13:32:30 +08:00
Holger Hans Peter Freyther 38158fb941 bsc: Set the copyright for the real BSC. 2010-09-11 13:28:42 +08:00
Holger Hans Peter Freyther 2e4447baa5 [paging] Implement the counting for TCH/H and TCH/F
Add some code to count TCH/H and TCH/F and also handle
the neci bit of the network. Our channel allocator will
allocate a TCH/F if we request a TCH/H but can not allocate it.
2010-09-06 10:13:23 +08:00
Holger Hans Peter Freyther e66bf1fd46 [paging] Only page if we have some free channels right now
Only page if we have a load that is acceptable for paging. This
option is off by default, and can be enabled per bts. The idea
is that when we have no resources right now we will not page as
it will only create more RACHs and increase the load.

By default we are keeping the old behavior to always page and
only by changing a setting one is using the new behavior.
2010-09-06 10:13:23 +08:00
Holger Hans Peter Freyther eb241aa1d5 [paging] Continuisly send paging commands.
Instead of throwing a huge pile of paging commands to the BTS
we will submit one paging command every half second. This way
we can have different messages between the paging commands.

This is done to avoid crashes of the nanoBTS when too much
paging messages are send.
2010-09-06 10:13:23 +08:00
Holger Hans Peter Freyther 78fab29fa1 [paging] When giving credit try to send out paging requests too.
Make sure the paging timer is restarted after giving some credit
and send out paging requests.
2010-09-06 10:13:23 +08:00
Holger Hans Peter Freyther 6410d93cf8 [paging] When we ran down to 0 available paging slots start a credit timer
It might be that we run down to zero available slots but the BTS
might not send us a load indication. This can happen if we think
we send paging requests and the BTS disagrees and considers them
as errors and does not count the paging message.
When we drop to zero we will start a credit timer to give us extra
credit after six seconds, if we get a CCCH load indication before
we will stop the timer.
2010-09-06 10:13:22 +08:00
Holger Hans Peter Freyther b0e88b8644 vty: Fix build due to merge issue. 2010-09-06 10:13:22 +08:00
Holger Hans Peter Freyther 76fc4a34b8 chan: Add configuration to handle paging any with TCH
It is possible that the MSC is not sending the channel type it
needs for the operations it wants to do. Add a configuration option
to assign a TCH in case of paging any requests. It can be a good
idea to leave SDCCHs free for location updating requests and use
the TCH for SMS-MT and CC-MT.
2010-09-06 09:41:50 +08:00
Holger Hans Peter Freyther 78891078fe chan: Store the to be assigned channel type in the GSM Network.
Store the mapping from request to channel type in the GSM Network
struct as there is some policy involved with handling the request.

E.g. in a half rate network we don't want emergy calls to be getting
a TCH/F, or we want to have a different policy for early/late assignment
of phone calls. Update the table when creating the network and when
the neci is changed.
2010-09-06 09:36:02 +08:00
Holger Hans Peter Freyther 5a3a61d88f bsc_init: Allow DTXu and enable DTXd on RSL (experimental)
Allow the MS to use uplink discontinous transmission by
setting the right bit in the SystemInformation and set
DTXd/DTXu on the RSL channel commands.

This is configurable via dtx-used (0|1) on the network
level and still considered as experimental.
2010-09-06 09:26:27 +08:00
Holger Hans Peter Freyther 457c2a879c [alloc] Assign a TCH for LU when all SDCCHs are occupied.
When the cell becomes visible we will be bombed with location
updating requests and to reduce the load on the network we should
assign as many channels for it as possible. During load peek it
is even more important than to have a spare voice channel and in
general the LU procedure is pretty fast.
2010-09-06 08:58:42 +08:00
Holger Hans Peter Freyther d368a71398 nat: Use ':' to separate the message and strerror 2010-09-05 08:51:12 +08:00
Holger Hans Peter Freyther 6ffca132c1 vty: CONFIG_NODE is the anchor and should not be treated as config.
This is fixing an assert in vty_go_parent due trying to go from
CONFIG_NODE to the parent.
2010-09-04 11:15:27 +08:00
Holger Hans Peter Freyther 81506b4095 vty: Add the config node code to everyone. 2010-09-04 11:00:01 +08:00
Holger Hans Peter Freyther 6262643b45 channel_release: First attempt to update the doc to new code. 2010-09-03 15:34:12 +08:00
Holger Hans Peter Freyther afdb522ced Merge branch 'on-waves/nat-alloc-bsc-endpoints' 2010-09-01 19:10:17 +08:00
Holger Hans Peter Freyther 85902a4d4a nat: We have 1 to 31 available to the BSC. 2010-09-01 09:31:46 +08:00
Holger Hans Peter Freyther f7c86c5b4d nat: Replace the MGCP Endpoint if that is required
Add code to replace the Endpoint number for the mgcp.
2010-08-30 13:44:32 +08:00
Holger Hans Peter Freyther bf812fa83c nat: Use different static transaction numbers for the DLCX/MDCX message 2010-08-30 12:01:36 +08:00
Holger Hans Peter Freyther d38aa450d7 nat: Document that the MDCX message is not implemented 2010-08-30 11:58:49 +08:00
Holger Hans Peter Freyther 601180f2d9 nat: Send the right MDCX down the stream 2010-08-29 23:40:33 +08:00
Holger Hans Peter Freyther 7d5bb26fdc nat: Remove the code that is wrongly placed..
i refers to the MSC side of endpoints and not the BSC..
2010-08-29 22:44:10 +08:00
Holger Hans Peter Freyther 8574dcf9da nat: Close the right endpoint down the stream. 2010-08-29 22:39:07 +08:00
Holger Hans Peter Freyther 0d8330c8cc nat: Add vty command to show the endpoint allocation status 2010-08-29 16:36:01 +08:00
Holger Hans Peter Freyther 45fd07dc33 nat: Attempt to assign the BSC Timeslot based on a free list
Do attempt to not reassign an endpoint immediately but go
to the next free one.
2010-08-29 16:35:26 +08:00
Holger Hans Peter Freyther 39cd32e650 nat: Remove the CRCX value from the nat
Assume that if the MSC has assigned a timeslot/multiplex it will
also be used for the MGCP. So we just assume that it was allocated
on the BSC as well... in the worse case we will send a DLCX downstream
but it should be fine.
2010-08-29 16:35:25 +08:00
Holger Hans Peter Freyther c021fbe603 nat: Reindent the code, no functional change 2010-08-29 16:35:25 +08:00
Holger Hans Peter Freyther f4b3439206 nat: Make the code work in terms of endpoints instead of timeslot/multiplex
We are going to have more than one trunk, so all code hardcoding the
multiplex to zero must go. Avoid this kind of problem by saving the
MGCP endpoint number and comparing that.
2010-08-29 16:35:24 +08:00
Holger Hans Peter Freyther 591003328d nat: Use the bsc_timeslot when talking to the BSC downstream 2010-08-29 16:35:24 +08:00
Holger Hans Peter Freyther 82049d8141 mgcp: Add method to go back from endpoint to multiplex/timeslot 2010-08-29 16:35:23 +08:00
Holger Hans Peter Freyther cb8c35cd51 mgcp: Speculative mgcp fix...
We really have 32 channels per multiplex... so use the right
number... or at least it seems we do have 32.
2010-08-29 16:35:22 +08:00
Harald Welte 9ae28a128a [gprs] Add option parsing to SGSN 2010-08-27 09:26:44 +02:00
Harald Welte 0e6be0e8f8 debian: add init script, /etc/default file and example config files 2010-08-27 09:09:40 +02:00
Harald Welte 2c67f47dba debian: make more dependencies explicit in 'control' file 2010-08-27 09:09:40 +02:00
Holger Hans Peter Freyther 7a2c86b67d vty: Provide a is_config_node for the VTY and use it for the bsc
Right now only bsc_hack and osmo_bsc need to have a custom
config handling as they use the subscr/oml nodes.
2010-08-26 16:55:37 +08:00
Harald Welte 2c869efcd3 Introduce '-D' commandline option to daemonize processes
This uses the osmo_daemonize() function of libosmocore >= 0.1.18,
and is now implemented for bac_nat, osmo-bsc, bsc_hack, osmo-gbproxy
and bsc_mgcp.  This means only osmo-sgsn is missing, which currently
has no option parsing at all.
2010-08-25 19:43:54 +02:00
Harald Welte 305e2906aa debian: don't buld arch-independent packages with executables in them 2010-08-25 13:57:22 +02:00
Harald Welte ba43969832 debian: don't use override_dh_* for lenny compatibility 2010-08-25 13:54:58 +02:00
Harald Welte 5c55c4901d debian: add build dependency to pkg-config 2010-08-25 12:59:29 +02:00
Harald Welte 11e79bdbbb debian: add runtime dependency to libdbd-sqlite3 2010-08-25 12:58:32 +02:00
Harald Welte 3edb60de7e debian: add build dependency to libdbi0-dev 2010-08-25 12:58:32 +02:00
Holger Hans Peter Freyther 4dc025b4a8 bsc_init: Compare it with the right enum type
In both cases the int value was zero, so it actually worked
2010-08-25 12:33:57 +08:00
Harald Welte 640d72ab3b Add 'debian' directory containing debian packaging information 2010-08-24 15:33:04 +02:00