For consistency reasons with osmo_rtp_socket_set_dscp(), let's also
introduce a osmo_rtp_socket_set_priority() function to wrap the two
calls to osmo_sock_set_priority().
Change-Id: I52c08f4b2a46981d002ef0c21e6549445d845a6e
This adds new members to struct ipa_server_link and ipa_client_conn,
which can be set by the user before ipa_client_conn_open() or
ipa_server_link_open() to ensure DSCP / priority values are applied
from the first outgoing packet onwards.
Change-Id: I5ab22d35d9b11eca47d9ea12208e5589a1a5713c
Depends: libosmocore.git If22988735fe05e51226c6b091a5348dcf1208cdf
In order to allow configuration of pcap files per e1_line
the vty command is now (for example line 0):
e1_line 0 pcap /tmp/e1cap.pcap
in place of:
pcap /tmp/e1cap.pcap
Also ensures that a configured pcap appears in 'show running-config'
and is written to the config file on issuing 'write'
This commit deprecates e1_set_pcap_fd()
Change-Id: I316c3d6a839e84c2f52a148c6b8dd6f5933cf4bf
Unlike the legacy TRAU mode, this only adds I460 mux/demux,
without any TRAU frame synchronization. The user must still be
adding the actual sub-channels using osmo_i460_subchan_add()
depending on his requirements.
Change-Id: I44da6dfec77ef475adb35001a0e4fa11d549aa02
When a trau sync fsm is allocated, the user must set the sync pattern,
which can not be changed during the whole fsm lifecycle. However on
codec changes it might be necessary to change the sync pattern on the
fly.
- Add function to change the sync pattern
Change-Id: I1caff93b4c8eace8ba8cd6e32e996a9e1503232b
Related: OS#2659
This adds code that converts codec frames between (decoded) TRAU format
and RTP payload format. The FR + EFR functions have been lifted from
OsmoNITB and exended slightly.
The HR functions have been written from scratch. There is also
incomplete code for AMR that needs to be completed + tested.
Change-Id: I7f6993cce2b95318203043e2e14952e581941b79
This code is able to detect and sync against a variety of TRAU
frame sync patterns. Focus is so far on those patterns present on
16k sub-slots, but 8k sub-slots are expected to be supported soon,
too.
A new codebase for this is required as the old OsmoNITB code had
conflated a 16k sub-slot multiplexer with TRAU frame synchronization,
so there was no way to separate those two parts and hence no way to
support 8k sub-slots.
Change-Id: Ia6fe6228b0b8b9a27999f37ce1115ed5558881ea
In the uplink direction, we provide osmo_trau_frame_dl_ta_us()
to determine the time alignment as requested by the CCU in the BTS.
In the downlink direction, the TRAU frame encoder will perform
time alignment as requested by the user in osmo_trau_frame.dl_ta_usec.
Change-Id: I3981becafc56c9a50119b9ba6bf67aa0391cc76e
The old TRAU frame code in src/trau_frame.c (which is for some strange
reason part of libosmo-abis, and not libosmo-trau!) was introduced more
than a decade ago for the needs of bs11_abis AKA OpenBSC aka OsmoNITB.
It is too constrained to implement TRAU frame parsing in a generic way,
including:
* no way to add support for 8k sub-slots
* no way to handle CRC bits or UFI (i.e. no AMR)
* no real API design, it was just ripped out from OsmoNITB and moved into
a library (even the wrong one)
For those reasons, let's introduce a new API for TRAU frame
encoding/decoding - one that supports all the relevant use cases.
Change-Id: I5cf42e6c445d9224be18503cebc7584b3beba08c
This slipped through the cracks as jenkins so far doesn't build with
--enable-e1d support (fixed in a separate patch).
Change-Id: I505331a4a9430001b049e9f5cc36abf4ce4ca19e
Drop the function e1inp_close_socket since it's only used by the caller
at hand, and it's only exported through "internal.h", so no app is using
it. Remove it because there's only a caller, and furthermore because
keeping it (and putting bfd->data==line) would introduce a layer
violation because the bfd->data==line is only used for ipaccess so far.
Triggering path:
handle_ts1_read ret=0 "Sign link vanished"
ipaccess_drop
line->ops->sign_link_down
(osmo-bsc) ipaccess_drop_oml
e1inp_sign_link_destroy
link->ts->line->driver->close
ipaccess_close
Related: OS#4624
Change-Id: If23cc722106a9f70c998e591369a4acafa52c519
osmo_use_count is available since libosmocore 1.1.0 release, so bump
required libosmocore version in autotools and packages.
struct e1inp_line field refcnt is kept in order to keep ABI
compatibility accessing struct fields. The new use_count is added at the
end. Size of struct changing is fine since it is allocated through
an API and a pointer should be used by clients.
e1inp_line_clone API is changed but it's not used by anyone outside
libosmo-abis, so it's fine.
Related: OS#4624
Change-Id: I0658b2e9c452598025cc0f1d0b060076171767cc
Historically, OpenBSC has primarily been used with setups that have
a single E1 based BTS connected. This meant that an error message on
the E1 LAPD implicitly has to be related to that single BTS.
However, in more comprehensive setups, there may be many BTSs on many
E1 lines with many signaling slots. At this point, it's important to
know which line/timeslot/tei/sapi a given log message relates to.
This patch introduces related log context.
Change-Id: Ib81a749ae24013b17caaf5fd64ccd9acbbc3ce08
Requires: libosmocore.git Change-Id Ie6742843fff809edffcac24c4dce4edf66bc71be
Related: OS#1938
the subchan_demux code predates ubit_t; let's use it to clarify
certain pointers refer to arrays of unpacked bits.
Change-Id: I944f05473954920d57e12d5514cf928fc78f2ea4
osmo-e1d is part of the Osmocom 'software defined E1 interface,
which consists of a USB device for the actual E1 hardware interfacing,
and a daemon (osmo-e1d) implementing a libusb-based driver.
This commit adds initial support for talking to osmo-e1d using
the related libosmoe1d library. You need to use '--enable-e1d'
at configure time to enable it.
Change-Id: Ia0431c124e3b5b4108aee7b109d8c4bb0d8b45d4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
The new and improved fsm supports multipe use cases:
1) plain old ipa server/client operation
2) ipa client/server operation with custom send callback (i.e. to bypass
the tx queue)
3) all of the above + custom timeout callback
4) fully generic operation that will pass opaque data to the callbacks
The current code will always kill the fsm and deallocate it upon
timeout, so the timeout callback will now return a value: 1 means the
fsm will be automatically terminated, 0 means no action, which allows
manually stopping/starting the fsm to reuse it.
Change-Id: Ie453fdee8bfd7fc1a3f1ed67ef0331f0abb1d59b
The IPA keep-alive FSM code takes care of periodically transmitting
and IPA CCM PING and expecting an IPA CCM PONG in return.
Change-Id: I2763da49a74de85046ac07d53592c89973314ca6
The bound RTP socket will wait for incoming RTP packets and as soon as it
sees one, will 'connect' to it, so all replies will go to that sources and
incoming messages from other sources will be discarded. This obviously only
works once.
Change-Id: I5b54ca4296901fcf37794faf29e0b2acca27bd1b
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Similar to what we do in other osmo_fd cb, check for read_cb returning
-EBADF and in that case don't attempt using the osmo_fd anymore, either
because the fd was already closed (no need to then signal WRITE) or
because osmo_fd struct itself has been freed.
Change-Id: I4b968b72285f23a9552519cea67398a43d5003d2
Similar to what we do in other osmo_fd cb, check for read_cb returning
-EBADF and in that case don't attempt using the osmo_fd anymore, either
because the fd was already closed (no need to then signal WRITE) or
because osmo_fd struct itself has been freed.
Change-Id: I0e449a2bdf7f0411feeccd262cd731ca6fba3fc1
This allows the users of libosmotrau to set the content of the SDES
items to something more useful than their compile-time defaults.
Change-Id: Ice794f9e0c6caeea1c67520c12efbfa375d1fb82
Related: OS#2701
This API will be used by osmo-bts to maintain the sampling clock of the
RTP socket whenever a frame should be sent but it is not available, for
instance due to low quality of signal.
Change-Id: Id6099372b6231c0a4b6ea0716f46f5daee7049e1
Mark two value string arrays as extern, so symbols aren't created for
each source file that includes the headers.
Tweaked-by: nhofmeyr (commit log)
Signed-off-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
Change-Id: Iebf4b3922a48ca2cc20d478aba06224dd89d38cb
Ericsson's RBS2111-BTS (and similar) implements a lapdm dialect which uses
a link establishment method that differs from the standard. While the BSC
is transmitting sabm frames on one specific timeslot, the BTS will
periodically scan through all timeslots to check for incoming sabm frames.
When the BTS detcts the sabm fames on one of the timeslots it will stay
there and continue to commence the link establishment.
The described procedure requires a slightly modified lapd profile, the t200
retransmission timeout has to be configured to exactly 300 msek. Otherwise
the link establishment will fail. Since the BTS will switch from timeslot
to timeslot most of the sabm frames will not be seen by the BTS, so the
maximum retransmission has to be increased. This patch suggests a maximum
retry count of 300, which is an educated guess and has worked fine during
our tests.
Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5
While debugging low-level RTP issues it is handy to be able to match
exact RTP packet with the payload available to higher-level
functions. Having Sequence number and Timestamp RTP fields as parameter
to receiving callback is the easiest way to do so.
Change-Id: I0c9b08d247d7342d6139badca77ce64fda0cf274
This is useful for protocols that use HDLC framing for signalling on E1
timeslots, but which don't use LAPD inside (our E1INP_TS_TYPE_SIGN).
Examples are particularly a MTP2/MTP3 SS7 stack, like it is used on the
A interfaces or on the core network interfaces of classic
circuit-switched networks.
Change-Id: I2d75801df4d7cbb8dad325f4d6689841f0196fa6
In the past, the A-bis E1 input system only unederstood LAPD signalling
time-slots and trau-slots with 16kBps sub-slots. This adds the notion
of a 'raw' transparent 64kBps slot, without any furthe de-multiplexing
nor any HLDC inside.
Change-Id: I0c25c2688eddd0c55c15b280a8c6e8a49629516b
It is quite useful for the signal receiver to know on which of the many
E1/T1 timeslots a given event (like a 'link down' event) has happened.
The line number, TEI and SAPI are isnuficcient in case there are
multiple signalling TS in the line.
Change-Id: I07f0f79e0cda09766f357032ffb4e7ad643d448a
Previously RTP receive callback ignored Marker bit from RTP
headers. Extend API to include it explicitly.
Change-Id: I3c2b6365d8a51bf98805614e07344d2639875fde
Related: OS#1750
This way the caller can hand in an already-open file descriptor, rather
than calling osmo_pcap_lapd_open() with a file path name.
Change-Id: Ic7193907a96b0e2284cb6a8a942d2bf0fb95d7e4
Wrap macro parameter in brackets to make sure macros always work
properly: without it GSM_FN_TO_MS(a - b) will result in a - b *
GSM_TDMA_FRAME_MS contrary to the user's expectation of (a - b) *
GSM_TDMA_FRAME_MS.
Change-Id: I38937469eb7948e2b8e6c1d7fba2c2adeba45b41
Reviewed-on: https://gerrit.osmocom.org/217
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge@gnumonks.org>
Add defines necessary to correctly convert number of TDMA frames into
number of voice samples. Defines are proposed by Harald in comments on
gerrit.
Change-Id: I1d8345352fb2ac76f71e88cb40f089fe3f9aae7e
Related: OS#1562
Reviewed-on: https://gerrit.osmocom.org/200
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge@gnumonks.org>