This fixes a "AX_COMPILER_VENDOR: command not found" error on
systems with older autotools versions (CentOS 5.x in this case).
Not a problem on newer auto* toolchains, they either ignore
acinclude.m4 completely or handle it in a different way.
(In fact, acinclude.m4 is not even needed for the one on CentOS 5,
but we'll keep it for now.)
Tested-on: CentOS 5.7 x86_64 autoconf 2.59 / automake 1.9.6 / libtool 1.5.22
Tested-on: Gentoo 20111031 x86_64 autoconf 2.68 / automake 1.11 / libtool 2.4
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>
libteletone headers include each other, use #include ""
to look in the local dir rather than the include search path.
Unbreaking all of my (still) external FreeTDM projects.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This avoids hanging up a device that is no longer attached to the session, in the
weird situation where the FreeSWITCH core takes an awful lot of time (more than 3 seconds)
to come around to acknowledge the SIGEVENT_STOP signal.
- Misc fixes to log messages to aid debugging
- Added ftdm ioread command to read media from the channel
- Modified the ftdm_channel_open() API to return FTDM_EBUSY if the channel is already open
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>
Doing so will cause a NULL-deref segfault while removing the current span from the
global hash (cur_span->name == NULL) in ftdm_global_destroy().
Remove all the ftdm_safe_free() calls in the custom callback part of ftdm_span_destroy() and
let ftdm_global_destroy() handle that.
NOTE: Also adds a missing ftdm_safe_free(cur_span->dtmf_hangup) to ftdm_global_destroy().
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
NOTE: There is bugs in libpri, even latest 1.4.12 as of this writing if you use NI2. So rightnow it only work in DMS100/ATT mode. Email me to get the NI2 patch (really stupid error).
NOTE2: The way libpri is build doesn't allow to do advance feature with the SERVICE feature, so if you put an channel out of service, and the far end send an restart, it will be bring back in service. Lot of changes in libpri is required to allow this. I need to figure out what would be the best steps to take since I don't have commit access to libpri release.
NOTE3: You need to enable this feature by setting service_message_support to true on the span
addressed issue with multiple GRS at the same time in a single span
revisions merged: afcc831d6fa1fccaf7ef091b8c48b905a76d834d 9c815c9ecd7102e7d30c3988cd41682b8cbade0b
ftdm_copy_string() length parameter needs to include the terminating NUL byte.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
Tested-by: Stefan Knoblich <stkn@openisdn.net>
Libpri doesn't do that for us, so handle things on our end.
Other parts of the previous patch seem to work fine.
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
Adds a new "overlapdial" configuration parameter that enables
incoming overlap dialing when set to "incoming", "yes" or "both" (possible values:
"no", "yes"/"both", "incoming"/"receive", "outgoing"/"send").
(Overlap dialing is disabled by default)
NOTE: only the non-overlap receive case has been tested (= doesn't break existing setups)
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>