Commit Graph

74 Commits

Author SHA1 Message Date
Stefan Knoblich 284ce5407b FreeTDM: Move external ftmod_* library dependencies to _LIBADD
Making the build -Wl,--as-needed safe.
Tested on Centos 5.x + Gentoo.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-05-10 19:04:10 +02:00
David Yat Sin 4340c4d74c Merged latest FreeTDM code from Sangoma's repo
Merge remote branch 'smgfs/master'

Conflicts:
	build/modules.conf.in
	configure.in
	libs/esl/fs_cli.c
	libs/freetdm/mod_freetdm/mod_freetdm.c
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn.h
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_logger.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_support.c
	src/include/switch_types.h
	src/mod/applications/mod_commands/mod_commands.c
	src/mod/applications/mod_spandsp/mod_spandsp.c
	src/mod/endpoints/mod_opal/mod_opal.cpp
	src/mod/endpoints/mod_opal/mod_opal.h
	src/mod/endpoints/mod_sofia/mod_sofia.h
	src/mod/endpoints/mod_sofia/rtp.c
	src/switch.c
	src/switch_core.c
	src/switch_rtp.c
2012-09-12 11:05:39 -04:00
David Yat Sin 8b0fbe605c Merge branch 'releases.3.5' of ssh://git.sangoma.com/smg_freeswitch into nsg-4.3
Conflicts:
	.gitignore
	conf/insideout/autoload_configs/modules.conf.xml
	conf/vanilla/autoload_configs/modules.conf.xml
	src/mod/endpoints/mod_sofia/mod_sofia.h
	src/switch_rtp.c
2012-07-25 11:15:18 -04:00
Stefan Knoblich 890da63554 ftmod_skel: Add -shared libtool flag.
Do not build static versions of modules.

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
kapil 23ca7f8fed adding m2ua stack config/control code 2012-05-18 12:05:25 +05:30
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
Ken Rice 7a147e4762 Update a ton of copyright statements to make sure the dates are proper 2012-04-25 17:14:55 -05: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 7f17ad7f92 ftmod_misdn: Change last commit to set -D_GNU_SOURCE instead.
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>
2011-10-01 14:05:14 +02:00
Stefan Knoblich 473aab18eb ftmod_misdn: Add -D_BSD_SOURCE to get u_int and friends.
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>
2011-10-01 13:31:16 +02: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 a8abef1013 Changed libsng_isdn and libsng_ss7 include paths 2011-06-16 13:29:58 -04:00
Michael Jerris 15c79424e9 always use our includes first so we use our srcdir headers over installed versions 2011-06-09 18:14:00 -04:00
David Yat Sin bd7672242c Support for AT&T *8 Transfer (VRU only) 2011-06-03 17:18:30 -04:00
Moises Silva 865d04ef2f Merge remote branch 'fsorig/master' 2011-03-05 20:46:30 -05:00
Moises Silva 244e7c7610 Merge remote branch 'origin/davidy.ftdm_variables3' into netborder.tmp 2011-02-25 17:17:29 -05:00
Moises Silva 269906c891 freetdm: Added support for hardware (native) R2 MF generation 2011-02-24 18:41:07 -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 cabd05d116 chlog: freetdm: channel/call variables moved to sigmsg 2011-02-18 13:01:57 -05:00
David Yat Sin 925623c19e freetdm: Removed ftmod_sangoma_boost 2011-02-16 11:07:30 -05:00
Konrad Hammel becb94052a chlog: freetdm: ss7 - added support for RELAY 2011-01-29 19:49:34 -05:00
Moises Silva 163dd05660 freetdm: add ftdm_call_utils.h to the installed headers 2011-01-18 16:10:14 -05:00
Moises Silva 4268bf84b0 freetdm: more core state refactoring, still untested 2010-12-24 15:58:04 -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
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 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
Moises Silva 3551cc639f freetdm: fix doxygen target 2010-09-27 21:22:52 -04:00
Konrad Hammel e3b9db8894 freetdm: implemented Trillium stack message queueing 2010-09-01 15:02:56 -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 7b0d887c93 -> start of move to new library architecture 2010-06-18 18:31:54 -04:00
Konrad Hammel 9428335522 -> adding ftmod_sangoma_ss7 support 2010-06-18 18:31:53 -04:00
Moises Silva 041b8da5a4 freetdm: added scheduling API 2010-05-26 15:48:05 -04:00
Moises Silva 19fb75740d freetdm: added dso sample app 2010-05-12 11:54:50 -04:00
Moises Silva 23aa931d43 freetdm: remove SCTP requirement, now is optional 2010-05-05 13:16:37 -04:00
Moises Silva 6e7f93d9cf freetdm: do not dial until DIALING state handler
add ftdm_declare.h to list of headers
2010-04-30 16:01:24 -04:00
Moises Silva 73a80ba939 start API cleanup by moving private headers and data structures into private/ include directory 2010-04-28 18:17:49 -04:00
Moises Silva 6ddcb9044c added cpu monitor 2010-04-05 17:49:43 -04:00
Michael Jerris 597675ec14 disable isdn mod here for now, it will be replaced soon 2010-04-02 01:24:20 -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
Moises Silva fda2c273d0 merged revisions 855:895 from openzap/trunk
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@897 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-11-23 18:19:35 +00:00
David Yat Sin 77e5eb21bf Added testsangomaboost
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@881 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-11-17 23:13:38 +00:00
Moises Silva c46160b4ff added zap_queue.c
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@859 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-11-13 21:28:09 +00:00
Michael Jerris 087f820187 whoops
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@853 a93c3328-9c30-0410-af19-c9cd2b2d52af
2009-11-11 18:51:03 +00:00