aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-12osmux: Allow to listen to a specific addressHolger Hans Peter Freyther1-0/+12
For a setup with multiple network interfaces be able to pick the one that osmux should be used/visible.
2015-10-12osmux: Allow to enforce using Osmux for the clientHolger Hans Peter Freyther1-14/+31
Some systems only want to use Osmux. In case only Osmux should be used fail if it has not be offered/acked. Client: Verified On, Off and Only with X-Osmux: 3 and without this field. <000b> mgcp_protocol.c:823 Osmux only and no osmux offered on 0x14 <000b> mgcp_protocol.c:884 Resource error on 0x14 NAT: Not tested and implemented Fixes: OW#1492
2015-10-12osmux: Add introspection for osmux.Holger Hans Peter Freyther1-0/+3
* Print number of used CIDs for the system * Hopefully this is just the beginning
2015-09-07osmux: fix show online-helpPablo Neira Ayuso1-1/+1
Before: <command id='osmux dummy (on|off)'> <params> <param name='osmux' doc='RTP multiplexing' /> <param name='dummy' doc='Enable dummy padding' /> <param name='on' doc='Disable dummy padding' /> <param name='off' doc='(null)' /> </params> After: <command id='osmux dummy (on|off)'> <params> <param name='osmux' doc='RTP multiplexing' /> <param name='dummy' doc='Dummy padding' /> <param name='on' doc='Enable dummy padding' /> <param name='off' doc='Disable dummy padding' /> </params> </command> Note the 'null' string in 'off'. Reported by Holger.
2015-08-20mgcp: Allow to bind to different ports for net/bts portsHolger Hans Peter Freyther1-0/+46
When using multiple interfaces on a system one can now configure which will be served for the BTS ports and which will be served for the network. The direct usage of source_addr is now only to initialize the MGCP receiving port itself.
2015-08-19osmux: add option to pad the circuit with dummy messagesPablo Neira Ayuso1-0/+16
Iridium is a satellite network which operates a GPRS-like that allows you to get speeds up to 128kbit/s. However, it takes from 5 to 6 secs to get the bandwidth allocated, so the conversation is garbled during the time. This patch uses the new dummy padding support in libosmo-netif that is controlled through the osmux osmux_xfrm_input_open_circuit(). This includes a new VTY option for osmux.
2015-04-24mgcp: Allow to disable transcoding for trunksHolger Hans Peter Freyther1-0/+47
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.
2015-01-21mgcp: Honor the rtp IP_TOS settings for OsmuxHolger Hans Peter Freyther1-1/+1
Honor the IP_TOS settings for Osmux as well. Re-use the RTP setting as it makes sense to classify the audio packets the same way. Fixes: OW#1369
2014-11-19mgcp: Allow to omit sending the audio name at allHolger Hans Peter Freyther1-0/+50
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-09-02mgcp: Move the "codec" params to a structHolger Hans Peter Freyther1-3/+5
We might be offered multiple codecs by the remote and need to switch between them once we receive data. Do this by moving it to a struct so we can separate between proposed and current codec. In SDP we can have multiple codecs but a global ptime. The current code doesn't separate that clearly instead we write it to the main codec.
2014-09-01osmux: osmux batch-factor can't be higher than 8Pablo Neira Ayuso1-1/+1
The osmux header uses a counter of 3 bits, so you can put up to 8 message in it.
2014-09-01osmux: save specific osmux configuration options if osmux is enabledPablo Neira Ayuso1-7/+8
Just like other options do, to avoid polluting the configuration file with unused options if osmux is disabled.
2014-08-30osmux: initialize osmux_batch_size in mgcp configPablo Neira Ayuso1-1/+1
The library allows to indicate zero as batch size if you want to use the default size, however openbsc saves 'osmux batch-size 0' which is not good as input. Use OSMUX_BATCH_DEFAULT_MAX to explicitly initialize the batch size from mgcp_parse_config().
2014-08-29osmux: add 'osmux batch-size NUM' option to mgcp vtyPablo Neira Ayuso1-0/+12
This allows you to specify the osmux batch frame size. If zero, the library uses the default value.
2014-08-29osmux: set default port from mgcp_parse_config()Pablo Neira Ayuso1-0/+1
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