aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-26bsc_msc_ip: Keep track of active connections so we could clear them.Holger Hans Peter Freyther1-0/+3
Keep track of SCCP connections so we can clear them when the MSC is going down.
2010-03-26bsc_msc_ip: Convert the MSC connection to the write queueHolger Hans Peter Freyther1-11/+22
The SCCP stack was changed to give the ownership of the msgb to the system integration, this allows us to use the stock write queue to queue the write and write the msg to the MSC once we are connected again.
2010-03-26Merge branch 'on-waves/sccp' into on-waves/bsc-masterHolger Hans Peter Freyther1-6/+3
2010-03-25bsc_msc_ip: Add an option for the global log levelHolger Hans Peter Freyther1-0/+5
2010-03-24Specify a release reason for the lchanHolger Hans Peter Freyther1-8/+8
In case the put_lchan is making the refcount drop to zero use the release reason specified in the put_lchan call. This is used by the BSC MSC IP implementation for the assignment handling where the old channel is getting closed with a local end release (1).
2010-03-24Correct the company name. It should be On-Waves (ehf)Holger Hans Peter Freyther1-1/+1
2010-03-24Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-6/+21
* Move to libosmocore * Move to new debugging architecture * Register the BTS types * Has only been compile tested Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/include/openbsc/ipaccess.h openbsc/include/openbsc/mgcp.h openbsc/include/openbsc/msgb.h openbsc/include/openbsc/tlv.h openbsc/src/Makefile.am openbsc/src/abis_rsl.c openbsc/src/bsc_init.c openbsc/src/bsc_mgcp.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_subscriber_base.c openbsc/src/msgb.c openbsc/src/rest_octets.c openbsc/src/sccp/sccp.c openbsc/src/vty/command.c openbsc/src/vty_interface.c openbsc/tests/Makefile.am
2010-02-13[msc/nat] It is better to use msgb_free to free the msgbHolger Hans Peter Freyther1-1/+1
msgb_free is currently calling talloc_free but this might change in the future and then this code would break..
2010-02-13[nat/bsc] Fix memory leak of IPA messages...Holger Hans Peter Freyther1-0/+1
* The read_msg method is allocating the msgb and we will need to free it once we are done with it.
2010-02-09[nat] Implement token based identification.Holger Hans Peter Freyther1-3/+34
Based on the token the NAT/MUX is capable of figuring out which LAC this BSC is supposed to satisfy. This will be needed for messages like paging that can be done by LAC.
2010-01-28[bsc] Implement early assignment for CC for the MT case.Holger Hans Peter Freyther1-0/+33
In case we need to handle speech but we are currently on a SDCCH we need to assign a new channel and close the old one. This implementation should have the correct flow of things but we might need to fix some error situations properly. It is implemented by keeping a secondary_lchan pointer that will be swapped into the lchan pointer after the assignment complete message from the MS. The old lchan will be deactivated (the SACCH should stay open). We have to manually remove the subscr from the lchan structure to properly close things down.
2010-01-27[bsc_msc] Start the Inactivity Timer only when the connection is establishedHolger Hans Peter Freyther1-5/+9
Start the SCCP IT timer only after the MSC has confirmed the SCCP connection. It is safe to call bsc_del_timer even if it was never started. This could happen on a connection refusal.
2010-01-27[msc] Attempt to fix MT SMS with ciphering enabled.Holger Hans Peter Freyther1-0/+1
The MSC is asking us to enable ciphering and then immediately sends a DTAP msg for SAPI=3. We handle this correctly by attempting to establish SAPI=3 but we never get an establishment confirm for this SAPI. Attempt to fix it by not sending any DTAP message when we receive the Cipher Mode Request and unblock the queue when the ciphering is confirmed. The unblocking currently works by taking all messages out of the queue and then submitting them again. This will attempt to establish the SAPI=3 and such automaticaly. And the MSC stopped sending me SMS so this needs to be verified at a later time.
2010-01-12[bsc_msc] Move the connect to the MSC routine into a new fileHolger Hans Peter Freyther1-46/+3
2009-12-22Merge commit 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-1/+0
Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/src/Makefile.am openbsc/src/abis_rsl.c openbsc/src/chan_alloc.c openbsc/src/gsm_04_08.c openbsc/src/gsm_data.c openbsc/src/vty_interface.c The biggest problem is the moving of the RTP code into the RSL layer. This may break quite some things...
2009-12-06[bsc_hack] Ignore the sigpipe...Holger Hans Peter Freyther1-0/+1
We might read or write on the OML link when the BTS is reset and will get SIGPIPE interrupt and be gone... Just ignore the SIGPIPE we will get the "exception" on the next run of bsc_select and kill the (old) OML link.
2009-12-06move RTP socket information from timeslot to lchanHarald Welte1-3/+3
With ip.access, in case of TCH/H, we have one RTP stream for each half-slot (lchan), not just one per on-air timeslot. This is quite different from a classic BTS where the TRAU frames of the two TCH/H channels would be part of the same 16k sub-slot in a E1 timeslot.
2009-11-20[lchan] Release the channel ones its' usecount drops to zeroHolger Hans Peter Freyther1-0/+1
Remove the timer handling from the LCHAN and release the channel ones the use count is dropping to zero. Change code that was sending/using the lchan after the release and change the send data method to warn in case the lchan is used after it has been freed.
2009-11-20[ipacc] Add a way to override the rtp payload for MDCXHolger Hans Peter Freyther1-1/+5
2009-11-20[bsc] Send the SCCP IT message in a given intervalHolger Hans Peter Freyther1-0/+18
Send the message every 60 seconds on every SCCP connection. The 60 seconds were taken from a protocol trace obtained on the network.
2009-11-20[bsc] Unref the lchan when the MSC is closing the SCCP connectionHolger Hans Peter Freyther1-0/+5
Currently we are not sending the Inactivity Test message so the MSC will close the specific sccp connection but we would keep the lchan open and then end up with resource issues. Change the code to close the lchan before closing the SCCP connection..
2009-11-20[bsc] Add a test_mode function that can be used to inject packagesHolger Hans Peter Freyther1-0/+40
This method can be called from the main method to inject a test message into a "fake" network with sccp connection.
2009-11-20[bsc] Add BSC specific config option... currently and empty show is implementedHolger Hans Peter Freyther1-5/+0
In the future this should give a list of SCCP connections and their allocated radio resources/users...
2009-11-20[bssmap] Unconditionally include the chosen encryption in cipher mode completeHolger Hans Peter Freyther1-1/+1
2009-11-20[bssap] Improve log messages...Holger Hans Peter Freyther1-0/+1
2009-11-20[bssap] First go at implementing channel assignment...Holger Hans Peter Freyther1-2/+6
2009-11-20[bssap] First go at implementing ASSIGNMENT REQUESTHolger Hans Peter Freyther1-1/+118
2009-11-20[bssap] Start to queue messages to the BTS and to the MSCHolger Hans Peter Freyther1-5/+16
For the MSC we need to queue GSM04.08 messages until the SCCP connection is confirmed to be open and then can send the stored messages. The queue is limited to 10 messages at which point new ones will be dropped. Currently the only messages we get are measurement indication messages but it is better to be safe than sorry. The SCCP messages are sent as soon as the connection is considered established and then no queueing happens any more. While replacing sccp_connection_write calls various memory leaks has been fixed. For the MS we might have received a DTAP and need to do an operation that requires a roundtrip and want to send wait until this has happened. The two scenerios are sending a SMS to the phone that requires to do something special for the different SAPI. Currently it is assumed that only one SAPI=0 -> SAPI=3 change happen during the connection. For the first SAPI != 0 we will send the rll_ request and then wait for the timeout or confirmation. In case of timeout a SAPI "n" reject is sent and in case of success the queue is getting emptied.
2009-11-20[bsc_msc_ip] This is a BSC that connects to real MSC via IPHolger Hans Peter Freyther1-0/+617
This is a BSC to be used by on-waves.com to connect to a real MSC using SCCP over IP. The following messages and features are currently implemented: - IPA identity ack's - COMPLETE LAYER3 INFORMATION - DTAP - PAGING COMMAND - CLEAR COMPLETE/CLEAR REQUEST - CIPHER MODE COMMAND/ REJECT /COMPLETE It comes with a tool to create the enum's from the spec and a very simple test server to do the handshaking.