Commit Graph

2265 Commits

Author SHA1 Message Date
Harald Welte 5f5189e658 bs11_config: update copyright statement 2010-12-14 13:14:32 +01:00
Harald Welte f751a10018 bs11_config: show the BPORT0 / BPORT1 configuration in 'query'
This introduces abis_nm_bs11_get_bport_line_cfg() and a parser for the result.
2010-12-14 12:52:16 +01:00
Harald Welte 7e72fa0250 bs11_config: Add option to set BPORT1 in multi-drop mode 2010-12-14 12:35:59 +01:00
Dieter Spaar df30d40b98 Add mandatory routeing area IE to SUSPEND-NACK 2010-12-12 15:46:00 +01:00
Sylvain Munaut 98b53cba06 include: Add proper predeclaration for struct in mncc.h
We use them, so declare them. (avoid including all gsm_data.h)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:27 +01:00
Sylvain Munaut 81a8bf1039 include: Small fixes to gsm_data.h
We don't really need openbsc/gsm_04_08.h or abis_rsl.h
But we do need some definition from libosmocore

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:27 +01:00
Sylvain Munaut 12e373c218 include: Add proper predeclaration for struct in system_information.h
We use them, so declare them. (avoid including all gsm_data.h)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:26 +01:00
Sylvain Munaut 3f16da2032 include: Add proper predeclaration for struct in abis_rsl.h
We use them, so declare them. (avoid including all gsm_data.h)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:26 +01:00
Sylvain Munaut 8a31a3fcee paging: Dispatch the SS_PAGING signals at the MSC code level
This way the channel is fully ready for use.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:26 +01:00
Sylvain Munaut 5a86e06eb3 auth/ciph: Enable securing of channel directly after paging response
This protects MT services

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 23:04:26 +01:00
Sylvain Munaut 0fbfd1bb52 gsm_04_08: Make gsm48_secure_channel available globally
Can't declare it in gsm_04_08.h tough ... gsm_cbfn is defined in
gsm_data.h and trying to include that in gsm_04_08 just creates a
huge mess.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 22:39:40 +01:00
Sylvain Munaut 567c8dc7c9 gsm_04_08: Use subscr_get_channel instead of directly paging_request
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 22:39:40 +01:00
Sylvain Munaut c7ff2572a7 paging: Give the msgb that caused paging_stop up to the paging callback
The handler might need to know some info of the paging response

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 22:39:40 +01:00
Sylvain Munaut 1e24550d3d gsm_subscriber: Move the get_channel/put_channel logic in MSC part
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 22:39:40 +01:00
Sylvain Munaut 67706df7c2 gsm_04_08: Don't set ciphering manually but call gsm0808_cipher_mode
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 20:36:34 +01:00
Sylvain Munaut e0b06b0293 bsc: Allow to configure Optional Cell Selection params from vty
The default values are those where the parameters are encoded
as '0' and they're not output in the config file if that case

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 20:23:34 +01:00
Holger Hans Peter Freyther fbceea4f0f bsc: Add a command to set the ussd_welcome_text
Make the USSD welcome text configurable.
2010-11-26 00:12:24 +01:00
Holger Hans Peter Freyther 414bc4a1f4 mid-call: Do not lose the first word of the message 2010-11-26 00:06:58 +01:00
Holger Hans Peter Freyther cf6f71aa7f mid-call: Make the mid-call behavior the default for switching things off
When switching the RF off we will always go through the grace
period, add a direct off mode to switch it off directly. Make
the query return a 'g' if we are in the process of switching
things over.
2010-11-26 00:06:15 +01:00
Holger Hans Peter Freyther 70c232f75a mid-call: Implement a timer to go from grace to off.
Start the timer... switch it off when we do the final
tranistion by a command.
2010-11-26 00:06:01 +01:00
Holger Hans Peter Freyther bb62b3f053 mid-call: Rename ussd-grace to mid-call 2010-11-26 00:03:32 +01:00
Holger Hans Peter Freyther 625b6e4dab mid-call: Introduce a timeout to switch from grace to rf off. 2010-11-26 00:02:12 +01:00
Holger Hans Peter Freyther d283db496f vty: For ipaccess we will dump if the OML connection is present 2010-11-26 00:00:22 +01:00
Holger Hans Peter Freyther e17c030b76 test: Add shell script to drop the OML in fixed intervals 2010-11-26 00:00:21 +01:00
Holger Hans Peter Freyther dab8e27755 ipaccess: Fix dropping the OML/RSL connection.
Use the ipaccess_drop_oml and ipaccess_drop_rsl functions
instead of closing the socket and hoping this is picked up
somehow. This just leads to some weird hangs. And gdb was
not really helpful to say where it was coming from.
2010-11-15 20:30:38 +01:00
Holger Hans Peter Freyther 09a925b117 bsc: Add script to hang up the MSC connection every 58s 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther e9f7a0d3b9 bsc: Add wild scripts to do dial testing with a Motorola A1200 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther b4e72f881c bsc: Implement queuing of messages to the MSC before the con is established 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther 16e958dc68 bsc: Use the BSC Filter to stop a paging_request 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther 9c838ae069 bsc: Implement paging by creating a dummy subscr for the paging
In the future we should avoid using a gsm_subscriber at all
and pass the imsi/tmsi to the paging function directly. For
now we can use the old model for paging and go through the
gsm_subscriber. This has the benefit of load balancing on
the BTS and such.
2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther b79c3c97a2 bsc: The ip.access rtp-payload has no useful meaning
Sending this as the RTP_PAYLOAD2 will produce a MDCX NACK
as we send the RTP_PAYLOAD in the CRCX. It does not seem to
be necessary to send anything != 0 for the RTP_PAYLOAD2.
2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther 620c2e678a bsc: Add thr audio module to send the MDCX message to the BTS 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther dbc698aef0 bsc: Implement DTAP coming from the MSC and forward to the BSC API 2010-11-15 20:06:50 +01:00
Holger Hans Peter Freyther 50c579b8c5 bsc: Implement the assignment command to the point of calling into the BSC API 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther fae3c65938 bsc: Parse the cipher mode command and pass it to the BSC api. 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther f1f57a84c1 bsc: Parse the CLEAR COMMAND and close the lchan and ack that 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 863a55d44d bsc: Make bsc_queue_for_msc work on the osmo_bsc_sccp_con
The gsm_subscriber_connection can die before the SCCP connection
so we should work on the osmo_bsc_sccp_con.
2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 890dfc58ed bsc: Work on paging and parsing other messages
The paging is not implemented due bad/missing API in the
BSC API, the rest are simple stubs to be merged from the
on-waves/bsc-master.
2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 3485feb49b bsc: Add module for handling BSSAP input
The current implementation is a stub. The code from
bssap.c of on-waves/bsc-master will be migrated into
this new structure
2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther cf256d678f bsc: Implement sending a SCCP CR with the complete layer3 data 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 933daaa016 bsc: Implement SCCP connection confirmed handling. 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther af4b5fb13e bsc: Implement clearing the SCCP connection 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 57d304871e bsc: Implement writing out UDT messages to a MSC Connection 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 00f4cc22c8 bsc: Implement closing the connections when the MSC goes missing
Refactor the closing code of the CC timeout to a new function,
also make sure that the SCCP Connection is forced closed before
we destruct the connection for real.
2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther ca5c022a32 bsc: Implement sending a message toward the MSC. 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther c97d9b4df1 bsc: Implement a CC timeout and the IT timeout, prepare the timers 2010-11-15 20:06:49 +01:00
Holger Hans Peter Freyther 7e9010892d bsc: Make open/close work on the sccp data 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther b8781d2cd5 bsc: Start to open a SCCP connection and prepare timers and such. 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther 9b17c769b9 bsc: Work a bit on opening the SCCP connection to the MSC.
Most of the code is still stubs but the structure is a lot
cleaner than the one in the on-waves/bsc-master branch.
2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther 2a8675e49a bsc: Add a mobile country code setting for the backbone. 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther 52d42abdb7 bsc: Implement scanning and changing messages from the MSC
This will change the LAI of a LU accept message to the LAI
used for the on-air network. It will also detect when to
send a welcome ussd to the subscriber.
2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther a54732d19d bsc: Add a method to scan messages coming from the MSC. 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther d65305f5b4 bsc: Look for location updating requests in messages
Introduce the SCCP connection data and remember that
we were seeing a location updating request from a
different LAC.
2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther 5bb874d2f5 bsc: Add a hook where we can scan for LU and other messages. 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther cc48fb8083 bsc: Call into the SCCP layer to create a new connection. 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther 46c5ab3624 bsc: Reduce duplication with a macro. 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther e46f1d6cc4 bsc: Implement sending an assignment failure 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther c2b3270e93 bsc: Send a Clear Reques on RF Failures to the MSC. 2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther c8166f3a91 bsc: Implement sending a SAPI n Reject.
It is not clear that the link_id is setup correctly here.
2010-11-15 20:06:48 +01:00
Holger Hans Peter Freyther 58f2cf6494 bsc: Implement the DTAP callback and forward the data to the MSC 2010-11-15 20:06:47 +01:00
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