Revert the build change to freetdm since it broke the build of that
modules on CentOS. Once a working change is finished, then it'll be
committed against FS-7122.
FS-7142 #resolve
Latest automake will detect then warn if the Makefile uses source
files that are in subdirectories, but the subdirs option is not
set. In the FreeSWITCH build system the current expected behavior is
to expect the subdirs option to be enabled.
FS-7122 #resolve
Portability fix for uClibc and other (linux) environments that lack execinfo.h.
ftdm_backtrace_walk() and related return FTDM_NOTIMPL and print a message
if backtraces are not available in the current environment.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This fixes all build errors.
(Stand-alone build of FreeTDM worked fine, for some
i-don't-really-want-to-know strange reason).
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Needed for the mISDN/mISDNif.h header structs, linux/types.h only
provides them for kernel code:
In file included from src/ftmod/ftmod_misdn/ftmod_misdn.c:51:
/usr/include/mISDN/mISDNif.h:296: error: expected specifier-qualifier-list before 'u_int'
/usr/include/mISDN/mISDNif.h:306: error: expected specifier-qualifier-list before 'u_int'
/usr/include/mISDN/mISDNif.h:339: error: expected ')' before 'nr'
...
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Add I/O plugin for mISDN stack that is included in the linux kernel
since version 2.6.27.
The in-kernel mISDN stack uses a socket based interface (AF_ISDN),
data and control commands are exchanged via datagram messages.
This makes writing a driver that doesn't use a separate (per-span)
thread to handle all incoming events a bit tricky, because responses
to control messages and incoming data are mixed and interfacing
with the synchronous FreeTDM I/O API is problematic.
B(*)/D-channel handling:
The current version uses misdn_wait() to poll() for activity on
the non-blocking channel sockets and misdn_read() to receive and
handle all pending events up to the first PH_DATA_IND (data) message
(which is what the caller of the read method is actually after).
In case no data has been received, misdn_read() returns FTDM_SUCCESS
with *datalen = 0, which is OK for all the signalling modules tested
(ftmod_libpri and (out-of-tree) ftmod_isdn).
To send data, misdn_write() is called, which just sends a PH_DATA_REQ
message to the mISDN channel socket.
(*) B-channels use a per-channel timerfd as a timing reference for
'ready-for-write' poll()ing in misdn_wait().
This is a workaround for a limitation of mISDN sockets, which do not
support POLLOUT waiting on b-channel sockets (in a useful way).
Sending/receiving of data works the same way as on d-channels, otherwise.
The module has received some minimal testing using a beronet
single-port HFC E1 and a HFC4-S quad-port BRI card on linux-3.0.x.
--- Limitations ---
- Only the most basic features have been implemented (alarms,
sending/receiving data/audio).
- Spans are limited to E1 and BRI/BRI_PTMP trunk types.
- D-Channels only work on 16 for PRI and 3 for BRI.
- NT/TE mode information is not available from freetdm.conf /
at configure_span()-time so the module assumes TE mode,
which should be only a problem for cards that can change
the port configuration (pin-out) from software.
- Current design (b-channel timerfd / misdn_wait()/_read()/_write())
should be fine for most SoHo use-cases
(scalability / cpu usage / timing precision).
--- Requirements ---
- mISDNif.h header (/usr/include/mISDN/mISDNif.h), provided by mISDNuser
(http://isdn.eversberg.eu/download/lcr-1.7/mISDNuser-20100525.tar.gz).
- Linux kernel with mISDN and timerfd enabled (>= 2.6.27)
and libc with timerfd support.
mISDN options can be found in the:
"Device Drivers" -> "ISDN support" -> "Modular ISDN driver"
section of make menuconfig. Timerfd is usually enabled by default.
The FreeTDM configure script will check for missing mISDNif.h
header and timerfd support and print a message.
You should see the following in the summary screen on success:
ftmod_misdn........................ yes
NOTE: Forcing mISDN support using the "--with-misdn" configure option,
will cause the configure script to fail on the first missing
dependency.
--- Usage ---
To use the module, make sure you have mISDN support in the kernel
(kernel modules loaded or kernel with built-in mISDN running),
the "misdn_info" application shipped with mISDNuser will output
a list of available mISDN ports on your system, e.g.:
Found 5 ports
Port 0 'hfc-4s.1-1': TE/NT-mode BRI S/T (for phone lines & phones)
2 B-channels: 1-2
B-protocols: RAW HDLC X75slp
...
Port 4 'hfc-e1.2': TE/NT-mode PRI E1 (for phone lines & E1 devices)
30 B-channels: 1-15 17-31
B-protocols: RAW HDLC X75slp
NOTE: ftmod_misdn will print an error message if mISDN support is not available,
or if there are no ports installed.
- Example freetdm.conf settings
[span misdn BRI_1]
trunk_type => BRI_PTMP
b-channel => 0:1,2
d-channel => 0:3
[span misdn PRI_1]
trunk_type => E1
b-channel => hfc-e1.2:1-15,17-31
d-channel => hfc-e1.2:16
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Default behaviour is unchanged.
Packagers should use this option to install freetdm.pc into
the system's main pkg-config directory (e.g. /usr/lib/pkgconfig).
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
Tested-by: Stefan Knoblich <s.knoblich@axsentis.de>
add -Werror even when the compiler is unknown. This is just a work-around to gcc not being detected
as GNU by our current standalone build (not bootstrapped through FreeSWITCH)
- Use tabs instead of spaces for indentation
- Proper m4 quoting of parameters
- Fix broken AC_ARG_* handling:
--without-foo/--disable-foo set withval="no"/enableval="no"
and the third parameter of the AC_ARG_* macros is always
"user provided an --with*-foo/--*able-foo option" _NOT_ "yes",
while the fourth parameter is "user didn't provide this option"
(= the default if neither --with-foo/--enable-foo nor --without-foo/--disable-foo
has been set)
- Drop FTDM_CFLAGS in MY_CFLAGS (what was that used for anyway?)
- Drop MYLIB
- Drop SOLINK (unused)
- Rename MY_CFLAGS to FTDM_CFLAGS
- Rename all AM_CONDITION variables to HAVE_* for (optional) dependencies
and WANT_* for features
- Reorder mod_LTLIBRARIES lines
- Move some things in configure.ac around to group them
- Add -shared to modules LDFLAGS (we don't need "ftmod_foo.a" static modules, do we?)
- Import ax_compiler_vendor.m4, drop the macro definition from configure.ac
- Add AUTOMAKE_OPTS to Makefile.am and define FreeTDM as a foreign (= non-GNU) project
- Add ACLOCAL_FLAGS to Makefile.am and set AC_CONFIG_MACRO_DIR in configure.ac
custom m4 macros are kept in the build subdirectory
- Enable silent rules for automake-1.11 and newer (use make V=1 to get verbose output)
- configure option --with-modinstdir requires a value now and quits with an error message
if called without one (e.g. "./configure --without-modinstdir" or "./configure --with-modinstdir")
- Add configuration summary screen and category headers for modules in configure output
- Requires non-public development version of libisdn(!)
- Based on older patches from http://oss.axsentis.de/gitweb/?p=ftmod_isdn.git;a=summary
- Rework of ftmod_isdn related buildsystem parts (Makefile.am, configure.in and libpcap.m4)