aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libtrau/rtp_proxy.c
AgeCommit message (Collapse)AuthorFilesLines
2015-05-26Drop bad speech frames rather than forwarding them via RTPAndreas Eversberg1-0/+9
Some RTP endpoints may not check for bad frame indications, so a frame that is marked as bad may be still forwarded, which creates anoying noise. This patch drops these frames. It depends on the other RTP endpoint how dropped frames are handled. (insert silence, extrapolate speech...)
2015-05-26Allow dynamic RTP payload types between application and MNCC interfaceAndreas Eversberg1-18/+40
Since EFR/AMR/HR codecs use dynamic RTP payload, the payload type can be set. If it is set, the frame type must be set also, so OpenBSC knows what frame types are received via RTP. This modification only affects traffic beween application and MNCC interface, not the RTP traffic between OpenBSC and BTS. Conflicts: openbsc/src/libtrau/rtp_proxy.c
2015-05-26Add traffic forwarding via RTP to remote applicationAndreas Eversberg1-1/+19
Instead of forwarding traffic through MNCC interface, traffic can be forwarded to a given RTP peer directly. A special MNCC message is used to control the peer's destination. The traffic can still be forwarded through MNCC interface when this special MNCC message is not used. It also works with E1 based BTSs. In conjunction with LCR's "rtp-bridge" feature, the RTP traffic can be directly exchanged with a remote SIP endpoint, so that the traffic is not forwarded by LCR itself. This way the performance of handling traffic only depends on OpenBSC and the remote SIP endpoint. Also the traffic is exchanged with the SIP endpoint without transcoding, to have maximum performance. Increment MNCC version to 5. Conflicts: openbsc/tests/gbproxy/gbproxy_test.c
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 Eversberg1-0/+14
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-07rtp: Share the rtp header between the proxy and the mgcp codeHolger Hans Peter Freyther1-22/+1
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-01-26Use 'defines' for length and duration of RTP payloadAndreas Eversberg1-7/+13
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-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-09-06fix some "implicit declaration" warnings in libtrauAlexander Huemer1-0/+1
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso1-23/+23
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-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-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 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-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-25/+25
This was done with sed on the files.
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-04prefix sub-directories containing libraries with 'lib'Harald Welte1-0/+728
... and make sure tests work again after restructuring