Holger Hans Peter Freyther
da488ae343
bsc: Implement sending the assignment complete to the network
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
2d2c910f2c
bsc: Implement sending a Cipher Mode Complete message
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
4582586e24
bsc: Add a method that will queue the message on a MSC connection.
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
7225fd18e0
bsc: Add some basic checks to see if a SCCP connection is established
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
1999cf11b9
bsc: Complain about unimplemented stuff.
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
77cd95d5b5
bsc_api: Implement the assignment command for the BSC.
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
f05750ca24
bsc_api: Rework the signal handler to be extendable
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
abf962b096
bsc_api: Clear lchan->conn on lchan_release
...
Set conn to NULL before starting the release procedure, remove
code to check for a lchan->conn as it can not happen. If there
are any memleaks we will notice them.
Detach the lchan->conn from the channel before detaching.
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
8d216c7756
bsc_api: Clear the conn->lchan before calling subscr_con_free
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
a2e5cb8601
bsc_api: Clear the conn of the failed lchan to avoid a runtime warning
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
a2828fa4bc
bsc_api: Set the lchan->conn to NULL in all of the cases
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
088dde8173
bsc_api: Send a channel modify when we already have a TCH.
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
7e50c8140b
bsc_api: Plug a theoretical window for the RLL callbacks
...
The timedout could come between lchan_release and the
S_CHALLOC_FREED signal. In the future we might want to
use the gsm0808_clear to stop the RLL timeouts and such.
2010-11-15 20:06:47 +01:00
Holger Hans Peter Freyther
8d380dcadd
bsc_api: Change submit dtap to allow to automatically use the SACH
...
For SAPI=3 on a TCH it might be nice to use the SACH to submit
the message. The api allows to automatically use the SACH if
a message like this is submitted.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
2603c1f545
bsc_api: Clarify the parameters of the assignment command
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
4be7d41a50
bsc_api: Implement sending the cipher mode method
...
This will set the encryption algorithm, key and then
send the RR Cipher Mode message to the MS. The method
is also verifying the input.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
2f169d64dd
bsc_api: Make the cipher_mode take the 'include imei sv' argument
...
The cipher mode command should enable encryption and send the
right RR message to the other side.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
45b575fd94
bsc_api: The rr_cause is optional, pass it as a pointer
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
66dcd925c6
bsc_api: Nuke the clear complete from the API.
...
There is no place where it can be called. Whoever is calling
the gsm0808_clear method should generate the clear complete
as the result.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
46caa3048d
bsc_api: Provide the link_id in the dtap callback.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
b094171c9f
bsc_api: Add needed parameters to the assignment complete callback
...
Provide the chosen channel and more information in the assignment
complete method.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
e1996f013c
bsc_api: The cipher mode is not a message on the air interface
...
The cipher mode reject will be send in case the BSC is not
able to support the requested cipher. So this reject can be
handled by however attempts to enable ciphering.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
6c199e7d99
bsc_api: Look into the msg and call the right API functions
...
For certain messages we will need to call other GSM0808 functions. To
keep the bsc_hack working we will try to send this through the normal
messages first and then fallback to dtap if no handler is registered.
The gsm_04_08.c code is not forced to handle the IPA activation
and channel modify ack anymore. This is done transparently by the
BSC API now.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
fce9307553
bsc_api: Change the cause to a uint8_t for now
...
The RR Cause can only be one byte. Change from uint16_t to uint8_t for that.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
05c68841a8
bsc_api: Fix a use after free error in the Clear Request path
...
The implementation of bsc_hack would call subscr_con_free before
the BSC API has had the chance to call gsm0808_clear to try to
release other channels. Fix that by adding a return value.
2010-11-15 20:06:46 +01:00
Holger Hans Peter Freyther
85334f1309
paging: Move the paging data into the paging.h
2010-11-15 20:06:45 +01:00
Holger Hans Peter Freyther
8dfd241bc6
subscr: Add method to find an active subscriber
...
This is used by the paging code of the osmo_bsc. When we get
a paging response there should be an active subscriber with
the TMSI or IMSI and we can stop paging. There is no need to
allocate a new subscriber.
2010-11-15 20:06:45 +01:00
Holger Hans Peter Freyther
d740b688dc
subscr: Add the subscr_get_or_create from the on-waves/bsc-master branch
...
Create a subscriber based on a known IMSI, search the list of
active subscribers if there is already someone like this.
2010-11-15 20:06:45 +01:00
Holger Hans Peter Freyther
928ca743db
subscr: Move the TMSI reserved into the gsm_data
...
Put it into the gsm_data.h to avoid requiring MSC code
in the BSC code paths.
2010-11-15 20:06:45 +01:00
Holger Hans Peter Freyther
8cc59036e6
rsl: Allow to hardcode the RTP Payload
...
In case of a inflexible network it is better to hardcode
the rtp payload to a given type. E.g. when using AMR5.9 on
a TCH/F and TCH/H having the same payload is helpful. For
now this will be only used by the osmo-bsc.
2010-11-15 20:06:45 +01:00
Holger Hans Peter Freyther
ecd94a4b45
misc: Introduce a --enable-coverage mode to build with gprof coverage
...
This adds a test coverage build. One can use gcov and lcov on the
resulting data afterwards to see which code paths were executed and
which were not.
2010-11-15 20:06:45 +01:00
Holger Hans Peter Freyther
0b369c582b
e1_input: Fix compiler warning by using offsetof
...
Use the offsetof/__builtin_offsetof to determine the
offset of a variable inside a structure instead of going
via a NULL pointer and taking the address.
This fixes:
warning: variably modified ‘dummyhalen_offset’ at file scope
2010-11-09 23:11:29 +01:00
Andreas Eversberg
5652cfc0e8
mark andreas@eversberg.eu as 'extern' for lcr
2010-11-09 13:39:43 +01:00
Holger Hans Peter Freyther
1406977e7e
nat: Verify that the endpoint from the assignment command exists
...
Make sure that the MSC endpoint exists on the NAT, otherwise
we end up trying to free this endpoint when the SCCP connection
is taken down and will corrupt our memory. This issue started
to pop up as we have reduced the number of endpoints to 60
to allow transcoding on them.
2010-11-04 17:14:41 +01:00
Holger Hans Peter Freyther
f3d1ae7072
bsc: Add simple SCCP binding code.
2010-11-03 16:40:03 +01:00
Holger Hans Peter Freyther
0425c38feb
bsc: Fix crash when making a MSC connection.
...
Use the right types that are passed as void..
2010-11-03 14:46:56 +01:00
Holger Hans Peter Freyther
7bf66c5a6e
bsc: Add the audio codec list command to list preferred codecs
2010-11-03 13:56:27 +01:00
Holger Hans Peter Freyther
fe16622bf5
bsc: Add the rtp-base command to osmo-bsc
2010-11-03 13:56:26 +01:00
Holger Hans Peter Freyther
45f9e69ac5
bsc: Add the ip.access rtp-payload command known from bsc_msc_ip
2010-11-03 13:56:26 +01:00
Holger Hans Peter Freyther
4de1116356
bsc: Readd the core network code setting
...
This will instruct the BSC to patch messages and replace
the old network code with the new one.
2010-11-03 13:56:26 +01:00
Holger Hans Peter Freyther
5b848f37cf
bsc: Fix the name of the local vty variable.
2010-11-03 13:11:14 +01:00
Holger Hans Peter Freyther
8b19dee437
mgcp: Send data from the network to the transcoder too
...
We now should be able to transcode in both directions.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther
5f2cd84281
mgcp: Use the calculated remote port from the mgcp_rtp_end
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther
3f29cc8303
mgcp: Make the transcoding forwarding work for BTS/NET
...
Share the implementation for the transcoded packets and
forward them to the network and the bts.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther
386a940736
mgcp: Refactor the network binding routines
...
Create another wrapper function that takes most of
the arguments from the caller.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther
bd7b3c5e45
mgcp: Introduce trans_bts and send BTS packets from this port
...
Introduce the trans_bts. Right now only a port is allocated
and the packets from the BTS are sent from this socket.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther
e97155a2af
mgcp: Keep the local_port like it was set on allocation
...
Do not reset statically allocated local_port. The port
might be different to the calculation of endpoint number
and base port. This might be the case for the coming remote
transcoding.
2010-11-02 19:06:13 +01:00
Holger Hans Peter Freyther
2126233590
mgcp: Rename transcoder_end to trans_net
...
Packets arriving for trans_net will be send out to the
networking. We will introduce a trans_bts in a second.
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther
88b597e21c
mgcp: Allow to disable the transcoder in a running system.
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther
b54048fe25
mgcp: Make transcoding a per Endpoint configuration
...
This allows to switch off transcoding on the fly, or only enable
it for certain vessels with known problems.
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther
fbca4ea117
mgcp: Fix the indetion of this code. it should use tabs
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther
43eb1a3db0
nat: Send a clear command in case of connection releases.
...
This should help the BS+ to release RF channels earlier.
2010-10-29 17:05:28 +02:00
Holger Hans Peter Freyther
74779c68f7
nat: Add test case for matching phone numbers
...
Add the test case for matching '*' and for not matching at all
2010-10-28 15:27:00 +02:00
Holger Hans Peter Freyther
d414c06fd9
nat: Fix a thinko in allowing '*' as a wildcard...
...
We need to match everything BUT the wildcard and then
do the normal strcmp...
2010-10-28 13:51:28 +02:00
Holger Hans Peter Freyther
732d9c19bf
Merge branch 'zecke/number-rewrite'
2010-10-27 12:41:19 +02:00
Holger Hans Peter Freyther
c4fd45ccf1
Merge branch 'zecke/ussd-side-channel'
2010-10-27 12:37:42 +02:00
Holger Hans Peter Freyther
afa5a394ab
Require 0.1.27 for the new gsm0808 methods
2010-10-27 12:37:13 +02:00
Holger Hans Peter Freyther
a8a50a87ea
nat: Also send a Clear Command in case of the USSD Provider dies
2010-10-27 12:02:21 +02:00
Holger Hans Peter Freyther
54f5352e07
nat: Close SCCP connections when the USSD Provider is closed.
...
Send a RLSD down to the BSC in case the USSD Provider is gone. It
is not sending a Clear Command and ut depends if the BS+ will
like this kind of behavior. At least the data on the NAT will
be freed soon afterwards due the RLC message.
2010-10-27 11:01:55 +02:00
Holger Hans Peter Freyther
07dfc70276
nat: Make clear where the RLSD is send to
...
Add a _msc to the method as we will send a RLSD to the
MSC and will add a method to send it down to the BSC
as well.
2010-10-27 10:54:11 +02:00
Holger Hans Peter Freyther
643931db3d
nat: Look at the number type to figure out if we want to rewrite it
2010-10-27 10:40:45 +02:00
Holger Hans Peter Freyther
1400310f05
nat: Explain that we do not want to have a + in the replacement rule
2010-10-27 10:40:44 +02:00
Holger Hans Peter Freyther
25adfceb3a
nat: Add '*' as wildcard for the IMSI matching.
...
In case any rule has a '*' we will always match this
rule.
2010-10-27 10:40:44 +02:00
Holger Hans Peter Freyther
73bbf89245
nat: Implement rewriting, have a very basic test for that feature
2010-10-27 10:40:44 +02:00
Holger Hans Peter Freyther
a914daf174
nat: Add hook for rewriting a setup message
...
Create a new function, hand the data to this function, take back
a possible modified msgb and invalidate parsed at this point.
2010-10-27 10:40:44 +02:00
Holger Hans Peter Freyther
76424392e0
nat: Add vty option for number rewriting
...
Parse a msg file in case we do have a list.
2010-10-27 10:40:43 +02:00
Holger Hans Peter Freyther
0586b0fa47
[vty] First set of fixes for the oml/rsl con dropping
...
The code had wrong documentation in the VTY, it crashed
when OML or RSL was not up yet. These issues are fixed
right now.
2010-10-26 09:44:21 +02:00
Holger Hans Peter Freyther
2484ceb2be
[vty] Add ipa specific command to provoke failures to test OML/RSL reconnect
...
We need to simulate OML/RSL failure in an easy and fast way
and adding a command to do so seems like a good way to achieve
this. The command is a bit misplaced, in one way it is no config
and does not belong into the config node but then again it does
not belong into the VIEW_NODE either as it is manipulating content.
On this merge I have changed it to the ENABLE_NODE.
2010-10-26 09:40:13 +02:00
Holger Hans Peter Freyther
90bbccfca9
nat: Forward the data coming from the USSD module to the BSC.
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther
4c401e7a1a
nat: Forward extra state and the message to the USSD provider
...
Forward the SCCP state and the data to the USSD provider,
also mark the connection as local.
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther
ec8a4e23d3
ipaccess: Add a structure for informing the USSD provider about the state
...
This is used to inform the USSD provider about the state of the
connection.
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther
c16c2dc5d3
nat: Implement accepting a USSD Provider connection, do authentication
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther
64b12924bf
nat: Replace the idiom for replacing a string with a function call
...
Remove a lot of code in favor of a new function that is freeing
the old string and copying the new one. I should have gotten the
context and the strings right.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther
e393f273e7
nat: Keep a ussd token in the config
...
We will have the USSD provider connecting to us and we
will use the IPA protocol, including the auth mechanism.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther
3229f442f4
nat: Implement the matching of certain USSD messages
...
Have various checks, check if the IMSI should be handled,
if there is a USSD query set and then decode and compare
the value.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther
c1578bc747
nat: Add an option to set the query string to match
...
Allow the query string to be set. The ussd matching code
will check for this string and then forward it to the bypass.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther
c1cac1e31a
nat: Make the imsi checking function public.
...
We will use this method in the USSD module to check if the
IMSI should be handled for USSD queries.
2010-10-25 21:04:45 +02:00
Holger Hans Peter Freyther
d1effd835f
nat: Provide a USSD access list to check for which to play HLR.
2010-10-25 21:04:45 +02:00
Holger Hans Peter Freyther
17870cf533
nat: Create a USSD module to filter out USSDs...
2010-10-25 21:04:45 +02:00
Holger Hans Peter Freyther
74dc303134
nat: Introduce a new connection type for Supplementary Services
...
If we have a CM Service Request we will look into the message
to see if it is a Supplementary Service Activation.
2010-10-25 21:04:44 +02:00
Holger Hans Peter Freyther
a3967579f8
nat: Move the DTAP unpacking into a new method
...
DTAP unpacking will be used by the USSD checking code
2010-10-21 12:23:27 +02:00
Holger Hans Peter Freyther
749497eeb3
nat: Copy the IMSI, then free it or move the context to the connection
...
Extract the IMSI from the first message as well and safe it
in the connection structure. The problem is that we do not
have this structure at this point, so we will allocate the
imsi as child of the bsc_connection and then move/steal it.
2010-10-21 12:22:50 +02:00
Holger Hans Peter Freyther
8c78b480f9
nat: Store the IMSI inside the SCCP Connection data
...
Store the IMSI for the connections that we are tracking,
it will be freed when the normnal SCCP connection is freed.
2010-10-21 12:22:20 +02:00
Holger Hans Peter Freyther
6b03831495
lua: Mention that the code has some bugs...
2010-10-20 19:21:49 +02:00
Holger Hans Peter Freyther
fbf87a502d
lua: Search for clear requests from the network as well
2010-10-20 19:21:07 +02:00
Holger Hans Peter Freyther
def777ae7e
lua: Check BSSMAP msgtypes in one function..
2010-10-20 19:21:07 +02:00
Holger Hans Peter Freyther
8bde2ee61f
lua: Check for Cipher Mode Reject failures as well
2010-10-20 19:21:07 +02:00
Holger Hans Peter Freyther
bc3d8dd89e
lua: Check for assignment failures
2010-10-20 19:21:06 +02:00
Holger Hans Peter Freyther
721c457e61
lua: Check for disconnects with non normal release too
2010-10-20 19:21:06 +02:00
Holger Hans Peter Freyther
e512e3fd2f
lua: Fix the indenting of the file
2010-10-20 18:57:17 +02:00
Holger Hans Peter Freyther
7220ca9778
contrib: Add LUA script to store SCCP connections with Errors
...
Split the trace based on SCCP Connections, in case an error is
detected, the trace will be stored instead of being deleted and
the full log can be viewed afterwards.
Right now only LU Rejects are recognized, but this can be extended
to other things as well.
2010-10-20 16:58:39 +02:00
Holger Hans Peter Freyther
1fd60631f7
nat: Change the order of the DENY/ALLOW rule for the BSC.
...
Currently it is not is not easily possible to disable
everyone and then only allow certain SIMs. By changing
the order we can do:
access-list imsi-deny only-something ^[0-9]*$
access-list imsi-allow only-something ^123[0-9]*$
and still keep the usecase of only forbidding certain
SIMs on certain LACs. Adjust test case, test that the
other cases are still functional.
2010-10-19 20:55:33 +02:00
Holger Hans Peter Freyther
a25d579ab9
nat: Convert the ip to host order to allow to bind to other ips
2010-10-19 17:48:13 +02:00
Holger Hans Peter Freyther
7e8da1379e
nat: Add a method to add a proper message to the queue.
...
This will be used by the USSD module to forward the data
without creating another copy of the data.
2010-10-19 16:40:34 +02:00
Holger Hans Peter Freyther
3d38742d1c
nat: Find a connection by the real ref
2010-10-19 16:40:17 +02:00
Holger Hans Peter Freyther
f961de1108
nat: Use the make_sock routine to listen for incoming connections.
2010-10-19 16:40:04 +02:00
Holger Hans Peter Freyther
a09b966cd4
nat: Use strncmp on the string in case it is not null terminated
2010-10-19 16:39:01 +02:00
Holger Hans Peter Freyther
e383980a7e
ipaccess: Make sure the unitid is null terminated
...
The nanoBTS is sending null terminated strings, make sure they
are really null terminated.
2010-10-14 22:05:52 +02:00
Holger Hans Peter Freyther
d9e81d0fcf
ipaccess: Verify that the data fits in the package.
...
There is something wrong with the code, the length is
here uint8_t but when we generate a IDGET we put it
as 16bit data.
2010-10-14 22:05:44 +02:00
Holger Hans Peter Freyther
949e0ba648
ipaccess: memset the tlv_parsed structure before parsing
...
Make sure the tlv_parsed structure is initialized properly,
otherwise we might detect a tag that should not be present.
2010-10-14 22:05:34 +02:00
Holger Hans Peter Freyther
69cfa179ef
nat: Make the write_queue write callback a public function
2010-10-13 23:56:01 +02:00
Holger Hans Peter Freyther
4d44fc56e7
nat: Make the queue routine work on any write_queue
2010-10-13 23:55:52 +02:00
Holger Hans Peter Freyther
19c530c5e7
ipaccess: Put our extensions to the protocol into the same enum
...
Rename NAT_IPAC_PROTO_MGCP to IPAC_PROTO_MGCP and place it in
the enum. We need to be prepared to change this number if IPA
is ever going to use it for something else.
2010-10-13 23:55:32 +02:00
Holger Hans Peter Freyther
833fa0bafa
Require libosmocore 0.1.24 due the USSD changes.
2010-10-13 14:03:15 +02:00
Holger Hans Peter Freyther
3e9a7f80bd
misc: Replace the idiom for replacing a string with a function call
...
Remove a lot of code in favor of a new function that is freeing
the old string and copying the new one. I should have gotten the
context and the strings right.
2010-10-12 23:31:53 +02:00
Holger Hans Peter Freyther
9ecf678995
socket: Plug resource leak when the listen call is failing.
2010-10-12 23:29:16 +02:00
Holger Hans Peter Freyther
3cb287919e
misc: Attempt to determine byte order in a cross-platform way
...
OSX does not provide an endian.h, use the other header files that
should define/include what we need. Also check that the byteorder
define is available.
2010-10-12 15:41:03 +02:00
Holger Hans Peter Freyther
88a5fa0a75
ussd: Catch up with libosmocore and pass the gsm48_hdr
2010-10-12 15:34:20 +02:00
Holger Hans Peter Freyther
daa0fe7637
ussd: Move the code libosmocore, increase the version number.
...
Move the code to libosmocore, update the header file and the
version required in the configure.in.
2010-10-10 17:12:05 +02:00
Holger Hans Peter Freyther
0bd60f3317
nat: Allow a BSC to have multiple LACs
...
Make it possible that one BSC is serving multiple
cells. Introduce a list of lacs, add functions to
manipulate the lists. The current test cases for
paging by lac continue to work.
2010-10-08 22:21:46 +08:00
Holger Hans Peter Freyther
fad0753b34
msc: Only unregister the fd if the fd value is valid.
...
This makes sure that someone can call bsc_msc_lost multiple times
even if there is no MSC connection. This makes sense as bsc_msc_lost
is public and be called from client code.
2010-10-07 06:07:57 +08:00
Holger Hans Peter Freyther
d4eed5208f
msc: Stop the connection timeout when we unregister the bfd
...
When we dropped the connection... stop the timer as we might
call bsc_unregister_fd twice...
2010-10-07 06:07:42 +08:00
Holger Hans Peter Freyther
85531cc60d
misc: Once again go from "On Waves" to "On-Waves"..
...
Try to get the company name of our sponsor right...
2010-10-06 20:38:36 +08:00
Dieter Spaar
d6613e05d7
[VTY] T3212 scaling is 6 minutes
...
The scaling of T3212 is in units of 6 minutes, not 10 minutes.
2010-10-05 21:10:55 +02:00
Holger Hans Peter Freyther
0c41b6933e
nat: Possible crash fix, only filter non local connections
...
For local connections con_msc is not set and sending a RLSD
to the network would have ended up in a segfault.
2010-10-06 00:48:36 +08:00
Holger Hans Peter Freyther
e8e41e611f
nat: Work around trying to forward a msg to a msc that does not exist
...
Instead of segfaulting warn the user that the MSC Connection does
not exist...
2010-10-06 00:24:28 +08:00
Holger Hans Peter Freyther
0c35b5bd79
nat: Use the right access list for the stats (found by clang)
2010-10-06 00:18:20 +08:00
Holger Hans Peter Freyther
76c641635b
db.h: Move the '*' to the other side for the gsm_subscriber
2010-10-06 00:03:20 +08:00
Holger Hans Peter Freyther
463dc62ae4
nat: Provide statistics about amount of different messages.
...
Provide simple statistics on how many LUs, Paging Responses
etc. we are seeing in the network.
2010-10-03 19:41:42 +08:00
Holger Hans Peter Freyther
12eb9b7bd9
gsm_04_80: Require libosmocore for creating USSD messages
...
Use the libosmocore to create USSD messages, increase the
minimum version of libosmocore, add header files, remove
the code.
2010-09-30 18:56:07 +08:00
Holger Hans Peter Freyther
841c2000d3
gsm0408: Reorder the includes, openbsc first, osmocore second
2010-09-30 18:56:06 +08:00
Holger Hans Peter Freyther
c0714b85c3
gsm0480: Reorder the includes, openbsc first, osmocore second
2010-09-30 18:55:55 +08:00
Holger Hans Peter Freyther
ee8849649b
nat: Keep track of how many connections we reject
...
Keep track of how many connections we reject due the IMSI
filter itself or due not being able to parse the message.
2010-09-25 17:58:22 +08:00
Holger Hans Peter Freyther
520c1f12ef
nat: Print the statistics of the access-list matches
...
Print the statistics for the rule matches via the vty.
2010-09-25 16:25:47 +08:00
Holger Hans Peter Freyther
2f1a984d4f
nat: Add statistics to the access-list in the NAT
...
Count how many times we match a BSC or NAT deny. This will
give us the number of how often something should be filtered.
2010-09-25 16:15:23 +08:00
Holger Hans Peter Freyther
568b9682e0
nat: Fix the filter when searching for a identity response
...
The filter code will return < 0 for error, 0 for unknown
subscriber, 1 for subscriber checked. Use the same if construct
as for the CR message. This should fix passing LU when it
starts with a TMSI of a different network.
2010-09-24 04:52:38 +08:00
Holger Hans Peter Freyther
cf1c8777a4
mgcp: Return 0 in case transcoding is disabled.
...
In case transcoding is disabled no error has happened, return
a zero. This is fixing starting the nat without transcoding.
2010-09-24 04:41:28 +08:00
Sylvain Munaut
cd8e810302
auth: Fix AuthTupe re-use condition
...
It's not the key_seq of the last authtuple we must check, but
the one sent by the MS.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-21 19:04:07 +02:00
Sylvain Munaut
0230b34dc5
auth: Fix XOR algorithm
...
Thanks to the person on the ml that pointed this bug. Sorry I
don't remember who (it was a while ago and somehow didn't got
fixed at that time)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-21 19:03:09 +02:00
Holger Hans Peter Freyther
9aa8a9c5a7
mgcp: Count the packets that arrive on the transcoder
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
557b1ab15b
mgcp: Remove code duplication for filling out the sockaddr_in
...
Share the send to transcoder sockaddr sending routines.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
f2eedff052
nat: Send a transcoder reset on start up.
...
The transcoder RESET is using the same extensions to reset all
endpoints on a remote site. This makes sure that all allocations
can be made in a properly configured network.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
b98ba72e0a
mgcp: Make the base port of the transcoder configurable
...
The code assumes a static mapping from endpoint to RTP port,
be able to configure the start of such a mapping.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
3b5e3c4d6f
mgcp: Prepare the CRCX/MDCX/DLCX messages for the transcoder.
...
Send CRCX/MDCX/DLCX to the transcoder, fill out transcoder_end with
the interesting data and hope that it is going to work.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
218f8564e1
mgcp: Forward data from the BTS-in to the transcoder
...
Bind a new port for the transcoder, forward data from the BTS
to the transcoder, and from the transcoder to the network. Leave
BTS-IN where it is, BTS-OUT can now be after the transcoding took
place. We send the data from the BTS RTP port.
This whole route will be guarded by the transcoder_ip and if it is
NULL (current default) it will not go through the transcoder.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther
54aaa0fbed
mgcp: Add ports for the transcoder as well
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther
c5f9248c3f
mgcp: Share the range parsing code for net/bts
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther
a2a10ebf03
mgcp: Add a transcoder-mgw command to store the address
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther
985f5694c7
nat: Keep the audio name and default payload around
...
For all forwarded messages this will not be used, but it is of
use for the transcoding.
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther
249d69a26c
nat: Use the write_queue inside the CFG.
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther
6f6801066b
mgcp: Keep the gw_fd inside the mgcp_config
...
Move the bfd from a static var into the mgcp_config.
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther
e02860af00
mgcp: Be able to parse 'sendonly' for the connection mode.
2010-09-20 02:49:09 +08:00
Holger Hans Peter Freyther
0e940e65c7
mgcp: Switch the default audio codec to AMR
2010-09-20 02:48:59 +08:00
Holger Hans Peter Freyther
3c79214727
nat: NULL check the allocation and print a nice warning.
2010-09-20 02:48:43 +08:00
Holger Hans Peter Freyther
e3946f458a
mgcp: Remove the hack to remap timeslot one...
...
The timeslot one is blocked and should not be used, replace the
code with a warning and watch out for it. Tis is most likely due
the uncovered in the previous commit due the wrong TLV definition.
2010-09-20 02:47:34 +08:00
Holger Hans Peter Freyther
cd702379fe
nat: Test for a bug inside the TLV definition for GSM 08.08
...
The 0x1 inside a CIC IE could indicate a new IE... add test data
and test case to verify that the patching works correctly.
2010-09-20 02:47:17 +08:00
Holger Hans Peter Freyther
d2df4cab43
nat: Test the endpoint finding a bit better...
2010-09-20 02:46:57 +08:00
Holger Hans Peter Freyther
adb6e1cce1
janitor: Move the * to the variable name
2010-09-18 06:44:24 +08:00
Holger Hans Peter Freyther
212e105288
db: Declare db_sms_inc_deliver_attempts.
2010-09-17 00:35:46 +08:00
Nico Golde
1e5ed4e893
gsm 04.11: increase the delivery attempt counter for an SMS right away in gsm411_send_sms
...
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2010-09-17 00:34:36 +08:00
Holger Hans Peter Freyther
1f69b4653b
bsc: Fix the clear to release resources first, then set to NULL
...
This is fixing a crash reported by Nico. Somehow I staged an
unfinished version of this code. The crash should be gone.
2010-09-16 22:50:19 +08:00
Nico Golde
f11af07431
gsm_04_11: count SMS delivery attempts for each CP-DATA
...
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2010-09-16 20:54:14 +08:00
Holger Hans Peter Freyther
aaa40b8688
bsc_api: Do not free the subscriber conn on clear and clear request
...
Do not free the GSM Subscriber Connection when a channel is failing
or if a clear is requested, instead just give up _all_ the channels,
reset them to NULL and free the remaining channels.
2010-09-16 20:53:04 +08:00
Holger Hans Peter Freyther
2f9d1ef39a
bsc: Prepare to store the SCCP connection inside the subscriber
2010-09-16 20:53:04 +08:00
Holger Hans Peter Freyther
32aaef689d
bsc; Register the BSC API with many blanks.
2010-09-16 17:27:05 +08:00
Holger Hans Peter Freyther
eea5a1bcd6
nat: Fix a crash when a BSC disconnects while a rejected IMSI
...
When we reject the IMSI we do not have the msc_con set on the
SCCP connection, but we do have a remote_ref. So the nat_send_rlsd
will end up with a crash due the msc_con being zero. Fix the
crash by only sending a released to the MSC when the connection
is not local.
2010-09-16 06:41:09 +08:00
Holger Hans Peter Freyther
4fcce9ea19
nat; Start to use gcc attribute to say that parameter may not be zero
...
This is an attempt to hint the compiler that it should check
the parameters and warn when something is null. Sadly it does
not work as expected.
2010-09-16 06:33:27 +08:00
Holger Hans Peter Freyther
0d711632f2
msc: Send a signal when the connections to the MSC dropped
...
Send a signal, this way another module can close all connections
to the MSC and all local channels.
2010-09-16 02:30:36 +08:00
Holger Hans Peter Freyther
e09919bc70
bsc: Reorder the includes... should be alphabetically now
2010-09-16 02:29:45 +08:00
Holger Hans Peter Freyther
6098038968
bsc: Make the write method public it will be used by other modules
2010-09-16 02:22:20 +08:00
Holger Hans Peter Freyther
5832b3e108
bsc: Add code responsible for connecting, reconnecting to the MSC
...
Add the code that is forwarding data, from and to the MSC, also
handling ping/pong timers and authentication. Hook it into the
osmo_bsc. The code is only compile tested and ported from the
on-waves/bsc-master branch.
2010-09-16 02:16:02 +08:00
Holger Hans Peter Freyther
469692ca47
bsc: Initialize the MSC data parameters to a sane default
2010-09-16 02:16:02 +08:00
Holger Hans Peter Freyther
79f763fe91
bsc: Keep all active subscriber connections in a list.
2010-09-16 02:16:02 +08:00
Holger Hans Peter Freyther
a2aedad005
bsc: Move the subscriber_con code into the bsc_api
2010-09-16 02:16:01 +08:00
Holger Hans Peter Freyther
1502ddefac
chan_alloc: Allocate a subscriber connection as child of the network
...
Due handover we might leave the BTS and if we ever allocate/release
a BTS dynamically we have a problem here.
2010-09-16 02:16:01 +08:00
Holger Hans Peter Freyther
bd76fab9cb
bsc: Add the osmo_bsc_grace from the on-waves/bsc-master branch
...
The grace code will decide if a given connection is allowed to
be made or if it is going to be rejected. For active connections
it is going to send a USSD message.
2010-09-16 00:20:56 +08:00
Holger Hans Peter Freyther
0ab63d73c1
bsc: Move the gsm_04_80.c code into the libbsc.a
2010-09-16 00:20:19 +08:00
Holger Hans Peter Freyther
7a1591b3cf
osmo_rf: Keep the current policy inside the RF struct..
...
Keep a back pointer to the rf struct inside the connection,
resolve the network through the back pointer. Also assume
that the RF is on. In case we start with RF locked, the policy
is on but we will not see any MS talking to us.
2010-09-16 00:10:18 +08:00
Holger Hans Peter Freyther
9a8b5ae977
bsc: Move the rf_ctl into the msc data struct
2010-09-15 23:53:54 +08:00
Holger Hans Peter Freyther
47b2601e01
bsc: Register a new MSC group with data for the MSC connection
...
This group contains everything that is related to the MSC connections.
2010-09-15 23:46:03 +08:00
Holger Hans Peter Freyther
13046202eb
bsc: Remove the old msc parameter, everything is in the VTY config now
2010-09-15 22:30:37 +08:00
Holger Hans Peter Freyther
3e8e046ee5
bsc: Create struct osmo_msc_data to hold MSC information, handle signals
2010-09-15 22:29:25 +08:00
Holger Hans Peter Freyther
85804a80d4
nat: Fix the grammar of the sentence for listing open sccp connections
2010-09-15 19:01:31 +08:00
Holger Hans Peter Freyther
09ecda49d7
nat: Check if the connection was filtered before the msc connection
...
This way we avoid seeing many warnings that we will not forward
data to the MSC. For the con_local connections that is actually
the idea, we will not forward them to the MSC.
2010-09-15 18:58:37 +08:00
Holger Hans Peter Freyther
e8223cae3d
nat: Remove debug left overs
2010-09-15 18:58:36 +08:00
Holger Hans Peter Freyther
ac2763b47e
nat: Attempt to disconnect a connection when IMSI filtering happens
...
Attempt to disconnect the connection and make both sides happy
about this. Right now it only handles the LU and should be extended
to the CM Service Request.
2010-09-15 18:58:36 +08:00
Holger Hans Peter Freyther
11ebe1bf05
nat: And the sequence number away, making it work more reliable
2010-09-15 18:58:36 +08:00
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
85902a4d4a
nat: We have 1 to 31 available to the BSC.
2010-09-01 09:31:46 +08:00