aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-07nat: Fix the documentation issue with the osmux commandHolger Hans Peter Freyther1-1/+1
Documentation error (missing docs): <command id='osmux (on|off)'> <param name='off' doc='(null)' />
2014-05-22mgcp: add voice muxer supportPablo Neira Ayuso1-0/+19
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-20nat: Make the access-list deny cause configurableHolger Hans Peter Freyther1-4/+12
Add two optional arguments to the imsi-deny rule for the reject cause and verify that it is saved out.
2013-10-30vty: Use vty_install_default() instead of bsc_install_default()Jacob Erlbeck1-3/+3
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: Rename 'mgcp-through-msc-ipa' command to 'use-msc-ipa-for-mgcp'Jacob Erlbeck1-5/+5
Currently the 'mgcp' command fails in the 'config-nat' node, because it get confused with 'mgcp-through-msc-ipa' which is executed instead because of the prefix based command selection. Thus the latter command is renamed by this patch to avoid the common prefix. The workaround in the test suite is removed.
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck1-9/+3
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-09-02nat: Use bsc_nat_msc_is_connected instead of accessing it directlyHolger Hans Peter Freyther1-2/+2
2013-08-14nat/ussd: Add 'show ussd-connection' vty commandJacob Erlbeck1-0/+13
This command returns the current state of the connection to the USSD side channel provider. It shows whether a provider has been connected and authorized or not. Fixes: OW#953
2013-08-13nat: Misc changes spotted while going through the file with JacobHolger Hans Peter Freyther1-3/+3
* Spell Configure correctly * Use %s and VTY_NEWLINE instead of \n
2013-07-31nat: Implement a post-routing for the NAT softwareHolger Hans Peter Freyther1-0/+27
* The post-routing is applied after the first re-writing. To do this the new number is copied back into the called data structure. * Add a testcase that goes from 0172 to 0049 and then back to 0049 using the post rule with a table lookup.
2013-07-31nat: Allow to use the prefix lookup to rewrite numbersHolger Hans Peter Freyther1-0/+60
* Increase the rewritten rule to five digits (this is the easiest for the unit test). This will add another 40kb to the runtime size. * Create a unit test that tests adding and removing the prefix rules. * Use the regexp match to replace from one package
2013-07-31nat: Add a no number-rewrite command and call it through a VTY testHolger Hans Peter Freyther1-2/+15
The test is just testing the invocation but does not verify that the side effect of this call. It is good enought for now.
2013-04-16nat: Rename "struct sccp_connections" to "struct nat_sccp_connection"Holger Hans Peter Freyther1-1/+1
The name sccp_connection is used in the osmo-sccp code, sccp_connections was used in the NAT for tracking a sccp_connection. Rename it so it is obvious that the struct belongs to the nat. The rename was done with sed: $ sed -i s,"struct sccp_connections","struct nat_sccp_connection",g \ include/openbsc/*.h src/osmo-bsc_nat/* tests/*/*
2013-04-16nat: We want the remote to respond to our DLCX requestHolger Hans Peter Freyther1-2/+3
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.
2013-04-16nat: Make it possible to send MGCP messages through the IPA multiplexHolger Hans Peter Freyther1-0/+17
Instead of handling MGCP through the UDP socket, read and write messages through the ipa connection to the MSC.
2013-01-07nat: Introduce a global IMSI barr list using red-black treesHolger Hans Peter Freyther1-2/+65
2012-08-17VTY: improve VTY prompt and make sure exit/end works everywhereHarald Welte1-3/+5
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-28nat: Document all parameters of the VTY commandsHolger Hans Peter Freyther1-26/+50
2012-01-18nat: Add VTY command for the TP-DA rewriting.Holger Hans Peter Freyther1-0/+27
2012-01-18nat: Fix the no sms-clear-tp-srr commandHolger Hans Peter Freyther1-1/+1
2012-01-10nat: Implement clearing of TP-SRR flags from TPDUsHolger Hans Peter Freyther1-0/+28
Match IMSI and destination address against a set of entries, if it is matching the header will be modified and no sender report will be requested. Change the test case to request the sender report and then verify that this bit is reset to 0.
2011-08-22misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_regHolger Hans Peter Freyther1-4/+5
Move the regexp parsing code from the NAT to libcommon as it will be used by the NAT and BSC code. This also adds the #include <regex.h> include to gsm_data. This header should be split up.
2011-06-01nat: Add VTY code to configure the SMSC rewritingHolger Hans Peter Freyther1-9/+47
2011-06-01nat: Patch the destination SMS address of a messageHolger Hans Peter Freyther1-2/+2
Use the same filtering infrasturcture to patch the SMSC address in a CP-DATA/RP-DATA message. Add a very simple testcase for this code.
2011-06-01nat: Allow to have a regexp to match the MSISDNHolger Hans Peter Freyther1-7/+7
The idea that MCC and MNC is enough to classify a subscriber turns out to be wrong. Certain operatos license a number range of IMSIs to others. When we see a '^' in the MCC field we treat it as a regexp. The code now turns the MCC/MNC into a regexp for the IMSI. It is not using extended POSIX regexp to match the behavior of the access list.
2011-05-17nat: Use 'paging group' because we have paging forbidden.Holger Hans Peter Freyther1-7/+15
Make paging-group deprecated and introduce the new paging group.
2011-05-07src: rename msg_entr* to osmo_config_*Pablo Neira Ayuso1-1/+1
Summary of changes: s/msg_entry_parse/osmo_config_list_parse/g s/msg_entry/osmo_config_entry/g s/msg_entries/osmo_config_list/g
2011-05-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-5/+5
Summary of changes: s/struct counter/struct osmo_counter/g s/counter_inc/osmo_counter_inc/g s/counter_get/osmo_counter_get/g s/counter_reset/osmo_counter_reset/g s/counter_alloc/osmo_counter_alloc/g s/counter_free/osmo_counter_free
2011-05-02nat: Create a Paging Group that BSCs can refer toHolger Hans Peter Freyther1-12/+127
Introduce a paging group that a BSC can refer to and is used during the LAC lookup. This way paging can be flooded through the network and just filtered at the last element in the core.
2011-04-26bsc: Allow to have a list of MSCs/MUXs to connect toHolger Hans Peter Freyther1-5/+4
Be able to configure a list of destinations (duplicates allowed) that will be tried in a round robin fashion. The change is in the bsc_msc_connection to operate on a list. We achieve the round robin nature with the same trick used in the paging code to delete and append the current entry. The nat code was updated to compile but one can only configure one destination.
2011-04-26nat: Introduce a block on the NAT to slowly get rid of BSCsHolger Hans Peter Freyther1-0/+12
For restarting the NAT we can now block it, it will not accept new connections and for existing connections it will attempt to drop them over time. A blocked NAT will end up with no BSC connections left and then can be safely restarted.
2011-04-18nat: Clarify the documentation of the allow/deny regexpHolger Hans Peter Freyther1-3/+3
2011-04-04nat: Bail out if the regexp fails to compile and avoid a crashHolger Hans Peter Freyther1-4/+8
If the regexp fails to compile the internal dfa is NULL and a regexec will crash nicely. Fail and free the string if the regexp fails to compile.
2011-04-01nat: Make the USSD number matching a regexpHolger Hans Peter Freyther1-4/+4
This allows to match multiple numbers and multiple patterns
2011-04-01nat: Fix the return to return CMD_SUCCESS;Holger Hans Peter Freyther1-1/+1
2011-03-29nat: Add commands to remove access-list from NAT and BSC configHolger Hans Peter Freyther1-0/+30
2011-03-28src: include new file osmocom/vty/misc.h for vty_out_rate_ctr_group()Pablo Neira Ayuso1-0/+1
This uses the new include file for vty_out_rate_ctr_group() which available in libosmocore.
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-3/+3
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-19bsc: change bsc_vty_init to take logging categories as parameterPablo Neira Ayuso1-1/+3
This change is required to finish the integration of the VTY and the per-application logging categories that provides: "vty: integration with logging framework" in libosmocore. It has been tested with osmo-nitb. The other just compiled tested.
2011-03-03Rename bsc_nat -> osmo-bsc_nat and bsc_mgcp -> osmo-bsc_mgcpHarald Welte1-0/+788
This now enforces a unique structure: All of our main daemon programs start with an "osmo-" prefix.