aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libtrau
AgeCommit message (Collapse)AuthorFilesLines
2016-06-14Fix SIGABRT on wrong AMR payloadMax1-1/+3
Previously length check have not considered AMR format which requires extra byte for in-band length leading to SIGABRT on incorrect payload from BTS. Change-Id: I800f756fc803accace8c7e0b4a42b3744fe78bb6 Fixes: OS#1731
2016-05-25rtp_proxy.c: Ensure msgb_alloc is large enough for largest AMR frameHarald Welte1-1/+1
In AMR 12.2 (mode 7), the actual RTP payload is 33 bytes. Howeerver, as we store the length of the (dynamically-sized) AMR payload in the first byte, our buffer needs at least 33+1 byte in size. Change-Id: If1ad5d2d68c85733306c75ea62f67fe8fbc143b3 Reviewed-on: https://gerrit.osmocom.org/91 Tested-by: Jenkins Builder Reviewed-by: Harald Welte <laforge@gnumonks.org>
2015-06-19Fix build wrt. missing CFLAGS constituentsAndreas Rottmann1-1/+1
When libosmo-netif and/or libosmo-abis are installed in distinct prefixes, the build failed with non-found headers.
2015-03-28rtp: Fixed problem of mute audio on some callsAndreas Eversberg1-1/+10
When reading from RTP socket, the first read() may fail right after connecting to remote socket. Subsequent read() will work as it should. If the remote socket does not open fast enough, the transmitted RTP payload can cause an ICMP (connection refused) packet reply. This causes the read to fail with errno=111. In all other error cases, the errno is logged at debug level. In all error cases, reading is not disabled. Conflicts: openbsc/src/libtrau/rtp_proxy.c [hfreyther: Fix typo, stop reading in all cases but ECONNREFUSED]
2015-03-28rtp: Fix memory leak fixed by Andreas without mentioning itHolger Hans Peter Freyther1-1/+1
We allocate the msgb at entry of the method and we always need to msgb_free it.
2015-03-28rtp: Add handling of BFI (Bad Frame Indicatior) of received TRAU framesAndreas Eversberg2-1/+18
If a bad TRAU frame is received, it is forwarded to MNCC application as GSM_BAD_FRAME. The application can now handle the GAP of missing audio. (e.g. by extrapolation) If TRAU frames are forwarded via RTP, bad frames are dropped, but frame counter and timestamp of RTP sender state is incremented. Conflicts: openbsc/src/libtrau/rtp_proxy.c [hfreyther: Merge without testcase, fix typo]
2015-03-22rtp: Use osmocom/netif/rtp.h for the rtp structure definitionHolger Hans Peter Freyther1-22/+2
We depend on libosmo-netif unconditionally. Let's use this definition of rtp and have one portability issue less.
2015-01-01rtp_proxy: Remove dead codeHarald Welte1-15/+0
commit 65be6de155407142ddab44faf8aee5f8d5ebf628 removed the RTP timesetamp mangling and thus the only caller to tv_difference(), which can now be removed, too.
2014-12-25rtp: Remove the "correction" of timestampsHolger Hans Peter Freyther1-21/+0
We tend to comment out this code every XXC3, let's just get rid off it. The nanoBTS has a rather odd timing behavior. Jacob has spent hours this summer to trial/document/fix it in the MGCP code and this code is not getting close to working around the ip.access audio issues. If someobody still wants to use the nanoBTS then he should help to have the MGCP MGW use/share code with the rtp_proxy.c
2014-07-24trau: Cast to remove compiler warningHolger Hans Peter Freyther1-1/+1
rtp_proxy.c: In function ‘rtp_decode’: rtp_proxy.c:199:8: warning: assignment from incompatible pointer type frame = msgb_put(new_msg, sizeof(struct gsm_data_frame));
2014-07-22trau_mux.c: Prevent out-of-bounds read in trau_decode_fr()Holger Hans Peter Freyther1-0/+3
Haralds patch in 9f109dfb9926558b6ea504dc3aee92cfd64413bd only fixed the trau_encode_fr part but the issue seems to exist in the decode function as well. Apply the same fix.
2014-07-07rtp: Share the rtp header between the proxy and the mgcp codeHolger Hans Peter Freyther1-22/+1
2014-06-23trau_mux.c: Prevent out-of-bounds read in trau_encode_fr()Harald Welte1-0/+3
found by -fsanitize=address the last iteration of the loop, where i == 259 and o == 260. It is read out-of-bounds but the content is never used.
2014-05-22rtp_proxy: Prevent out-of-bounds read in rtcp_sdes_cname_mangleDaniel Willmann1-1/+1
In rtcp_sdes_cname_mangle when skipping over additional zeroes at the end of a chunk we should not read past the actual message (rtcp_end). Fixes CID #1206579
2014-05-18rtp_proxy.c: Correctly set msg_type to GSM_TCH_FRAME_AMR on AMRHarald Welte1-0/+1
When forwarding AMR from RTP towards the MNCC interface, we need to set the apropriate msg_type. Before this patch it was unitialized, resulting in improper/unknown msg_types of messages on the MNCC interface.
2014-05-18rtp_proxy: Simplify AMR handlingHarald Welte1-30/+26
AMR frames on the MNCC interface are slightly different as they include a single-byte payload_length indicator prior to the actual payload. Commit 3f201ac89952b68d05c0bb6cb41932b9cd898b19 introduced more special-case handling than required, so I'm trying to simplify things again. We now also use msgb_put() more consistently, i.e. always put before actually using the data, and use the return value of msgb_put() rather than first making assumptions about the pointer, writing to it and then calling msgb_put().
2014-05-18Add support for AMR frames to MNCC/RTP interfaceAndreas Eversberg1-6/+47
AMR rate is currently fixed to 5.9k.
2014-03-20mncc: Add support for half rate V1 frames to MNCC/RTP interfaceAndreas Eversberg1-0/+14
2014-03-20mncc: Complete definitions for all speech traffic frames at MNCC interfaceAndreas Eversberg1-1/+1
The new definitions are: half rate and AMR Change of definition name for bad frame, because it applies to all types of traffic, not only TCH/F. Increase MNCC interface version to 4. Version 3 is skipped, because it was used by older version of Linux-Call-Router which is incompatible with the current version of the MNCC interface.
2014-01-27Add function to update TRAU muxer after assignment or handoverAndreas Eversberg1-0/+18
E1 based BTS use TRAU muxer to decode TRAU frames. After changing channel from one timeslot to another (due to handover or assignment), the TRAU muxer must be updated. The call reference of the call is disconnected from the old channel and connected to the new channel.
2014-01-26Use 'defines' for length and duration of RTP payloadAndreas Eversberg1-7/+13
2013-12-19Add EFR support to TRAU muxer + test caseAndreas Eversberg1-58/+249
Decoding and encoding of FR and EFR TRAU frames are put into seperate functions. CRC check is done to detect bad EFR TRAU frames. The test case includes FR and EFR transcoding. EFR support was tested with Nokia InSite BTS and Siemens BS11.
2013-11-21rtp: Fixed size check in padded RTP packetsJacob Erlbeck1-1/+1
This patch fixes a corner case (padding 1, payload size incl padding 0) which is not being detected correctly. Sponsored-by: On-Waves ehf
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-02-07add some more docbook snippetsHarald Welte1-8/+30
2012-10-27Set byte order defines when compiled on OSXTobias Engel1-1/+7
Byte order defines have a DARWIN prefix on OSX so the values openbsc expects are set from their Darwin counterparts when compiled on OSX.
2011-11-06misc: Fix typo...'teh' -> 'the'Holger Hans Peter Freyther1-1/+1
2011-09-06fix some "implicit declaration" warnings in libtrauAlexander Huemer2-0/+2
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso5-639/+46
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
2011-08-19Merge branch 'master' of git.osmocom.org:openbscHarald Welte1-0/+1
2011-08-10trau: fix wrong message size for GSM_TCHF_FRAME passed to MNCCPablo Neira Ayuso1-0/+1
During the GSM deployment in the CCC Camp, Daniel Willmann noticed that the LCR and the MNCC were closing the local connection over unix sockets communication quite so often. After some debugging, Peter Stuge noticed that openBSC was closing the connection since write was returning 0. Then, I suggested that it could be a malformed message with zero length. By skipping empty messages, Peter confirmed that the connection between the LCR and the MNCC was not closing anymore. However, there was no voice in the calls that went over MNCC. After some more debugging I found that we were not building GSM_TCHF_FRAME over MNCC appropriately in the TRAU multiplexer code, since we forgot to msgb_put() the message.
2011-07-29Merge branch 'master' of git.osmocom.org:openbscHarald Welte1-3/+29
2011-07-27TRAU: Properly initialize idle framesDieter Spaar1-3/+29
This is particularly important in case of the Nokia BTS, as they seem to drop the RF/signalling channel if they don't get proper TRAU frames.
2011-07-24TRAU mux: add some comment to the source of the gsm_fr_mapHarald Welte1-1/+3
2011-05-24prepare gsm_data.h header file sharing with osmo-btsHarald Welte1-0/+1
This should not introduce any functional changes, it just re-arranges some definitions in the header file, and introduces the ROLE_BSC define that we enable for the BSC-specific fields.
2011-05-07src: use namespace prefix osmo_* for misc utilsPablo Neira Ayuso1-1/+1
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-06src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-7/+7
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-04-18misc: Remove sys/types.h includes from the filesHolger Hans Peter Freyther2-2/+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-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther4-61/+61
This was done with sed on the files.
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso4-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 <pablo@gnumonks.org>
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte6-0/+1655
... and make sure tests work again after restructuring