path: root/openbsc/src/osmo-bsc_mgcp
AgeCommit message (Collapse)AuthorFilesLines
2019-08-05Remove undefined param passed to {logging,osmo_stats}_vty_add_cmdsPau Espin Pedrol1-2/+2
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However, definition in C file doesn't contain "(void)", which means number of parameters is undefined and thus compiler doesn't complain. Let's remove parameters from all callers before enforcing "(void)" on it. API osmo_stats_vty_add_cmds never had a param list but has seem problem (no "void"), so some users decided to pass a parameter to it. Change-Id: I7d9d477b983b0d62f01237d90acaa7ce455c3c3d Related: OS#4138
2019-03-20osmo-bsc-mgcp.service: Fix parsing of cmdline option sPau Espin Pedrol1-1/+1
From journald output: /usr/bin/osmo-bsc_mgcp: invalid option -- 's' Change-Id: I995d2f5909640fc007aa39dd6c6b54ff97ee45f7
2018-08-20mgcp: add VTY Option to force-realloc endpointsPhilipp Maier1-0/+2
Currently the force_realloc feature is turnd on and of in a hardcoded way. This patch makes the option available via VTY. Backport from osmo-mgw.git. Change-Id: Ic8740512c5ea0766ff6ceb1c28b9c2b3fe46e75f
2017-02-08vty: remove ignored logging parametersMax1-1/+1
Since ce9fec3e896571835ac5bfd2980d6836f2b29f0d libosmocore ignores parameters to log_vty_command_* functions. Hence parameter of logging_vty_add_cmds() is ignored too. As we depend on much later libosmocore version anyway, we can simplify code somewhat by removing parameters which will be ignored anyway. Change-Id: I62f752fd88f1d8fefa563648f9864c7c31f87991
2016-10-13msgb talloc ctx: initialize in all main() scopesNeels Hofmeyr1-0/+1
Add msgb_talloc_ctx_init() call to many main() functions still lacking a msgb talloc context. Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1
2016-09-27log VTY telnet bind only onceNeels Hofmeyr1-2/+0
After libosmocore 55dc2edc89c1a85187ef8aafc09f7d922383231f which outputs 'telnet at <ip> <port>' from telnet_init_dynif(), there's no need to log the telnet VTY bind here anymore. Change-Id: I97a730b28759df1d549a5049f47a3da1c16a3447
2016-09-15Consistenly format variables in */ filesAlexander Huemer1-11/+32
Change-Id: Ifa21513c007072314097b7bec188579972dc1694
2016-06-18rm dup: use channel type names from libosmocoreNeels Hofmeyr1-1/+1
In gsm_lchant_name(enum gsm_chan_t), use the gsm_chan_t_names value strings from libosmocore instead of redefining the same strings. The list from libosmocore is also more complete, including CCCH and PDTCH. Add a todo comment to move to libosmocore. In consequence, libosmogsm linkage needs to be added to osmo-bsc_mgcp, mgcp_test, mgcp_transcoding_test and smpp_mirror, smpp_test. Change-Id: If65ee7c0619cbc0acb0a15045bd5a969442c93cc
2016-02-25enable telnet VTY bind address config for various programsNeels Hofmeyr1-1/+5
Following the 'line vty'/'bind A.B.C.D' command added in libosmocore, use the configured address to set the telnet bind for the VTY line. It is now possible to publish the VTY on a specific local interface (including aka "any"). Implement in all of: osmo-gbproxy osmo-gtphub osmo-sgsn osmo-bsc osmo-bsc_nat osmo-bsc_mgcp osmo-nitb In some of these main programs, move the telnet initialization below the configuration parsing. Historically, this was not a good idea for programs using bsc_init.c (aka bsc_bootstrap_network()), since they expected a gsm_network struct pointer in ((struct telnet_connection*)vty->priv)->priv, so that telnet had to be either initialized or replaced by a dummy struct. In the meantime, the gsm_network struct is not actually looked up in a priv pointer but in the static bsc_vty.c scope (bsc_gsmnet), so this limitation is mere legacy (even though said legacy is still there in an "#if 0" chunk). In the other binaries I have briefly looked at the init sequence dependencies and found no reason to initialize telnet above the config file parsing. In any case, I have tested every single one of abovementioned binaries to verify that they still parse the example config successfully and launch, allowing VTY connections on the configured address(es). I hope this suffices. In all of the above, log VTY address and port. LOGL_INFO is disabled by default in some of the logging scopes, and since it is a single log message right at program launch, I decided for the slightly more aggressive LOGL_NOTICE.
2015-11-02stats/mgcp: Initialize the statistics for MGCP as wellHolger Hans Peter Freyther1-0/+7
There are currently no reate counters but this will hopefully change in the near future.
2015-09-24vty: Change the return type from enum to intHolger Hans Peter Freyther1-1/+1
clang complained that different enums are mixed with the return type and we actually want this to be an int now.
2015-08-0364bit: Fix compiler warnings in regard to 64bitHolger Hans Peter Freyther1-1/+1
vty_interface_layer3.c:584:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=] sizeof(subscr->extension)-1, VTY_NEWLINE);
2015-07-02configure: Do not link all applications against libgsmHolger Hans Peter Freyther1-1/+2
Use the same trick as done by the dlopen check to not have everyone link against the library.
2015-06-19Fix build wrt. missing CFLAGS constituentsAndreas Rottmann1-1/+2
When libosmo-netif and/or libosmo-abis are installed in distinct prefixes, the build failed with non-found headers.
2015-01-02logging: Only compare the subscr addressHolger Hans Peter Freyther1-3/+0
Move the "logging filter imsi IMSI" into the BTS/NITB code to allow to set the gsm_subscriber and only compare it. This way we simply compare the subscriber address and don't have to care if the subscriber data is still valid.
2014-08-24Use port number #defines for VTY and CTRL portsHarald Welte1-2/+2
.. as defined in libosmocore
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-06-05mgcp: Move transcoding to libmgcpJacob Erlbeck5-781/+3
This patch moves the files relevant to transcoding from src/osmo-bsc_mgcp to src/libmgcp and src/include/openbsc. Makefiles and include directives are being updated accordingly. Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add packet size (ptime) conversionJacob Erlbeck1-72/+157
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 CLI tool to test audio conversionJacob Erlbeck2-0/+15
This tool uses mgcp_transcode.c to convert audio data from stdin to stdout. Sponsored-by: On-Waves ehf
2014-06-05mgcp: Add RTP audio transcodingJacob Erlbeck5-2/+691
This patch implements audio transcoding between the formats GSM, PCMA, L16, and optionally G.729. The feature needs to be enabled by using the autoconf option '--enable-mgcp-transcoding'. In this case mgcp_transcode.c will be compiled and linked to osmo-bsc_mgcp, and the transcoding functions provided will be registered as processing callbacks. If G.729 support is required, libcg729 needs to be installed and '--with-g729' must be passed to ./configure. Ticket: OW#1111 Sponsored-by: On-Waves ehf
2014-05-22mgcp: add voice muxer supportPablo Neira Ayuso1-1/+2
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-10/+0
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-08-27libmgcp: add enum mgcp_rolePablo Neira Ayuso1-1/+1
This enum indicates if the mgcp is running on the BSC or the BSC-NAT. Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2012-11-12mgcp: Calculate the jitter with the formula/code from the appendixHolger Hans Peter Freyther1-1/+1
Use a usec timestamp for the local time. The seconds to usec will swap over to the lower bits but this appears to be correct. The CLOCK_MONOTONIC is used to fulfill the RFC 3550 requirement even if it is a bit slower than the gettimeofday. Make sure to initialize transit in a way that the first transit time will be 0. Otherwise the jitter will contain the difference of the localtime and the remote time.
2012-09-20mgcp: Add the disable color option to the mgcp binaryHolger Hans Peter Freyther1-0/+5
2012-03-16misc: Use other size modifiers to fix compiler warningsHolger Hans Peter Freyther1-2/+2
control_if.c:521:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat] osmo_bsc_bssap.c:473:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat] mgcp_main.c:162:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformatt]
2012-03-16mgcp: make sure all command line options are documentedHarald Welte1-0/+2
Signed-off-by: Holger Hans Peter Freyther <>
2012-03-16mgcp: consistently name bsc_mgcp osmo-bsc_mgcpHarald Welte1-3/+3
Signed-off-by: Holger Hans Peter Freyther <>
2012-01-27bsc_mgcp: optionally connect the MGCP socket to the MGWHarald Welte1-0/+11
This allows the use of the existing "call-agent ip A.B.C.D" command in libmgcp in order to set a default destination address of the call agent. This is required as a pre-condition for certain call agents (like the zynetix MSC) that require a RSIP from the BSC to the MSC as the initial MGCP message.
2012-01-15abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflagsHolger Hans Peter Freyther1-2/+2
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the LIBOSMOABIS_CFLAGS to, remove AM_LDFLAGS at the same time as we only build .a archives.
2011-10-16misc: Linking fixes for Ubuntu 11.10 CompilerHolger Hans Peter Freyther1-2/+2
Ubuntu 11.10 has changed some linker/compiler flags. Some fixes for this can be seen here[1]. In general the to be linked libs need to be moved into the LDADD section of parameters. This is with the old BFD linker (not gold). This is likely to end in some ping-pong with other versions of the linker. [1] Errors: /usr/bin/ld.bfd.real: bsc_hack.o: undefined reference to symbol 'osmo_init_ignore_signals' /usr/bin/ld.bfd.real: note: 'osmo_init_ignore_signals' is defined in DSO /home/ich/install/openbsc/lib/ so try adding it to the linker command line /home/ich/install/openbsc/lib/ could not read symbols: Invalid operation ... ../../src/libbsc/libbsc.a(rest_octets.o):/home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:381: more undefined references to `bitvec_set_bit' follow ../../src/libbsc/libbsc.a(rest_octets.o): In function `rest_octets_si13': /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:382: undefined reference to `bitvec_set_uint' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:383: undefined reference to `bitvec_set_uint' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:385: undefined reference to `bitvec_set_bit' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:402: undefined reference to `bitvec_set_bit' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:403: undefined reference to `bitvec_set_uint'
2011-09-06fix fprintf format specifiers in osmo-bsc_mgcpAlexander Huemer1-2/+2
2011-07-19mgcp: Implement RSIP based on a trunk levelHolger Hans Peter Freyther1-6/+10
Implement the RSIP spec extension to work on the specified trunk instead of hardcoding it to the virtual trunk.
2011-07-18misc: Remove the osmocom/core/process.h includeHolger Hans Peter Freyther1-1/+0
The osmo_daemonize moved from process.h to application.h (that is already included), remove the process.h include.
2011-05-12misc: Use the osmo_init code for signals and loggingHolger Hans Peter Freyther1-9/+9
Use the libosmocore code to ignore certain signals by default (e.g. SIGHUP, SIGPIPE) and use the new code to create a default stderr logging target and initialize it properly.
2011-05-06src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-3/+3
Summary of changes: s/struct bsc_fd/struct osmo_fd/g s/bsc_register_fd/osmo_fd_register/g s/bsc_unregister_fd/osmo_fd_unregister/g s/bsc_select_main/osmo_select_main/g
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso2-6/+6
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 <>
2011-03-19bsc: change bsc_vty_init to take logging categories as parameterPablo Neira Ayuso1-1/+1
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-04prefix sub-directories containing libraries with 'lib'Harald Welte1-2/+3
... and make sure tests work again after restructuring
2011-03-03bsc_mgcp: use top_builddir instead of top_srcdirHarald Welte1-1/+1
2011-03-03Rename bsc_nat -> osmo-bsc_nat and bsc_mgcp -> osmo-bsc_mgcpHarald Welte2-0/+292
This now enforces a unique structure: All of our main daemon programs start with an "osmo-" prefix.