Commit Graph

1962 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther e2170a9f03 bsc_msc: Remove the except code as it is wrong...
Remove wrong code that is luckily not called. We would end up
in a reconnect and attempt to bsc_fd_register the same socket
again. I am removing this part of the code as it is not used
and it would need to know if the fd has ever been registered
or not...
2010-08-06 07:49:57 +08:00
Holger Hans Peter Freyther 7fe2a3d293 mgcp: Add instrumentation code to find a possible port leak/bsc-fd corruption 2010-08-06 07:18:22 +08:00
Holger Hans Peter Freyther 414bf401c7 mgcp: Move the mgcp_free_endp into the right path for the CRCX failure 2010-08-06 07:05:13 +08:00
Holger Hans Peter Freyther 6f36e92cab mgcp: Fix a filedescriptor leak in case the bind is failing. 2010-08-06 03:00:17 +08:00
Holger Hans Peter Freyther 0e01d09500 mgcp: Enable the tap after configuring it... 2010-08-06 02:05:15 +08:00
Holger Hans Peter Freyther 260d6ed02c 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 6357a8e311 mgcp: Patch RTP packets again if that is allowed. 2010-08-05 20:08:22 +08:00
Holger Hans Peter Freyther a39ddd5654 mgcp: Get the for network/for bts flag right. 2010-08-05 19:35:44 +08:00
Holger Hans Peter Freyther ea97fbf1a1 mgcp: Be more strict on the source addr/source port of the bts
Once we have discovered the bts we will not accept data from
anything else. The call will drop if the BTS is changing the
ip address of the nat anyway.
2010-08-05 19:35:44 +08:00
Holger Hans Peter Freyther b97c50db0a mgcp: Only discover the bts once, the extra check got lost 2010-08-05 19:35:44 +08:00
Holger Hans Peter Freyther d5e6c2374b nat: Use the mgcp_config_alloc to have defaults initialized
Initialize the net_base properly and benefit from future
config changes but also reset certain defauls that we do
not want at the nat.
2010-08-05 19:17:25 +08:00
Holger Hans Peter Freyther f138f917ec 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 1be9f2fddc mgcp: Allow to have a different port allocation mode 2010-08-05 07:20:09 +08:00
Holger Hans Peter Freyther 15e7389cf0 mgcp: Prepare to have different port allocation strategies. 2010-08-05 07:10:56 +08:00
Holger Hans Peter Freyther a3b46c9ac0 mgcp: Fix the signature of the change_cb to not carry the port. 2010-08-05 07:09:14 +08:00
Holger Hans Peter Freyther e602cd6988 mgcp: Separate recv from net/bts and remove autodetection
This allows a more strict check on the source of RTP messages
and we can more easily reject those. For the BTS without an ip
address we will also update the ip address.
2010-08-05 06:57:29 +08:00
Holger Hans Peter Freyther 1fc432984c mgcp: Move the loopback code into the common send as well. 2010-08-05 06:57:29 +08:00
Holger Hans Peter Freyther b615164d75 mgcp: Remove the receive code into a new method. 2010-08-05 06:57:29 +08:00
Holger Hans Peter Freyther 84e1c47f74 mgcp: Move the selection of the right source port to a new method 2010-08-05 06:57:28 +08:00
Holger Hans Peter Freyther 314584ab44 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 196349dda1 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 c49212778f 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 bb89aa1430 mgcp: Make the function internal, only used by the init/config code 2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther 217d712012 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 f1a168dc20 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 58ff219c85 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 a17d701a70 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 8b5772ebe4 mgcp: Remove the forwarding mode as it was not used. 2010-08-05 06:10:13 +08:00
Holger Hans Peter Freyther 7f8aec2b2b mgcp: Fix the payload_type... it broke in 7cdc62c012 2010-08-05 06:10:10 +08:00
Holger Hans Peter Freyther e66cac359e nat: Fix the spelling of that comment. 2010-08-05 06:04:13 +08:00
Holger Hans Peter Freyther 7cdc62c012 mgcp: Fix the reversed net/bts... which has not cause any issue.. 2010-08-04 22:21:40 +08:00
Holger Hans Peter Freyther c02f11a04f mgcp: Pass the whole endpoint to the patch method. 2010-08-04 22:20:34 +08:00
Holger Hans Peter Freyther f1f6bba16d mgcp: Fix the order of the arguments... 2010-08-04 22:14:46 +08:00
Holger Hans Peter Freyther aaf8301a19 mgcp: Print the conn mode as well 2010-08-04 21:52:11 +08:00
Holger Hans Peter Freyther bb14e62a7f mgcp: Disable the actual patching... this is a temporary hack 2010-08-04 21:52:11 +08:00
Holger Hans Peter Freyther 2f10458831 mgcp: Print the system for the duplicate SSRC... 2010-08-04 21:52:11 +08:00
Harald Welte 6526ca720c ipaccess-config / NWL: Decode + print neighbor cell ARFCNs 2010-08-04 13:14:34 +02:00
Holger Hans Peter Freyther a64c67dd61 vty: Remove the logging command that is in libosmocore 2010-08-04 06:26:25 +08:00
Holger Hans Peter Freyther cbfd09843a nat: Show if we are connected to the MSC. 2010-08-04 02:34:10 +08:00
Holger Hans Peter Freyther a99c5b9d0f nat: Count the number of connects to the MSC. 2010-08-04 02:31:55 +08:00
Holger Hans Peter Freyther 03a0ad08cf nat: Indent the connected... to make it belong to the BSC group 2010-08-04 02:29:03 +08:00
Holger Hans Peter Freyther 62abaded39 bsc_msc: Fix the naming of this function. 2010-08-04 02:27:34 +08:00
Holger Hans Peter Freyther 5c1e6cf5fc mgcp: Only patch the header if we had a change in SSRC 2010-08-03 23:57:16 +08:00
Holger Hans Peter Freyther 89976e8285 mgcp: Style issue... add a space. 2010-08-03 23:57:16 +08:00
Holger Hans Peter Freyther 6aa882b515 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 3186892771 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
Holger Hans Peter Freyther ebc824cd2e mgcp: Fix the documentation entry for the parameters 2010-08-03 23:57:16 +08:00
Harald Welte d5db12c160 Use new include paths of libosmo-sccp 0.0.2 2010-08-03 15:11:51 +02:00
Holger Hans Peter Freyther c597a4eba1 mgcp: Allow to change the receive (the loopback part) via the VTY 2010-08-03 03:04:31 +08:00
Holger Hans Peter Freyther 98a3877e97 mgcp: Implement the "loopback" mode for a connection endpoint. 2010-08-03 02:27:21 +08:00
Holger Hans Peter Freyther 294cfcc1e5 sccp: Remove the libsccp.pc.in and the occurence inside the Makefile.am 2010-08-02 23:43:46 +08:00
Holger Hans Peter Freyther c2b31ed9cd 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 5654c5b090 vty: Handle end for NAT and BSC NAT. 2010-07-31 05:20:31 +08:00
Harald Welte a780a3dc9f network-listen: The BSIC flag is not set as expected 2010-07-30 22:35:31 +02:00
Harald Welte e1d1f45034 ipaccess-config: Don't dump the Rxlevel statistics 2010-07-30 22:35:31 +02:00
Harald Welte 59509630df ipaccess-config: Terminate program after running BCCH INFO test 2010-07-30 22:35:30 +02:00
Harald Welte 1e194a304f network_listen: dump BSIC as part of BCCH INFO test 2010-07-30 22:35:30 +02:00
Harald Welte 1ef7ce4fe8 ipaccess-config: Add option to disable color in log output 2010-07-30 22:35:30 +02:00
Holger Hans Peter Freyther 4b85a32360 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 aeb45f5186 chan_alloc: After freeing set the pointer to NULL. 2010-07-31 04:09:38 +08:00
Holger Hans Peter Freyther 30e1ae923d 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
Holger Hans Peter Freyther c44db4a534 abis_rsl: Reduce level from notice to debug for measurement reports
It can happen that OpenBSC decides to close the lchan but we
still receive some measurement reports until the BTS has decided
to close the channel.
2010-07-31 04:09:38 +08:00
Harald Welte 290aaed6e4 [BSC] use correct 0x2B padding for user-specified SI 2010-07-30 11:53:18 +02:00
Harald Welte 9fbff4adac [BSC] Add support for configfile-hardcoded System Information messages 2010-07-30 11:50:09 +02:00
Harald Welte 5f827f4ede Add more RSL <-> Osmo SI type mappings, export osmo_sitype_strs[] 2010-07-30 11:17:13 +02:00
Harald Welte 88f9d98ccc Use hexparse() from libosmocore >= 0.1.14 2010-07-30 10:39:26 +02:00
Holger Hans Peter Freyther 417920a660 mgcp: Attempt to count lost packets better... 2010-07-29 03:04:57 +08:00
Holger Hans Peter Freyther 1aa4246bb8 mgcp: Provide the RTP packet loss information in the mgcp overview 2010-07-29 02:43:14 +08:00
Holger Hans Peter Freyther 380b8711a2 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 12b917d839 osmo_bsc_rf: Add a grace command, send a signal 2010-07-29 02:41:38 +08:00
Holger Hans Peter Freyther d0c3229590 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 6b7710739a nat: Rename ip-tos to ip-dscp and provide an alias... 2010-07-27 19:21:53 +08:00
Holger Hans Peter Freyther e731e1d6dd 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 44d0f19787 gsm_04_80: Embed a ss_Code inside the NotifySS-ARG...
Indicate that this is about the Call Name Presentation (cnap)
but the a1200 still ignores the call completelty...
2010-07-27 04:05:29 +08:00
Holger Hans Peter Freyther 68d26796ca 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 e6373b7f63 gsm_04_80: Fix the size calculation of the 04.80 message..
Subtract the two bytes we were adding to the length of the message.
2010-07-27 01:25:59 +08:00
Holger Hans Peter Freyther daf753477e 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 742fc70011 vty_interface_layer3: Fix a subscriber memory leak.. 2010-07-26 19:43:54 +08:00
Holger Hans Peter Freyther ac30cc833c gsm_04_80: Use msgb_push to get the verification code of msgb
msgb started to verify that we do have enough tail/headroom
and this code was not using this check.
2010-07-26 19:08:59 +08:00
Holger Hans Peter Freyther b02c89e292 gsm_04_80: Add code to wrap a facility IE around. 2010-07-26 19:05:56 +08:00
Holger Hans Peter Freyther 15ef17e70e 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 80dfa75df2 gsm_04_80: Fix the style and move the '*' to the function 2010-07-26 17:59:28 +08:00
Holger Hans Peter Freyther ba81ab329c gsm_04_80: Use the return value of gsm_7bit_encode as length
Use the idiom msgb_put(msg, 0) to get the data pointer, then
encode the string into the msgb and then adjust the size.
2010-07-26 17:56:55 +08:00
Holger Hans Peter Freyther 6a4b362ceb 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 680833e2ba gsm0480: Attempt to encode a NotifySS-Arg with a username.. 2010-07-26 03:55:57 +08:00
Holger Hans Peter Freyther fa530cd6d8 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
Harald Welte d30e087521 [gprs] BSSGP: Fix null pointer dereference
Zecke has found this using "make CC="clang --analyze"
2010-07-23 22:00:45 +02:00
Holger Hans Peter Freyther 6e95c5ffa1 meas_rep.c: clang reports a possible division by zero
Check the input and exit early if we have no measurement reports
to avoid a possible division by zero.
2010-07-23 19:46:04 +08:00
Holger Hans Peter Freyther 8d7b10ef58 nat: Clang reported two places with garbage data
Initialize the variables to NULL to fix it.
2010-07-23 19:43:12 +08:00
Holger Hans Peter Freyther 4f140649cb clang: rc is not initialized in this USSD method. 2010-07-23 19:35:54 +08:00
Holger Hans Peter Freyther a97152b242 clang: Initialize rc with zero.
In the error case we are assigning errno values
but for the success case we have not assigned
anything to the rc variable.
2010-07-23 19:34:34 +08:00
Holger Hans Peter Freyther 960e81e5bd clang: Clang warns we have this value twice...
The type is TLV_TYPE_FIXED, 2 according to the
ipaccess wireshark dissector.
2010-07-23 19:33:16 +08:00
Holger Hans Peter Freyther 306e2bc724 nat: u_int32_t -> uint32_t 2010-07-23 19:09:51 +08:00
Holger Hans Peter Freyther e2c1520a71 nat: u_int16_t -> uint16_t 2010-07-23 19:09:21 +08:00
Holger Hans Peter Freyther dbd16fe59a nat: u_int8_t -> uint8_t 2010-07-23 19:08:55 +08:00
Holger Hans Peter Freyther 7dece86a08 mgcp: u_int8_t -> uint8_t 2010-07-23 18:56:26 +08:00
Holger Hans Peter Freyther d340cd3b2f mgcp: u_int16_t -> uint16_t 2010-07-23 18:56:01 +08:00
Holger Hans Peter Freyther d9b18f8c21 mgcp: u_int32_t -> uint32_t 2010-07-23 18:55:38 +08:00
Holger Hans Peter Freyther ca157ed3c3 Merge branch 'on-waves/sccp' 2010-07-23 18:42:27 +08:00
Holger Hans Peter Freyther ccc91f3088 sccp: u_int32_t -> uint32_t 2010-07-23 18:40:10 +08:00