Commit Graph

5437 Commits

Author SHA1 Message Date
Travis Cross
e0db2c0e10 fs_cli: refactor out read_config() 2011-09-23 01:25:41 +00:00
Travis Cross
41937b04c6 fs_cli: refactor out stdout_writeable() 2011-09-23 01:25:41 +00:00
Travis Cross
a511dcee94 fs_cli: make some stylistic improvements 2011-09-23 01:25:41 +00:00
Travis Cross
a78ec2588a fs_cli: cleanup whitespace and reindent 2011-09-23 01:25:41 +00:00
Anthony Minessale
7333d46d5b add new chatplan concept and mod_sms. Apps for chat messages: copy new base freeswitch.xml and chatplan dir if you are upgrading on existing config base 2011-09-21 14:31:18 -05:00
David Yat Sin
8df1872fbe freetdm:Support for transmission of Caller ID Name on NI-2 2011-09-19 13:51:41 -04:00
Anthony Minessale
2ad4f00c9f add missing break on begin detect 2011-09-19 08:08:55 -05:00
Stefan Knoblich
975ac0ac70 FreeTDM: Fix private/libteletone*.h includes
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>
2011-09-19 15:55:07 +02:00
Anthony Minessale
379c9fc41d fix messup in dtmf change 2011-09-16 17:23:15 -05:00
Anthony Minessale
f7b40140bb fix messup in dtmf change 2011-09-16 17:07:48 -05:00
Anthony Minessale
995d7dcb02 dont clear token on SIGEVENT_STOP for ISDN legs, save it for the hangup handler 2011-09-16 16:44:15 -05:00
Anthony Minessale
42ff14d22a use index in this loop instead of the max val for the iteration 2011-09-16 15:53:49 -05:00
Anthony Minessale
8a3c292534 fix seg in recent change 2011-09-16 14:52:14 -05:00
Anthony Minessale
dbd5d2575e fix build on freetdm 2011-09-16 14:50:46 -05:00
Anthony Minessale
7bc6e8f183 better version of last patch 2011-09-16 13:27:38 -05:00
Anthony Minessale
81575eadb5 hack so openzap only finds its own teletone includes 2011-09-16 12:31:49 -05:00
Anthony Minessale
44822df63d we need to fix this build system it masks errors 2011-09-16 12:13:25 -05:00
Anthony Minessale
a65794fb5e FS-3570 receive side, update libteletone to track duration so it is less likely to double detect and push api changes down to freetdm 2011-09-16 10:06:04 -05:00
Moises Silva
25417d3ea8 freetdm: Verify that the uuid that is being hung up is still attached to the FreeTDM device
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.
2011-09-15 19:42:39 -04:00
Moises Silva
aa0a6c9222 freetdm: print span/chan identifiers on hangup 2011-09-15 13:50:42 -04:00
Moises Silva
b06f58a14b freetdm: do not warn on io status changes, leave as debug messages 2011-09-14 10:46:32 -04:00
Moises Silva
4ed900eb92 freetdm: add debug stacktrace to track spurious channel_on_hangup call 2011-09-12 18:13:10 -04:00
Moises Silva
23aba09f1b freetdm: mod_freetdm - fix len data type for 64bit systems 2011-09-12 15:48:28 -04:00
Moises Silva
4cdf9f2491 freetdm: ftmod_wanpipe - Added misc IO debugging code (define WP_DEBUG_IO to use) 2011-09-12 15:23:21 -04:00
Moises Silva
6c5132a507 freetdm: - Clear the IO flag when FreeSWITCH hangs up before notifying freetdm
- 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
2011-09-12 15:21:23 -04:00
Stefan Knoblich
f4facb0f65 [FreeTDM] Add missing newline in "Failed to configure span" error message in ftdm_configure_span_channels().
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2011-09-12 13:07:50 +02:00
Moises Silva
fb69d37592 freetdm: fix small bug reported in freeswitch-dev where the call_id member of sigmsg
is not being set for SIGEVENT_START event
2011-09-08 12:51:48 -04: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
Jeff Lenk
482b319512 FS-3544 --resolve 2011-09-06 21:27:13 -05:00
Anthony Minessale
1c775c3bf0 finish up last commit 2011-09-06 15:07:51 -05:00
Anthony Minessale
391da66cac reswig 2011-09-06 16:30:04 -05:00
Anthony Minessale
2ae688a33b add sendmsg function to esl 2011-09-06 14:53:38 -05:00
Daniel Swarbrick
0db88b5999 Tweak link order of some libs to fix build on gcc platforms that have ld flag "--as-needed" as default. Fixes FS-2873 and FS-2874 2011-09-01 16:42:00 +02:00
Michal Bielicki - cypromis
04b1720f80 x != dw 2011-09-01 16:36:27 +02:00
Brian West
a5ae0e32d6 swigall 2011-09-01 03:22:30 -05:00
Stefan Knoblich
e1a6fd27e0 ftmod_libpri: Always try to close the d-channel to avoid a possible deadlock in case something fails in the I/O module's channel open function.
Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
2011-09-01 01:48:03 +02:00
Stefan Knoblich
41b956fd24 FreeTDM: Don't ftdm_safe_free() span information in ftdm_span_destroy() if span provides a custom span_destroy callback.
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>
2011-09-01 01:48:03 +02:00
Michal Bielicki - cypromis
b9d5dff3d8 no gccisms in Makefile.am please ... 2011-09-01 00:18:44 +02:00
Michal Bielicki - cypromis
80dcff6399 Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch 2011-08-31 21:05:47 +02:00
Michal Bielicki - cypromis
3dca6066f8 getting rid of some gcc crap 2011-08-31 21:05:37 +02:00
Michael Jerris
77284b5d21 use system default dtmf duration instead of hardcoded value 2011-08-31 14:45:16 -04:00
Michal Bielicki - cypromis
8f83473581 fix of ldns for solaris and probably other platforms that actualy have b64_pton, thanks to math for the help 2011-08-31 20:33:55 +02:00
Michal Bielicki - cypromis
55f911d434 leftovers... 2011-08-31 17:51:15 +02:00
Michal Bielicki - cypromis
ba0fe5b424 get rid of libldns strange old libtool and configure crap leftovers ... 2011-08-31 17:10:21 +02:00
Michal Bielicki - cypromis
037f1f5a9b did not clean out installed libtool to the end 2011-08-31 15:40:17 +02:00
Moises Silva
485cb2f52c freetdm: added documentation regarding ftdm open known issues 2011-08-27 00:19:09 -04:00
Jeff Lenk
db88cd3a28 SILK windows vs2010 fix typos 2011-08-25 13:27:11 -05:00
Jeff Lenk
987db7f79c re-add SILK support back for windows - part 1 - blind added 2010 support check later 2011-08-25 13:10:57 -05:00
Brian West
c155873e53 Silk part two... doh 2011-08-25 17:30:25 -05:00
Brian West
fdf74f449f FS-3486 --resolve update silk 2011-08-25 17:25:07 -05:00