Commit Graph

19 Commits

Author SHA1 Message Date
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