Commit Graph

682 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 19ce77c8bf vty: Provide a is_config_node for the VTY and use it for the bsc
Right now only bsc_hack and osmo_bsc need to have a custom
config handling as they use the subscr/oml nodes.
2010-08-26 16:55:37 +08:00
Holger Hans Peter Freyther e15223b000 mgcp: Remember if the endpoint was allocated...
Do not use the CI_UNUSED to decide if an endpoint is allocated
but introduce a new flag. This way only the CRCX and free_endp
play with the allocated field.
2010-08-06 18:03:11 +08:00
Holger Hans Peter Freyther 70d18cb6b8 mgcp: Add a callback to inform the client that an endpoint got reallocated 2010-08-06 17:54:27 +08:00
Holger Hans Peter Freyther 9a877826ef nat: Keep the state (CRCX,MDCX,DLCX) of the operation..
This will allow to have additional debug information and to
use the state inside the forwarding code.
2010-08-06 09:07:07 +08:00
Holger Hans Peter Freyther 526b4d330b mgcp: Make the CI uint32_t all the way to avoid mismatch 2010-08-06 08:29:37 +08:00
Holger Hans Peter Freyther 8fdb95eb39 mgcp: Add a call tap feature to forward audio to another forward port
For debugging it is useful to forward (tee) UDP packets to another
system and use gstreamer to inspect the rtp stream. This is untested
code and might contain bugs.... and of course only tap your own calls.
2010-08-06 01:12:21 +08:00
Holger Hans Peter Freyther 73aa514f63 mgcp: Patch RTP packets again if that is allowed. 2010-08-05 20:08:22 +08:00
Holger Hans Peter Freyther 05d8f5f46a mgcp: Allow to dynamically allocate ports from a range..
Allow to switch to a dynamic port allocator and not reuse
the ports for a long time... This should help with a crazy
network sending two streams at the same time.
2010-08-05 08:08:17 +08:00
Holger Hans Peter Freyther f330729dc9 mgcp: Allow to have a different port allocation mode 2010-08-05 07:20:09 +08:00
Holger Hans Peter Freyther 2ea9118f4f mgcp: Prepare to have different port allocation strategies. 2010-08-05 07:10:56 +08:00
Holger Hans Peter Freyther 81938e9a57 mgcp: Allocate a different port for the networking...
Use the right source port when sending the message.
2010-08-05 06:12:02 +08:00
Holger Hans Peter Freyther ee4657c376 mgcp: Rename the base port to bts_base as it will be used for the bts 2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther bfb68b77a0 mgcp: Move the bfd for rtp/rtcp into the port
Stop using the memset in the mgcp_rtp_end_reset as we
will reset the list pointers and then have a mess..
2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther 083059e0cf mgcp: Make the function internal, only used by the init/config code 2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther d1725f40f6 mgcp: Rename the bind method to show it is only binding for the bts port 2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther 7140daef67 mgcp: Only use early bind for the BTS socket.
Simplify the code by onlt allowing one way to allocate
a socket.
2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther 148c5d3c49 mgcp: Attempt to separate the RTP/RTCP port for the Network and for the BTS
We plan to have two different ports for the network and for the
BTS to avoid detecting the BTS and to dynamically allocate the
port to have old data not go to a new socket.
2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther fab76aad32 mgcp: Group the state for bts/net into a struct and have two instances
Group the data that each end (network/bts) have into a struct and use
this struct throughout the sourcecode.
2010-08-05 06:10:54 +08:00
Holger Hans Peter Freyther 6434452b5a mgcp: Remove the forwarding mode as it was not used. 2010-08-05 06:10:13 +08:00
Holger Hans Peter Freyther 0253fe25c2 vty: Remove the logging command that is in libosmocore 2010-08-04 06:26:25 +08:00
Holger Hans Peter Freyther 6230eb22b2 mgcp: Only patch the header if we had a change in SSRC 2010-08-03 23:57:16 +08:00
Holger Hans Peter Freyther 3040ed42b4 mgcp: Allow switching the audio streams, patch the header
Patch the sequence number, the SSRC and the timestamp to
allow to mix various voice streams, e.g. toggling the loop
during the call.
2010-08-03 23:57:16 +08:00
Holger Hans Peter Freyther 84ba528a5a mgcp: Move the rtp state into a struct
Use a struct to group the rtp state for the up and the down
link of the bts.
2010-08-03 23:57:16 +08:00
Harald Welte 90e5eae6db Use new include paths of libosmo-sccp 0.0.2 2010-08-03 15:11:51 +02:00
Holger Hans Peter Freyther b33ded1cad mgcp: Allow to change the receive (the loopback part) via the VTY 2010-08-03 03:04:31 +08:00
Holger Hans Peter Freyther 0bdf20d668 mgcp: Implement the "loopback" mode for a connection endpoint. 2010-08-03 02:27:21 +08:00
Holger Hans Peter Freyther 4a9dd3b222 nat: Fix compilation with nat not being enabled.
common_vty.c was including bsc_nat.h which tried to
get the sccp/sccp_types.h which is not required to be
installed. Move all structs using/embedding SCCP structures
into the bsc_nat_sccp.h and include. This should fix
the compilation.
2010-07-31 05:20:31 +08:00
Holger Hans Peter Freyther 3fdf5b9ff6 chan_alloc: Change Channel Release to release SAPIs, then the channel
Currently every SAPI release indication will trigger the channel. It
was possible that we had SAPI=3 and SAPI=0 allocated and we tried to
release the channel by sending a RF Channel Release, the BTS answered
with a RF Channel Release ACK but also sent the SAPI Release Indication
which triggered a channel release here. So it was possible that we
would have released a newly allocated channel because of the SAPI
release of the old connection.

This code now works by releasing all SAPIs from highest to lowest,
then sending a SACH Deactivate and finally releasing the channel. This
approach is in use on the on-waves/bsc-master.
2010-07-31 04:09:38 +08:00
Holger Hans Peter Freyther a8dffc119c sccp: Use the external libosmo-sccp as sccp implementation
Add --enable-nat and --enable-osmo-bsc to build applications
requiring the Osmo SCCP library to be installed. We are not
using autodiscover as this is out of fashion.
2010-07-31 04:09:38 +08:00
Harald Welte d8acf14e0e [BSC] Add support for configfile-hardcoded System Information messages 2010-07-30 11:50:09 +02:00
Harald Welte 37dfea44c2 Add more RSL <-> Osmo SI type mappings, export osmo_sitype_strs[] 2010-07-30 11:17:13 +02:00
Holger Hans Peter Freyther e758d958a5 mgcp: Attempt to count missing RTP packets with a basic calculation
This code compares the UDP sequence numbers of two RTP messages
and guesses if packets are missing. It is guessing in two ways:

	1.) by default the sequence number is 0, so on the first
	    value we ignore the jump... we might ignore a real issue
	    in case of a wrap around which is easily possible as the
	    sequence should be a random number.
	2.) the UDP stream might have been reordered on the network
	    and we would see the jump...

In any case these two shortcomings are acceptable for the feature
that is meant to provide some basic analysis..
2010-07-29 02:41:38 +08:00
Holger Hans Peter Freyther 9bf4cecd4b osmo_bsc_rf: Add a grace command, send a signal 2010-07-29 02:41:38 +08:00
Holger Hans Peter Freyther 3140c4f7cf mgcp: Rename TOS to DSCP
DSCP is the more modern information for TOS and the kernel
will set parts of TOS by itself (e.g. for ECN).
2010-07-27 20:35:03 +08:00
Holger Hans Peter Freyther f0374a5fda nat: Rename ip-tos to ip-dscp and provide an alias... 2010-07-27 19:21:53 +08:00
Holger Hans Peter Freyther 74294763a0 gsm_04_80: Allow to specify the alert pattern for the notification
Allow to specify the level (not the category) of the notification
this provides an easy way to test it on the phones.
2010-07-27 18:27:46 +08:00
Holger Hans Peter Freyther 9059790fcf gsm_04_80: Send a Release Complete otherwise the USSD unit stays BUSY
We need to release the USSD unit, otherwise it is staying blocked
and will stop to function (even across LUs on my a1200). This code
should encode the transaction and the direction depending on the
network state but this is omitted right now.
2010-07-27 03:31:50 +08:00
Holger Hans Peter Freyther b506d727c7 gsm_04_80: Add untested code for USSD notification...
One should be able to send a USSD Notification to a given
subscriber if we has an active link...
2010-07-26 20:01:07 +08:00
Holger Hans Peter Freyther d26df29107 gsm_04_80: Add code to wrap a facility IE around. 2010-07-26 19:05:56 +08:00
Holger Hans Peter Freyther 7461c1c094 gsm_04_80: Create a unstructuredSS-Notify message
Create a unstructuredSS-Notify for a given type.
2010-07-26 18:34:27 +08:00
Holger Hans Peter Freyther 26e4627859 gsm_04_80: Fix the style and move the '*' to the function 2010-07-26 17:59:28 +08:00
Holger Hans Peter Freyther 93be079787 gsm0480: Implement a generic "invoke" wrapping for messages.
Implement a GSM 04.80 invoke wrapper for a component and an
invoke id.
2010-07-26 03:55:57 +08:00
Holger Hans Peter Freyther 4e1c7f1298 gsm0480: Attempt to encode a NotifySS-Arg with a username.. 2010-07-26 03:55:57 +08:00
Holger Hans Peter Freyther fb4e783439 gsm_subscriber: Increase the name to 160 charachters
160 charachters is the limit of the subscriber name inside
the notifySS nameIndicator/callingName.
2010-07-26 03:55:56 +08:00
Holger Hans Peter Freyther 0b7763574d nat: u_int8_t -> uint8_t 2010-07-23 19:08:55 +08:00
Holger Hans Peter Freyther e7538c5d67 Merge branch 'on-waves/sccp' 2010-07-23 18:42:27 +08:00
Holger Hans Peter Freyther 4e5140b0ec sccp: u_int32_t -> uint32_t 2010-07-23 18:40:10 +08:00
Holger Hans Peter Freyther 8deda23007 sccp: u_int8_t -> uint8_t 2010-07-23 18:39:17 +08:00
Holger Hans Peter Freyther b67f408c38 rsl: Add method to send a SMSCB inside a SMS BROADCAST COMMAND
* Untested code for sending the SMS BROADCAST COMMAND.
2010-07-23 17:16:48 +08:00
Holger Hans Peter Freyther 040e10a547 bsc_api: Add cipher mod reject api callback 2010-07-23 17:15:15 +08:00