Commit Graph

41 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther a49ffb4cb4 Create a liblaforge with OpenBSC utility functions to be used for other projects 2010-02-09 21:51:44 +01:00
Holger Hans Peter Freyther e0955029a1 [mgcp] Prepare to do MGCP over TCP and inside the bsc_msc_ip process
* Separate main process and protocol handling into two parts.
* Change the protocol handling to work with UDP and TCP connection
* This will allow to speak MGCP over TCP between the BSC MUX and
  the real BSC.
2010-02-03 08:50:33 +01:00
Holger Hans Peter Freyther 89f3cb8606 [mgcp] Rename the source to mgcp_main.c 2010-02-02 12:07:21 +01:00
Holger Hans Peter Freyther a18445d262 [mgcp] Move the MGCP procoess into a sub directory 2010-02-01 14:00:07 +01:00
Daniel Willmann 604d851b89 Register GSM_BTS_TYPE_UNKNOWN in bsc_hack.c
The way the VTY configuration sytem works is that it first registers a
BTS of type GSM_BTS_TYPE_UNKNOWN and then sets the type correctly (after
encountering the type statement). This makes sure that registering a BTS
of type UNKNOWN succeeds.
2010-01-14 21:52:34 +01:00
Harald Welte 39315c4798 [OML] parse attributes depending on BTS type
Some NM attributes are defined differently depending on
the BTS type.  Having one big nm_att_tlvdef[] table for
all BTS types is no longer sufficient.  This patch

* introduces 'struct gsm_bts_model' to describe a BTS model
* adds definitions of gsm_bts_model for BS-11 and nanoBTS
* changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-10 18:01:52 +01:00
Sylvain Munaut d7c9e5cad8 encryption: Import a GPL comp128 implementation
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:54:07 +01:00
Holger Hans Peter Freyther dade8980e3 [ipaccess] Move firmware analysis into the ipaccess-config utility
* This turns ipaccess-firmware.c into a plain helper, fix the
  ipaccess name...
2009-12-30 07:08:39 +01:00
Holger Hans Peter Freyther af351a21f2 [ipaccess] Start using talloc in the firmware code
* We are not leaking anything... *yeah*, talloc rocks
2009-12-30 06:42:17 +01:00
Holger Hans Peter Freyther a25b20c174 [ipaccess] Call it ipaccess-firmware 2009-12-27 14:07:40 +01:00
Holger Hans Peter Freyther 426da090db [ipaccess] Move ipaccess utilities into a dedicated subdirectory 2009-12-24 11:28:29 +01:00
Harald Welte 2ca7c31429 Add ipaccess-proxy, a proxy for ip.access A-bis over IP
This proxy allows us to restart OpenBSC while the BTS's are kept
running with their CCCH/BCCH alive.  This is very useful to
make sure the phones don't roam to other networks while restarting
OpenBSC.

The proxy also intrduces UDP sockets for injecting UDP packets
into the A-bis data stream.
2009-12-23 22:44:04 +01:00
Holger Hans Peter Freyther 65d67dc222 [ipaccess] Start adding a tool that analyzes the ipaccess header
So far I have not much idea about the format. It is starting with
the magic byte and the header is spanning until the next occurence
of the " SDP" marker.
2009-12-23 12:52:30 +01:00
Harald Welte ffa55a4e87 statistics: Introduce 'struct counter' instead of using unsigned long
This has the advantage that counters can be added all over the code
very easily, while having only one routine that stores all of the
current counter values to the database.  The counters are synced
every 60 seconds, providing relatively fine grained statistics
about the network usage as time passes by.
2009-12-22 20:42:40 +01:00
Holger Hans Peter Freyther 0a64603db9 [misc] Move handover into libmsc.a
Handover is a high level decision, it can span multiple BSCs
and belongs mostly into the MSC domain.
2009-12-22 08:19:42 +01:00
Holger Hans Peter Freyther 4f5456c040 [misc] Move rtp_proxy.c into the libbsc.c
For the time being RSL has to know about Layer4 and upwards
and is using the RTP socket class....
2009-12-22 07:48:20 +01:00
Harald Welte 38fe2a67e1 meas_rep: utility function for processing of measurement reports
This provides two functions: get_meas_rep_avg() to obtain the sliding
window average of one particular field, and meas_rep_n_out_of_m_be()
to check if at least N out of M measurments are >= BE.
2009-12-21 13:33:10 +01:00
Harald Welte 8d77b9540a [handover] first functional handover implementation
With this commit, we can successfully hand over a channel from one cell to
another cell.  We implement asynchronous intra-BSC (but inter-BTS) handover.

Changes:
* introduce new DHO log category
* extend rsl_chan_activate_lchan() with argument for HO reference
* introduce actual minimal handover decision making in handover_decision.c
* various fixes to bsc_handover_start() in  handover_logic.c
2009-12-17 00:31:10 +01:00
Harald Welte a43f789a0a Replace template-based SYSTEM INFORMATION with real implementation
Before this commit, OpenBSC used templates for the SYSTEM INFO
1, 2, 3, 4, 5 and 6 messages.  Those templates were patched in
various places to reflect the network config like ARFCN.

Now, we actually generate those SI messages ourselves, using
values from the configuration file, and even calculating neighbor
cell lists.

All bts'es that you have configured in OpenBSC will end up in
the neighbor cell list - which should be more than sufficient for
the current small-single-site networks.
2009-12-01 18:04:30 +05:30
Harald Welte 798418a068 [handover] Implement handover control logic
Code to implement handover control logic.  A yet-to-be-implemented
handover algorithm will call bsc_handover_start(old_lchan, new_bts)
to start the handover process.
2009-11-29 22:56:14 +01:00
Holger Hans Peter Freyther 7466351026 [misc] Fix the make distcheck
Mention the two new header files, do not list isdnsync twice
2009-11-20 17:58:52 +01:00
Holger Hans Peter Freyther 338fa562c0 [mgcp] Add telnet interface for mgcp. 2009-11-20 14:05:17 +01:00
Holger Hans Peter Freyther f67945f004 [mgcp] Add a simple mgcp gateway used for the BSC
The python script is a simple call-agent driving the
client. Currently it is sending a AuditEndpoint message
and is printing the result.

The bsc_mgcp.c is a standalone process that will implement
a MGCP Gateway for the MSC. On call handling the Call-Agent
will ask the Gateway to "CreateConnection" and then this
gateway needs to communicate with OpenBSC.

Currently CreateConnection,ModifiyConnection,DeleteConnection
and Endpoint auditing is implemented.

[mgcp] Send RSIP on start and on first receive of any message

Ignore the first request and send a RSIP. We do that because
we might tunnel UDP through some other things and have no direct
way to connect to the call-agent.
Also the transaction is not checked and we ignore the response
from the call-agent, actually we print the '200 ' or any other
value as unhandled...

[mgcp] Print the MGCP command next to the response code

This allows to see which commands were sent by the server

mgcp: Terminate it with a new line

[mgcp] Make number of endpoints static...

For now this is fixed to the number of endpoints as of the GSM
specification...

[mgcp] The endpoint names seem to be base 16... use strtoul to parse

Use strtoul to parse the base 16 number from the mgw string.

[mgcp] Log the endpoints as hex numbers...

[mgcp] Only send the RSIP on the first incoming message..

Remove call_agent option (also remove the number from the getopt
call).

[mgcp] Start couting at 1 for the mgcp

[mgcp] Slight attempt to improve the grammar of the strings

[mgcp] Share validation routines between DLCX and MDCX

[mgcp] Remove help for dead config options

[mgcp] Specify a different IN addr in the SDP records

In case of NAT traversal be able to listen on a given
interface (like 127.0.0.1) but claim to receive data
at the beginning of the tunnel.

[mgcp] Fix the static copy of the SDP file

WIP verify out factoring broken..

[mgcp] Introduce VTY to the mgcp for config file parsing...

Parse the MGCP config file via the VTY framework.

[mgcp] Handle SDP parameters through VTY..

Currently the payload type, name and rate can be specified
in the config file.

[mgcp] Add an option to bind all rtp ports early

This can be useful for testing and in deployment to make sure
no runtime resource limit can be hit.

[mgcp] Add some API doc comment

[mgcp] Convert the packets of the example server to ascii

This will allow to easily patch the call id... to run the
server in a loop and make it work with the mediagateway

[mgcp] Assign CI_UNUSED... to be more obvious...

[mgcp] Use DEBUG and not DEBUGPC and specially not printf

Improve the logging a bit in the mgcp

[mgcp] Change the fake server to change the call id

This assume the call-agent will just increment the id
as well.... this is true for our implementation

[mgcp] Generate the transaction id dynamically..

This way wireshark will be more happy about it...

[mgcp] Recognize responses from the network..

This is just recognizing the response code and
then is doing nothing with it. Also change the
script to generate response messages...

[mgcp] Improve debug messages for CRCX/MDCX..

Log on which ports the media gateway is listening
and where the other (server) gateway is located
2009-11-20 14:05:04 +01:00
Holger Hans Peter Freyther ac96770ad7 [sccp] Implement parts of ITU SCCP for use in the A-Interface
include/sccp/sccp_types.h contain Q.713 and GSM definitions
include/sccp/sccp.h is the application interface resembling
                    the esentials of the UNIX socket interface.

src/sccp.c is the actual implementation of SCCP featuring
           connection and UDT1 support.

tests/sccp/sccp.c is testing connection creation and formating
                  of the SCCP messages used by the A-interface. And
                  it contains a simple fuzzing test to test the
                  robustnes of the implementation.
2009-11-20 13:09:15 +01:00
Harald Welte a148233b5e Add "silent call" feature to OpenBSC
This allows the administrator to use the vty interface to issue a silent
call to a given subscriber by using
	"subscriber extension XXXX silent call start"
and stopping that silent call with
	"subscriber extension XXXX silent call stop"
2009-11-14 10:08:40 +01:00
Harald Welte 6eafe9137c Add USDD code from Mike Haben
This is the initial checkin of the USSD code from Mike Haben.  I didn't
put it in the main branch as I think it still needs some cleanup.
2009-10-26 20:39:25 +01:00
Holger Hans Peter Freyther 8b457fb350 [bsc_init] Create a bsc_init.c that can be used for setting up hings.
Share the initialization and bootstraping of the network by moving
the code to a new file and making boostrap_network and shutdown_net
external.

Cleanup the header list after the move and remove trailing whitespace.
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther cfa90d4165 [vty] Move layer3+ functionality to vty_interface_layer3.c
Move everything that is policy, requires access to a DB or is
generally in the domain of the MSC to vty_interface_layer3.c.
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther 1494a768c1 [bsc] Move the GSM 04.08 helper functions to gsm_04_08_utils.c
The existing gsm_04_08.c implementation is mixing BSC and MSC
behavior. Move some simple parsing and generation functions over
to gsm_04_08_utils.c to allow a different MSC to define the policy.
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther 93d4394d1d [msc] Move gsm_04_08.c, mncc and various others to libmsc
Currently we have circular dependencies from libbsc to libmsc
and this requires to play some linker tricks. The problem will
be solved in two ways, first we will get rid of the circular
dependencies and second we can start using --start-group and
--end-group of the linker to play the tricks for us.
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther 857e5e6e30 [subscr] Split gsm_subscriber.c in BSC and MSC part
For the BSC part we still assign a gsm_subscriber to lchan but it
might only contain the TMSI of this subscriber.

For the MSC part we will need the HLR/VLR feature of the gsm_subscriber,
specially the lookup's by number...

So if libbsc.a/libmsc.a are compiled in one app and used the
subscribers will be shared, and if only libbsc.a gets used we will
have more empty gsm_subscriber.c..
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther 42e327b52f [msc] Introduce a libmsc.a library
Attempt to split up bsc/msc functionality according to the specs. The
libbsc.a will be responsible for communicating with the BTS, configuring
it, paging, channel allocation and passing layer3 messages in both
ways. libmsc.a will implement the policy and such.
2009-08-17 09:52:42 +02:00
Harald Welte (local) b8afe81e96 trigger RRLP position requests after paging succeeded and after subscriber attach 2009-08-16 13:18:51 +02:00
Harald Welte (local) d19e58b13c move talloc context creation out of on_dso / constructors
the various constructors get called in a non-obvious, linker determined
order, which makes certain objects disappear from the talloc report.

This change moves the talloc context creation into a new talloc_ctx.c file
2009-08-15 02:30:58 +02:00
Harald Welte ccceef8fe9 add code for token auth sequencing
* When we first see a subscriber, send the sms
* when the sms completes, send auth req + auth reject and close the channel
2009-08-13 00:57:54 +02:00
Harald Welte edcc527371 Add new BSC RLL layer of code
A caller can call rll_establish(lchan, link_id) and a callback to the GSM RLL
code.  He will get called back if the RLL link is established or receives some
error message, or the establishment times out.

We need this for proper SMS implementation, where we need to restablish a SAPI3
RLL link before transmitting the actual CP-DATA messages.
2009-08-09 13:47:35 +02:00
Harald Welte 805f64486b add RTP proxy mode for ip.access
Up until now, we only supported direct RTP streams between ip.access BTS.
With this commit, the user can specify '-P' to the command line to enable
a RTP/RTCP proxy inside OpenBSC.  The nanoBTS will then send all their voice
data to OpenBSC, which will relay it to the respective destination BTS (which
can be the same BTS).

The default behaviour remains unchanged.  Without '-P' on the command line,
RTP/RTCP is exchanged directly.
2009-07-28 18:25:29 +02:00
Harald Welte aa0b29c265 gms_transactions data model reorganization
This changeset factors out gsm_transaction as something independent
of call control in preparation to re-use the code from SMS.  A
transaction is uniquely identified by either its callref, or by
a tuple of (transaction_id, protocol, subscriber).
2009-07-23 19:10:12 +02:00
Harald Welte 2cf161be08 introduce talloc all over OpenBSC 2009-06-20 22:36:41 +02: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 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00