Commit Graph

62 Commits

Author SHA1 Message Date
Stefan Knoblich
39fb4544dd FreeTDM: ftmod_misdn uses clock_gettime() which is in librt, add a check
Fixes -Wl,-z,now / -Wl,-z,defs errors about undefined symbols.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:10 +02:00
Stefan Knoblich
80a2b76620 FreeTDM: Make libpri pri_version() check -Wunused-but-set-variable safe
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:10 +02:00
Stefan Knoblich
88e75bf9d7 ftmod_libpri: Add configure check for pri_maintenance_service()
Said function has been added in libpri-1.4.11 and breaks
building with older libpri versions (i.e. the passive one for ftmod_pritap).

Check for pri_maintenance_service() in configure and disable
the "maintenance" subcommand if it is not available.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-01-08 15:07:29 +01:00
Stefan Knoblich
0e51786a88 FreeTDM: Add ftmod_analog(_em) and ftmod_zt to summary screen (always built).
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-19 20:42:17 +02:00
Stefan Knoblich
61cfafe6c2 FreeTDM: Move custom backtrace code into ftdm_backtrace_walk() and helper functions.
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>
2012-07-11 17:25:58 +02:00
David Yat Sin
f509b708a7 Freetdm: Fix for 64-bit check on Ubuntu 2012-07-06 15:23:37 -04:00
Moises Silva
1f08e2b0ec Merge remote branch 'fsorig/master' 2012-05-07 15:46:08 -04:00
Moises Silva
412c808e0c freetdm: Added GSM module skeleton 2012-05-07 15:10:25 -04:00
Stefan Knoblich
997550c511 ftmod_libpri: Check for required features in configure and remove old-style log callbacks
Non-PRI_NEW_SET_API logging callbacks were only available in libpri-1.0 and older,
which also lacks PRI_IO_FUNCS (required) and wouldn't work anyway.

Explicitly check for both PRI_* feature defines at configure time and reject libpri
versions that lack them.

Remove the non-PRI_NEW_SET_API logging callbacks in ftmod_libpri.c.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-04-14 01:39:25 +02:00
Stefan Knoblich
5f38a7f857 ftmod_misdn: Remove unused timerfd code.
Timer-based b-channel tx gating won't work anyway, so remove all those
"#if 0"-ed bits of cruft.

Also remove the mISDN-specific timerfd_create() check in configure.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-04-12 13:08:57 +02:00
Stefan Knoblich
ec72d8d7fc FreeTDM: Rework libpri detection code to accept a custom installation prefix.
Example: --with-libpri=/usr/local

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-10-26 19:41:07 +02:00
Stefan Knoblich
5a96ebdaa3 FreeTDM: Escape $(srcdir) in configure.ac variable
Silencing a "configure:xxxx: srcdir: command not found" error message.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-10-06 11:08:42 +02:00
Anthony Minessale
dbd5d2575e fix build on freetdm 2011-09-16 14:50:46 -05:00
Stefan Knoblich
09a61f5025 [FreeTDM] Add (experimental) ftmod_misdn
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>
2011-09-08 00:16:02 +02:00
David Yat Sin
ea428669d3 chlog: freetdm - SS7: Support for Transparent IAM 2011-05-17 17:27:05 -04:00
Moises Silva
865d04ef2f Merge remote branch 'fsorig/master' 2011-03-05 20:46:30 -05:00
Stefan Knoblich
c8065499ad [FreeTDM] Add --with-pkgconfigdir option to FreeTDM.
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>
2011-02-19 23:35:41 +01:00
David Yat Sin
d4068d9755 freetdm: Removed ftmod_sangoma_boost 2011-02-16 11:06:26 -05:00
Konrad Hammel
becb94052a chlog: freetdm: ss7 - added support for RELAY 2011-01-29 19:49:34 -05:00
Moises Silva
fe0d8d1ec5 freetdm: - updated all signaling modules (except for ftmod_isdn and ftmod_sangoma_ss7) to adapt to new core state processing
- fixed bug in configure.ac to detect ftmod_pritap compilation
         - ignore FTDM_SIGEVENT_RELEASED and FTDM_SIGEVENT_INDICATION_COMPLETED in mod_freetdm
         - Destroy the state completed interrupt on channel destroy
         - Fix analog polarity reversal bug when using 3-way calling or call-swap
2010-12-31 13:44:20 -05:00
Moises Silva
2b0bba8e94 freetdm: add __USE_BSD to ftdm_os, needed by unistd.h for usleep() and string.h to define strcasecmp()
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)
2010-12-17 20:27:37 -05:00
Moises Silva
3284c76150 freetdm: remove DEBUG_DTMF macros from build 2010-12-06 07:22:16 -05:00
Stefan Knoblich
d4138959b2 freetdm: use m4_ifdef() to check for pkg-config macros and print a warning if they are not available
...instead of failing at runtime

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
2010-11-18 23:14:46 +01:00
David Yat Sin
b36869498f freetdm: Fix for ftmod_wanpipe failing to compile because some structures are not
compatible with std=c99
2010-11-08 16:11:06 -05:00
Stefan Knoblich
b7d9265562 ftmod_libpri: First attempt at getting AOC Facility messages going (and minor cleanups)
Requires libpri-1.4.12_beta1 or newer!
Completely untested, AOC-S/D/E ChargingRequest operations are sent to NT (DTAG BRI PTMP),
but rejected with "Unrecognized Operation".

NOTE: FreeTDM core needs support for this to be useful!
      Only AOC-E events are decoded and sent to the log.

To enable:
    Set (or add) <param name="opts" value="aoc"> in your
    libpri_spans span config.

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
2010-11-08 00:43:09 +01:00
Stefan Knoblich
6ca919be61 ftmod_libpri: BRI Support requires libpri-1.4.12_beta1 or newer, add message to configure check 2010-11-06 18:12:27 +01:00
Stefan Knoblich
3d5ccf055d ftmod_libpri: Initial support for BRI and various cleanups + double locking fix
Fixes:
- Fix double locking in check_state(): remove ftdm_mutex_(un)lock calls.

New:
- Add lpwrap_init_bri() to initialize libpri in BRI mode
- Use trunk type to determine PRI/BRI and PTP/PTMP mode (no additional configuration required).
- Improve libpri detection code in configure.ac, check whether libpri is usable
  and if BRI support is available (needs more work)

Cleanups:
- Whitespace and indentation cleanups
- Rename str2* functions to parse_*
- Simplify libpri_configure_span() option parsing and bail out on error
- Add "ftdm libpri help" command that displays usage information
- Coding style cleanups and other (minor) changes

Known issues:
- BRI PTMP TE Q.921 link does not go beyond TEI ASSIGNED state,
  SABME requests are ignored by NT (EuroISDN DTAG, DAHDI-2.3.0.1, vzaphfc)

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
2010-11-06 16:08:07 +01:00
Stefan Knoblich
cc1e83397b FreeTDM: Buildsystem cleanup
- 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
2010-11-01 02:13:27 +01:00
Stefan Knoblich
3428bd3d43 ftmod_isdn: FreeTDM port, first steps
- 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)
2010-11-01 00:47:43 +01:00
Konrad Hammel
118403c5bf freetdm: ss7 - added support for 64bit to configure.ac 2010-10-19 10:18:27 -04:00
Moises Silva
80363af697 freetdm: merged konrad and david signaling work 2010-08-31 13:29:31 -04:00
Moises Silva
b485f25f5e freetdm: add PRI tapping starting code 2010-07-30 19:46:05 -04:00
Moises Silva
9f9c4541cd freetdm: added dtmf recording feature for debugging 2010-07-29 17:26:03 -04:00
David Yat Sin
c943e641d5 Added sangoma_isdn 2010-06-30 12:42:36 -04:00
Konrad Hammel
9428335522 -> adding ftmod_sangoma_ss7 support 2010-06-18 18:31:53 -04:00
Moises Silva
900f1ed2ef Linux renaming from openzap to freetdm
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@967 a93c3328-9c30-0410-af19-c9cd2b2d52af
2010-01-15 19:22:49 +00:00
Michael Jerris
4b64c098ec only build boost module if you have sctp
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@852 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-11-10 23:28:49 +00:00
Moises Silva
f7cd254439 added initial OpenR2 support
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@808 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-08-19 21:47:56 +00:00
Michael Jerris
97f0558886 build: follow --sysconfdir configure arg (OPENZAP-58)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@744 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-06-09 15:23:51 +00:00
Anthony Minessale
793792d4f8 wanpipe commit we've all been waiting for, HW dtmf, ALARMS, proper bounce of PRIs (testers needed)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@719 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-04-22 21:22:42 +00:00
Stefan Knoblich
060872082b Add openzap.pc pkg-config file
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@706 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-04-08 21:44:33 +00:00
Michael Jerris
1578712f5d add libpri mod configure stuff
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@650 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-02-05 20:44:13 +00:00
Michael Jerris
99020477b5 more automake
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@649 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-02-05 18:21:51 +00:00
Michael Jerris
2e4c38f171 add libpcap detection
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@639 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-02-03 16:41:48 +00:00
Michael Jerris
02e0f005e1 remove redundant defines
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@635 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-02-03 05:01:04 +00:00
Michael Jerris
d8f4cfa40a convert to automake (still not really using automake in a useful way)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@634 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-02-03 04:51:53 +00:00
Michael Jerris
e29ec54993 fix crazy build issue with broken gcc optimizer on bleeding edge ubuntu
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@627 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-01-29 18:56:16 +00:00
Michael Jerris
d5f2bf456d fix strange openzap build issue
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@626 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-01-13 22:45:09 +00:00
Michael Jerris
d09e16f245 don't use shell, that is a gmakeism, instead detect from configure
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@543 a93c3328-9c30-0410-af19-c9cd2b2d52af
2008-09-07 00:08:01 +00:00
Michael Jerris
ba95f425f7 add some libtool usage in openzap build. This will require re-bootstrap and configure
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@534 a93c3328-9c30-0410-af19-c9cd2b2d52af
2008-09-06 05:46:14 +00:00