aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2014-08-28osmux: print out 'osmux port' when saving configurationPablo Neira Ayuso1-0/+2
2014-08-28osmux: allow to specify the Osmux portPablo Neira Ayuso1-0/+10
via mgcp section from the configuration file.
2014-07-22mgcp: Change API to remove memory management from the nameHolger Hans Peter Freyther1-1/+1
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: Provide more information about configured endpointsHolger Hans Peter Freyther1-13/+26
2014-07-07mgcp: Verify that the force-ptime is written back to the fileHolger Hans Peter Freyther1-1/+3
When the command was added it was not verified that. Add a very basic MGCP VTY test and test that the string appears in the config.
2014-07-07mgcp: Fix documentation issue in the force-ptime commandHolger Hans Peter Freyther1-1/+2
<command id='rtp force-ptime (10|20|40)'> <param name='10' doc='(null)' /> <param name='20' doc='(null)' /> <param name='40' doc='(null)' />
2014-06-16mgcp: Allow to batch more than four messagesHolger Hans Peter Freyther1-1/+1
2014-06-05mgcp: Add packet size (ptime) conversionJacob Erlbeck1-0/+22
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-03osmux: Fix the VTY online help in the osmux commandHolger Hans Peter Freyther1-1/+1
This should fix most of: Documentation error (missing docs): <command id='osmux (on|off)'> <param name='off' doc='(null)' /> Documentation error (missing docs): <command id='osmux batch-factor &lt;1-4&gt;'> <param name='&lt;1-4&gt;' doc='(null)' /> Documentation error (missing docs): <command id='osmux (on|off)'> <param name='off' doc='(null)' /> Documentation error (missing docs): <command id='osmux (on|off)'> <param name='off' doc='(null)' /> Documentation error (missing docs): <command id='osmux batch-factor &lt;1-4&gt;'> <param name='&lt;1-4&gt;' doc='(null)' />
2014-05-22mgcp: add voice muxer supportPablo Neira Ayuso1-0/+44
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-03-20mgcp: The valid payload types start at 0. Fix the VTYHolger Hans Peter Freyther1-4/+4
2014-01-16mgcp: Send RTP keepalive dummy packets to netJacob Erlbeck1-0/+91
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
2014-01-16mgcp/rtp: Add flag to disable RTP outputJacob Erlbeck1-1/+7
This patch make it possible to have a valid endpoint that drops all outgoing RTP packets. The number of dropped packets is shown by the VTY 'show mgcp' command. By default, this feature is disabled. To enable packet dropping, the corresponding output_enabled field must be set to 0. Ticket: OW#1044 Sponsored-by: On-Waves ehf
2013-12-19mgcp/rtp: Only patch timestamp alignment errorsJacob Erlbeck1-10/+10
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/+50
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-1/+144
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-11-25mgcp/rtp: Add counter for invalid RTP timestamp deltasJacob Erlbeck1-5/+18
This patch modifies the patch_and_count() function to check for RTP timestamp inconsistencies. It basically checks, whether dTS/dSeqNo remains constant. If this fails, the corresponding counter is incremented. There are four counter for this: Incoming and outgoing, each for streams from the BTS and the net. Note that this approach presumes, that the per RTP packet duration (in samples) remains the same throughout the entire stream. Changing the number of speech frames per channel and packet will be detected as error. In addition, the VTY command 'show mgcp' is extended by an optional 'stats' to show the counter values, too. Ticket: OW#964 Sponsored-by: On-Waves ehf
2013-10-30vty: Use vty_install_default() instead of bsc_install_default()Jacob Erlbeck1-2/+2
Remove ournode_exit_cmd, ournode_end_cmd, and bsc_install_default() since this functionality is provided by the current libosmocore. Replace calls to bsc_install_default() by call to vty_install_default() with the following semantic patch: @rule1@ expression N; @@ - bsc_install_default(N); + vty_install_default(N); Ticket: OW#952 Sponsored-by: On-Waves ehf
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck1-6/+2
Add bsc_install_default() and replace all install_default() This patch adds bsc_install_default() which calls install_default() and add 'exit' and 'end'. All other calls to install_default() are replaced by calls to bsc_install_default(). Since 'exit' and 'end' are now added automatically to each node, the explicit registrations of these commands are removed by this patch, too. The related tests succeed now without work-arounds (except for the 'config' node itself which is part of libosmocore).
2013-08-27libmgcp: add enum mgcp_rolePablo Neira Ayuso1-1/+3
This enum indicates if the mgcp is running on the BSC or the BSC-NAT.
2013-03-03vty: Document some previously undocumented parametersHolger Hans Peter Freyther1-2/+4
Katerina pointed out that some nodes are not fully documented and proposed some messages. The token/timeout messages were correct, I have modified the other messages. I removed the full-stop from the PING/PONG documentation as we are normally not using a full sentence.
2012-12-16mgcp: Allow to freely control the a=fmtp line for experimentsHolger Hans Peter Freyther1-0/+36
In case of AMR one can specify the available codecs out-of-band. Allow to configure this line statically in the configuration file.
2012-11-12mgcp: Remove the lost_no from the mgcp statisticsHolger Hans Peter Freyther1-3/+2
The RFC 3435 specifies a different formula for calculating the lost packages. It involves the number of received packages and the delta of the sequence number.
2012-08-17VTY: improve VTY prompt and make sure exit/end works everywhereHarald Welte1-2/+2
Some nodes below 'config' didn't have ournode_exit / ournode_end, and thus were not able to properly perform this function. exit should always only go back one level, while end drops us back to ENABLE_NODE. The prompt now represents the nesting level, and there's one consistent space after the final prompt character (typically #).
2012-07-28mgcp: Make sure "no rtcp-omit" is fully documentedHolger Hans Peter Freyther1-4/+6
One command missed the NO_STR in the documentation, share the main text across all commands.
2012-05-11mgcp: Make it possible to drop RTCP packets coming from the BTS/NetHolger Hans Peter Freyther1-0/+50
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 VTY commands to reset (RSIP) one or all endpointsHarald Welte1-0/+56
2011-11-06mgcp: Make sure each command has some kind of online helpHolger Hans Peter Freyther1-37/+96
In this iteration I just want to make sure that each VTY command has online help. Replace "a b" with "a-b" if there is no "a c" with b!=c. This config should gain some more sanity and consistency, this will happen in another iteration.
2011-04-18misc: Remove sys/types.h includes from the filesHolger Hans Peter Freyther1-1/+0
These are not needed any more. We used them for u_int types but we now use uint which comes from stdint.h
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-1/+1
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-03-08mgcp: Remove some duplicate header files from the list.Holger Hans Peter Freyther1-4/+0
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte1-0/+742
... and make sure tests work again after restructuring