Commit Graph

151 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 88b597e21c mgcp: Allow to disable the transcoder in a running system. 2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther b54048fe25 mgcp: Make transcoding a per Endpoint configuration
This allows to switch off transcoding on the fly, or only enable
it for certain vessels with known problems.
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther fbca4ea117 mgcp: Fix the indetion of this code. it should use tabs 2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther 3e9a7f80bd misc: Replace the idiom for replacing a string with a function call
Remove a lot of code in favor of a new function that is freeing
the old string and copying the new one. I should have gotten the
context and the strings right.
2010-10-12 23:31:53 +02:00
Holger Hans Peter Freyther 3cb287919e misc: Attempt to determine byte order in a cross-platform way
OSX does not provide an endian.h, use the other header files that
should define/include what we need. Also check that the byteorder
define is available.
2010-10-12 15:41:03 +02:00
Holger Hans Peter Freyther cf1c8777a4 mgcp: Return 0 in case transcoding is disabled.
In case transcoding is disabled no error has happened, return
a zero. This is fixing starting the nat without transcoding.
2010-09-24 04:41:28 +08:00
Holger Hans Peter Freyther 9aa8a9c5a7 mgcp: Count the packets that arrive on the transcoder 2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther 557b1ab15b mgcp: Remove code duplication for filling out the sockaddr_in
Share the send to transcoder sockaddr sending routines.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther f2eedff052 nat: Send a transcoder reset on start up.
The transcoder RESET is using the same extensions to reset all
endpoints on a remote site. This makes sure that all allocations
can be made in a properly configured network.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther b98ba72e0a mgcp: Make the base port of the transcoder configurable
The code assumes a static mapping from endpoint to RTP port,
be able to configure the start of such a mapping.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther 3b5e3c4d6f mgcp: Prepare the CRCX/MDCX/DLCX messages for the transcoder.
Send CRCX/MDCX/DLCX to the transcoder, fill out transcoder_end with
the interesting data and hope that it is going to work.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther 218f8564e1 mgcp: Forward data from the BTS-in to the transcoder
Bind a new port for the transcoder, forward data from the BTS
to the transcoder, and from the transcoder to the network. Leave
BTS-IN where it is, BTS-OUT can now be after the transcoding took
place. We send the data from the BTS RTP port.

This whole route will be guarded by the transcoder_ip and if it is
NULL (current default) it will not go through the transcoder.
2010-09-20 02:51:30 +08:00
Holger Hans Peter Freyther 54aaa0fbed mgcp: Add ports for the transcoder as well 2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther c5f9248c3f mgcp: Share the range parsing code for net/bts 2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther a2a10ebf03 mgcp: Add a transcoder-mgw command to store the address 2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther 6f6801066b mgcp: Keep the gw_fd inside the mgcp_config
Move the bfd from a static var into the mgcp_config.
2010-09-20 02:51:29 +08:00
Holger Hans Peter Freyther e02860af00 mgcp: Be able to parse 'sendonly' for the connection mode. 2010-09-20 02:49:09 +08:00
Holger Hans Peter Freyther 0e940e65c7 mgcp: Switch the default audio codec to AMR 2010-09-20 02:48:59 +08:00
Holger Hans Peter Freyther adb6e1cce1 janitor: Move the * to the variable name 2010-09-18 06:44:24 +08:00
Holger Hans Peter Freyther 5f54075a8b vty: Use \r\n in the copyright messages
We should use VTY_NEWLINE but our strings are static, always
use \r\n as unix terminals can handle that as well.
2010-09-11 13:32:30 +08:00
Holger Hans Peter Freyther 81506b4095 vty: Add the config node code to everyone. 2010-09-04 11:00:01 +08:00
Harald Welte 2c869efcd3 Introduce '-D' commandline option to daemonize processes
This uses the osmo_daemonize() function of libosmocore >= 0.1.18,
and is now implemented for bac_nat, osmo-bsc, bsc_hack, osmo-gbproxy
and bsc_mgcp.  This means only osmo-sgsn is missing, which currently
has no option parsing at all.
2010-08-25 19:43:54 +02:00
Holger Hans Peter Freyther 5508fe3320 mgcp: Add a vty command to free a given endpoint. 2010-08-08 16:39:57 +08:00
Holger Hans Peter Freyther 9e9392d5b3 mgcp: Use transient errors in more cases... 2010-08-08 16:24:48 +08:00
Holger Hans Peter Freyther e378cb1341 mgcp: Reduce the log level to debug for these calls. 2010-08-06 20:22:23 +08:00
Holger Hans Peter Freyther 39a97e24fb 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 869e38eced 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 4634013cde mgcp: Make the CI uint32_t all the way to avoid mismatch 2010-08-06 08:29:37 +08:00
Holger Hans Peter Freyther 52ccf6a480 mgcp: Fix discovering the RTCP port with the more strict check.
If we have found the BTS and we receive data on the RTCP port
from the IP of the BTS we will set our RTCP port and forward it
to the network and hope it will be useful.
2010-08-06 07:49:57 +08:00
Holger Hans Peter Freyther 0d44eb6a24 mgcp: Determine the proto properly... 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 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