blob: f3d519fb19033e0775c359bec8de8db91eab9d05 [file] [log] [blame]
Harald Welte1fa60c82009-02-09 18:13:26 +00001/* Simple TRAU frame reflector to route voice calls */
2
3/* (C) 2009 by Harald Welte <laforge@gnumonks.org>
4 * All Rights Reserved
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 */
21
22/* The "TRAU mux map" defines which particular 16kbit sub-slot (in which E1
23 * timeslot on which E1 interface) should be directly muxed to which other
24 * sub-slot. Entries in the mux map are always bi-directional.
25 *
26 * The idea of all this is to directly switch voice channels in the BSC
27 * from one phone to another. We do this right now since we don't support
28 * any external interface for voice channels, and in the future as an
29 * optimization to routing them externally.
30 */
31
32/* map a TRAU mux map entry */
33int trau_mux_map(const struct gsm_e1_subslot *src,
34 const struct gsm_e1_subslot *dst);
Harald Welte26aa6a12009-02-19 15:14:23 +000035int trau_mux_map_lchan(const struct gsm_lchan *src,
36 const struct gsm_lchan *dst);
Harald Welte1fa60c82009-02-09 18:13:26 +000037
38/* unmap a TRAU mux map entry */
39int trau_mux_unmap(const struct gsm_e1_subslot *ss);
40
41/* we get called by subchan_demux */
42int trau_mux_input(struct gsm_e1_subslot *src_e1_ss,
43 const u_int8_t *trau_bits, int num_bits);