aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/mgcp.h
AgeCommit message (Collapse)AuthorFilesLines
2015-04-24mgcp: Allow to disable transcoding for trunksHolger Hans Peter Freyther1-0/+2
We might have compiled transcoding into the MGW but we don't want to enable it for a given user. Add a new switch that should allow that. I had manually tested the allow-transcoding/no allow VTY interface for the primary interface and a new trunk using show running-config.
2014-11-19mgcp: Allow to omit sending the audio name at allHolger Hans Peter Freyther1-0/+1
Equipment like AudioCode appears to get upset when we use a builtin type and then assign a name to it. Allow to completely omit the name.
2014-08-29osmux: add 'osmux batch-size NUM' option to mgcp vtyPablo Neira Ayuso1-0/+2
This allows you to specify the osmux batch frame size. If zero, the library uses the default value.
2014-08-28osmux: allow to specify the Osmux portPablo Neira Ayuso1-0/+2
via mgcp section from the configuration file.
2014-07-22mgcp: Change API to remove memory management from the nameHolger Hans Peter Freyther1-1/+2
Jacob pointed out that "free_endp" refers to the memory of the endpoint being freed. What we want is actually a way to release an endpoint (and the resource it allocated) or in the case of the testcase/testapp initialize the data structure correctly. Introduce two names for that.
2014-07-22mgcp: Document transcoding semantic and follow itHolger Hans Peter Freyther1-0/+6
Transcoding from GSM to PCMA can lead to the MGCP MGW sending two PCMA packages with the same sequence number and timestamp. Once with the encoded audio and once completely empty. This is because "state->dst_packet_duration" is 0 in most cases (unless a ptime is forced) and we attempt to encode audio even if there are not enough samples. The encode_audio return will return 0 in that case which is not trated as an error by the mgcp network code. Handle rc == 0 specially and document the semantic.
2014-06-05mgcp: Add packet size (ptime) conversionJacob Erlbeck1-1/+4
The current transcoder implemenation always does a 1:1 recoding concerning the duration of a packet. So RTP timestamps and sequence numbers are not modified. This is not sufficient in some cases, e.g. when the BTS does only allow for a single fixed ptime. This patch decouples encoding from decoding and moves the decoded samples to the state structure so that samples can be combined or drain according to the packaging of incoming and outgoing packets. This patch incorporates parts of Holger's experimental fixes in 0e669e05^..9eba68f9. Ticket: OW#1111 Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add a function to get media info for MGCP responsesJacob Erlbeck1-0/+8
This patch adds the get_net_downlink_format_cb() callback to provide payload_type, subtype_name, and fmtp_extra suitable for use in a MGCP response sent to the network. Per default, the BTS side values are returned since these must be honoured by the net peer when sending audio to the media gateway (unless transcoding is done). Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add callbacks for payload processingJacob Erlbeck1-0/+10
This patch adds the callbacks rtp_processing_cb and setup_rtp_processing_cb to mgcp_config to support arbitrary RTP payload processing. Sponsored-by: On-Waves ehf
2014-05-22mgcp: add voice muxer supportPablo Neira Ayuso1-0/+13
This patch adds the voice muxer. You can use this to batch RTP traffic to reduce bandwidth comsuption. Basically, osmux transforms RTP flows to a compact batch format, that is later on decompacted to its original form. Port UDP/1984 is used for the muxer traffic between osmo-bsc_nat and osmo-bsc_mgcp (in the BSC side). This feature depends on libosmo-netif, which contains the osmux core support. Osmux is requested on-demand via the MGCP CRCX/MDCX messages (using the vendor-specific extension X-Osmux: on) coming from the BSC-NAT, so you can selectively enable osmux per BSC from one the bsc-nat.cfg file, so we have a centralized point to enable/disable osmux. First thing you need to do is to accept requests to use Osmux, this can be done from VTY interface of osmo-bsc_nat and osmo-bsc_mgcp by adding the following line: mgcp ... osmux on osmux batch-factor 4 This just initializes the osmux engine. You still have to specify what BSC uses osmux from osmo-bsc_nat configuration file: ... bsc 1 osmux on bsc 2 ... bsc 3 osmux on In this case, bsc 1 and 3 should use osmux if possible, bsc 2 does not have osmux enabled. Thus, you can selectively enable osmux depending on the BSC, and we have a centralized point for configuration from the bsc-nat to enable osmux on demand, as suggested by Holger. At this moment, this patch contains heavy debug logging for each RTP packet that can be removed later to save cycles. The RTP ssrc/seqnum/timestamp is randomly allocated for each MDCX that is received to configure an endpoint.
2014-01-16mgcp: Send RTP keepalive dummy packets to netJacob Erlbeck1-0/+9
So far, a single dummy packet has been sent immediately after the reception of a MDCX message. There is no dedicated keep alive mechanism (it just worked because the audio from the MS has always been forwarded to the NAT until the 'mgcp: Set output_enabled flags based on the MGCP mode' patch). This patch adds explicit, timer based keep alive handling that can be enable per trunk. A VTY command 'rtp keep-alive' command is added for configuration which can be used to set the interval in seconds, to send a single packet after the reception of a CRCX/MDCX when RTP data from the net is expected ('once'), or to disable the feature completely ('no rtp keep-alive'). In 'send-recv' connections, only the initial packet is sent if enabled (even when an interval has been configured). The default is 'once'. Note that this removes the mgcp_change_cb() from mgcp_main.c. Sponsored-by: On-Waves ehf
2013-12-19mgcp/rtp: Only patch timestamp alignment errorsJacob Erlbeck1-1/+1
Currently, all timestamps are force to SeqNo*d + C which is more than required by the nanoBTS which seems to be sensitive to alignment errors only (dTS != k*d, d = ptime * rate = 160). This patch replaces the force_constant_timing feature by a force_aligned_timing feature. The timestamp offset will only be changed (and timestamp errors counted) when the alignment does not match to the raster based on ptime (default 20ms). The VTY interface does not change. Sponsored-by: On-Waves ehf
2013-12-13mgcp: Optionally send ptime in SDPJacob Erlbeck1-0/+1
Currently the SDP 'ptime' media attribute is never set in generated MGCP responses. This patch optionally includes the 'ptime' attribute if packet_duration_ms is != 0. This behaviour can be enabled/disabled by using the VTY command "sdp audio-payload send-ptime" (enabled by default). Sponsored-by: On-Waves ehf
2013-12-10mgcp/rtp: Add RTP header patch mode configurationJacob Erlbeck1-0/+4
This adds datastructures and a VTY frontend to configure the different type of RTP header patching: SSRC and timestamp. Note that timestamp patching is not yet implemented. Sponsored-by: On-Waves ehf
2013-08-27libmgcp: add enum mgcp_rolePablo Neira Ayuso1-1/+9
This enum indicates if the mgcp is running on the BSC or the BSC-NAT.
2013-04-16nat: We want the remote to respond to our DLCX requestHolger Hans Peter Freyther1-0/+1
We want to send a TRAP with the MGCP statistics from the NAT and the connected BSC. The BSC endpoint can be either released because of a DLCX from the MGCP CallAgent or the SCCP Connection release on the A-link. This is why we need to queue the statistics when the deleting the endpoint on the BSC. The processing is continued once the response arrives. This code assumes that the response of the DLCX will be sent by the remote side. The current amount of outstanding responses can be seen on the VTY. This assumption is based on the fact that the BSC has already responded to the CRCX and maybe to the MDCX. The MGCP RFC is bended to prefix the transaction identifier with "nat-" to easily detect the response and hand it to the handler. This will then parse the response and generate the TRAP. The current version is v1. We assume that the transaction space is big enough and we will not re-assign the transaction identifier too early.
2012-12-16mgcp: Allow to freely control the a=fmtp line for experimentsHolger Hans Peter Freyther1-0/+1
In case of AMR one can specify the available codecs out-of-band. Allow to configure this line statically in the configuration file.
2012-12-10mgcp: Test and implement re-transmission handlingHolger Hans Peter Freyther1-1/+1
MGCP is used over UDP and a response might be lost. The MGCP RFC asks for keeping a list of responses and then using the previous response to answer a duplicate request. I tried to conserve memory and just wanted to remember the last transaction identifier and result-code and re-generate the result from that. This made the code look bad and this is why the entire response will now be stored. It sadly increases the memory usage but can not be avoided at this time. Remove the msg->l3h pointer for the RQNT callback as strtok has modified the content of it.
2012-12-10mgcp: Methods generating a response now include the endpoint pointerHolger Hans Peter Freyther1-1/+0
This is required for remembering the last result in a central place and is required to properly implement detection of re-transmissions.
2012-11-29mgcp: Begin handling of the RQNT message as needed for DTMFHolger Hans Peter Freyther1-2/+4
Introduce a callback for the request and forward the signalrequest to the callback. This is not a full implementation of MGCP RQNT.
2012-11-12mgcp: Include statistics at the end of a connectionHolger Hans Peter Freyther1-0/+1
Follow the MGCP specification and send the collected statistics at the end of a call. Right now this does not include jitter, packet loss and delay.
2012-05-11mgcp: Make it possible to drop RTCP packets coming from the BTS/NetHolger Hans Peter Freyther1-0/+2
The ip.access nanoBTS appears to send quite broken NTP timestamps in the RTCP messages might confuse equipment that uses the sender report of the BTS. Make it easy to experiment by adding an option to drop RTCP.
2012-01-27mgcp: add missing prototypes for send_mgcp_reset_*Harald Welte1-0/+3
2011-07-19mgcp: Implement RSIP based on a trunk levelHolger Hans Peter Freyther1-1/+1
Implement the RSIP spec extension to work on the specified trunk instead of hardcoding it to the virtual trunk.
2011-05-06src: use namespace prefix osmo_wqueue*Pablo Neira Ayuso1-1/+1
Summary of changes: s/struct write_queue/struct osmo_wqueue/g s/write_queue_init/osmo_wqueue_init/g s/write_queue_clear/osmo_wqueue_clear/g s/write_queue_enqueue/osmo_wqueue_enqueue/g s/write_queue_bfd_cb/osmo_wqueue_bfd_cb/g
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-2/+2
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-02-28mgcp: Fix the static allocation of E1 trunks for the BTS/NET sideHolger Hans Peter Freyther1-0/+4
2011-02-28mgcp: Allocate the endpoints for the E1 trunks as well.Holger Hans Peter Freyther1-1/+1
2011-02-28mgcp: Introduce a trunk config for multiple trunks.Holger Hans Peter Freyther1-0/+3
A trunk will always have 32 endpoints to be used and we allow a sparse allocation of endpoints.
2011-02-28mgcp: Introduce a mgcp_trunk_config enum for endpoint configsHolger Hans Peter Freyther1-13/+26
We want to support real trunks in the MGCP code and we need to have some better book keeping for those. Move the code around.
2011-01-06mgcp: Include a MGCP Response String in the responseHolger Hans Peter Freyther1-1/+1
Switch to a \r\n at the end of the query. Both \n and \r\n are valid according to the spec but this makes us match responses of other equipment.
2011-01-01License change: We are now AGPLv3+ instead of GPLv2+Harald Welte1-6/+5
The reason for this is quite simple: We want to make sure anyone running a customized version of OpenBSC to operate a network will have to release all custom modifiations to the source code.
2010-09-20nat: Send a transcoder reset on start up.Holger Hans Peter Freyther1-0/+1
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-20mgcp: Make the base port of the transcoder configurableHolger Hans Peter Freyther1-2/+5
The code assumes a static mapping from endpoint to RTP port, be able to configure the start of such a mapping.
2010-09-20mgcp: Add ports for the transcoder as wellHolger Hans Peter Freyther1-0/+1
2010-09-20mgcp: Add a transcoder-mgw command to store the addressHolger Hans Peter Freyther1-0/+2
2010-09-20mgcp: Keep the gw_fd inside the mgcp_configHolger Hans Peter Freyther1-0/+3
Move the bfd from a static var into the mgcp_config.
2010-09-20mgcp: Remove the hack to remap timeslot one...Holger Hans Peter Freyther1-5/+7
The timeslot one is blocked and should not be used, replace the code with a warning and watch out for it. Tis is most likely due the uncovered in the previous commit due the wrong TLV definition.
2010-08-29mgcp: Add method to go back from endpoint to multiplex/timeslotHolger Hans Peter Freyther1-0/+9
2010-08-29mgcp: Speculative mgcp fix...Holger Hans Peter Freyther1-1/+1
We really have 32 channels per multiplex... so use the right number... or at least it seems we do have 32.
2010-08-06mgcp: Add a callback to inform the client that an endpoint got reallocatedHolger Hans Peter Freyther1-0/+2
2010-08-06mgcp: Make the CI uint32_t all the way to avoid mismatchHolger Hans Peter Freyther1-1/+1
2010-08-05mgcp: Allow to have a different port allocation modeHolger Hans Peter Freyther1-0/+5
2010-08-05mgcp: Prepare to have different port allocation strategies.Holger Hans Peter Freyther1-2/+16
2010-08-05mgcp: Allocate a different port for the networking...Holger Hans Peter Freyther1-0/+2
Use the right source port when sending the message.
2010-08-05mgcp: Rename the base port to bts_base as it will be used for the btsHolger Hans Peter Freyther1-1/+1
2010-08-05mgcp: Make the function internal, only used by the init/config codeHolger Hans Peter Freyther1-1/+0
2010-08-05mgcp: Rename the bind method to show it is only binding for the bts portHolger Hans Peter Freyther1-1/+1
2010-08-05mgcp: Only use early bind for the BTS socket.Holger Hans Peter Freyther1-1/+0
Simplify the code by onlt allowing one way to allocate a socket.
2010-08-05mgcp: Attempt to separate the RTP/RTCP port for the Network and for the BTSHolger Hans Peter Freyther1-1/+1
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.