196 Commits

Author SHA1 Message Date
Moises Silva
47c1b6d96a freetdm: add validation to ftdm_span_start and ftdm_span_stop 2011-01-04 14:23:25 -05:00
Moises Silva
1334d02ac0 Merge branch 'moy.nonblocking-api'
Conflicts:
	libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c
2011-01-04 12:32:30 -05:00
Moises Silva
4a6b4e86f1 freetdm: add non-locking answer function to handle answer indication
export ftdm_current_time_in_ms to users
	 update testr2 to test non-blocking API (no waiting on indications)
2011-01-04 09:30:49 -05:00
Moises Silva
6f5a0e9ff5 freetdm: typo 2010-12-31 15:06:49 -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
6fb1e5d9c1 freetdm: free the iterator when setting channels to non-block 2010-12-29 14:08:18 -05:00
Moises Silva
090864fa39 freetdm: completed most of the code for the new core state processing
use new core state processing functions in ftmod_r2
2010-12-29 13:38:43 -05:00
Moises Silva
82297de753 freetdm: state refactoring in progress *shrug* 2010-12-23 19:50:13 -05:00
Arnaldo Pereira
836604cfd3 Merge branch 'master' into arnaldo.r2_reset_channel 2010-12-23 21:23:01 -02:00
Arnaldo Pereira
c06a835822 freetdm: fixed log message 2010-12-23 21:10:56 -02:00
Moises Silva
568013bc60 freetdm: initial changes to make FreeTDM APIs non-blocking 2010-12-23 15:39:20 -05:00
Arnaldo Pereira
fa5ec0e553 freetdm: core - changed behavior of ftdm_channel_close(). instead of returning if the channel isn't
opened, not it prints a warning and proceeds to close it.
         ftmod_r2 - added handler for FTDM_CHANNEL_STATE_RESET state
2010-12-23 18:15:37 -02:00
Arnaldo Pereira
3e32e6ad7b Merge branch 'master' into arnaldo.span_event_refactor
Conflicts:

	libs/freetdm/src/ftdm_io.c
2010-12-22 20:08:05 -02:00
Arnaldo Pereira
818887f9d3 Merge branch 'master' into arnaldo.zt_chan_next_event 2010-12-22 19:09:53 -02:00
Arnaldo Pereira
0ab67997f9 freetdm: ftmod_r2 - refactored ftdm_span_next_event(), ftdm_channel_read_event() and created ftdm_event_handle_oob(),
which handle oob events and notify the user by sending the proper SIGEVENT message
2010-12-22 17:35:55 -02:00
Moises Silva
54359f1b78 freetdm: fix call id generation 2010-12-21 19:04:41 -05:00
Moises Silva
cdfa8bf7ae freetdm: Added new OOB event FTDM_OOB_POLARITY_REVERSE
Added new channel command FTDM_COMMAND_SET_POLARITY
         ftmod_wanpipe - Added support to enqueue polarity events on FXO lines
	 ftmod_wanpipe - Added support to set polarity on FXS lines
	 ftmod_analog - Added support to answer and hangup FXO lines on polarity reverse
	 ftmod_analog - Added support to reverse polarity in the FXS line on answer and hangup
	 mod_freetdm - Added parameters answer-on-polarity, hangup-on-polarity and polarity-delay
                       to enable those analog features
2010-12-21 15:11:22 -05:00
Arnaldo Pereira
723a598c24 freetdm: core - lock the channel on ftdm_channel_read_event()
ftmod_zt - not locking the channel on zt_channel_next_event(), minor changes
2010-12-21 16:32:02 -02:00
Moises Silva
092d22a214 freetdm: fix get caller id command 2010-12-20 16:57:01 -05:00
Moises Silva
b5b2f6134d freetdm: multiple fixes for the core and analog
* Replace ftdm_channel_flag_t with defines. We reached the 32bit limit where does not seem reliable
          to keep using enum.
	* Flags member for ftdm_channel_t is now uint64_t
	* Added FTDM_CHANNEL_CALL_STARTED flag to indicate when the API user knows about a call
	* Refactored raw_data member for ftdm_sigmsg_t. If raw_data needs to be freed it must be requested explicitly
          through the autofree member
	* Added collected member to ftdm_sigmsg_t for FTDM_SIGEVENT_COLLECTED data instead of using raw_data
	* Created define FTDM_DIGITS_LIMIT for DNIS/ANI digits limit
	* Fix some stat checks and outdated code in ftmod_analog
	* Refactored ftdm_channel_get_history_str API to return the time offsets and time since last state change
	* Do not send FTDM_SIGEVENT_STOP and FTDM_SIGEVENT_RELEASED on calls that were never reported to the user
2010-12-20 14:06:54 -05:00
Moises Silva
11a7b1f9a0 Merge remote branch 'fsorig/master' 2010-12-20 10:12:48 -05:00
Stefan Knoblich
b84b71defa FreeTDM: Stop using raw_data for FTDM_SIGEVENT_SIGSTATUS_CHANGED events.
The raw_data member is used for passing heap allocated data with an event,
(e.g. strings of dtmf data) the memory is freed after the event has been processed.

Recent changes in the event structure added a way to pass sig status changes inline,
so remove the raw_data usage for FTDM_SIGEVENT_SIGSTATUS_CHANGED events.

NOTE: This (finally) fixes a bug in ftmod_libpri that was caused by
      the event handling changes (stack corruption due to using free()
      on a variable on the stack, which turned into a NULL ptr deref
      caused by some compat code in ftdm_io.c:ftdm_span_send_signal().

Compiles and tested on my BRI setup, i did a quick audit of all
places that generate FTDM_SIGEVENT_SIGSTATUS_CHANGED events and
except for the sangoma_boost module there's nothing else that left
using raw_data for this event.

Signed-off-by: Stefan Knoblich <s.knoblich@axsentis.de>
2010-12-19 21:09:50 +01:00
Moises Silva
87818abedd Merge remote branch 'fsorig/master' 2010-12-17 20:31:15 -05:00
Moises Silva
aa69927b8f freetdm: OPENZAP-124 - Add round robin hunting direction (Patched by Ric) 2010-12-17 20:04:30 -05:00
Moises Silva
d349290f7b freetdm: fix OPENZAP-125 (Add basic calling party category support into ftmod_r2) (Patched by ric) 2010-12-17 19:26:43 -05:00
Arnaldo Pereira
6b52208957 freetdm: core - moved validation of sigstatus from implementation to core, on sigstatus getters/setters
core - locking the channel on ftdm_channel_get_sig_status() and ftdm_channel_set_sig_status(),
                but not on ftdm_span_get_sig_status() nor ftdm_span_set_sig_status()
         ftmod_r2 - locking channels on ftdm_r2_get_span_sig_status() and ftdm_r2_set_span_sig_status()
2010-12-17 18:28:57 -02:00
David Yat Sin
53346e4948 Freetdm: exposed channel availability rate to user 2010-12-15 16:42:47 -05:00
David Yat Sin
dd345b913b freetdm: Support for RAW traces 2010-12-15 16:29:03 -05:00
David Yat Sin
0235f0ba0e Merge branch 'master' into davidy.channel_restart 2010-12-15 12:58:38 -05:00
David Yat Sin
ea2b477444 Freetdm:fix for ftdm_channel_close not always passed double-pointer 2010-12-15 12:56:49 -05:00
Moises Silva
3085523f56 freetdm: define special size formatting that actually works on Linux and Windows 2010-12-15 09:56:27 -05:00
Moises Silva
1c01144c20 freetdm: open all media dumps as binary. Fixes Windows corrupted cores. 2010-12-14 16:55:40 -05:00
David Yat Sin
56515c3a64 Minor change to allow skip states 2010-12-14 16:04:25 -05:00
David Yat Sin
905fdcc248 freetdm: Support for channel restarts 2010-12-14 11:23:47 -05:00
David Yat Sin
ce25c9186f Merge branch 'davidy.caller_id' 2010-12-13 11:51:49 -05:00
David Yat Sin
f87a32c66a removed unnecessary initialization 2010-12-13 11:29:38 -05:00
David Yat Sin
55203ed0d7 Support for call ID 2010-12-10 19:14:08 -05:00
David Yat Sin
fb9a1b05ac Merge branch 'smgfs' 2010-12-10 15:22:14 -05:00
David Yat Sin
86c484c134 freetdm: added support for skip states, used by sangoma_isdn module 2010-12-09 18:01:31 -05:00
David Yat Sin
5ab19aaa23 freetdm: fix compilation 2010-12-09 13:47:40 -05:00
David Yat Sin
3c747978f4 freetdm: support for call variables 2010-12-09 13:20:05 -05:00
Jeff Lenk
87bb33ae3a windows fix x64 build warnings freetdm 2010-12-09 08:44:55 -06:00
Moises Silva
499eafb2e0 freetdm: check for dump enabled before writing to file 2010-12-09 07:19:31 -05:00
Moises Silva
648a124c3f freetdm: improve core flag command 2010-12-08 15:12:10 -05:00
Moises Silva
18299684bf freetdm: added core command to print channels by flag 2010-12-08 14:50:40 -05:00
Moises Silva
315441d219 freetdm: ftmod_r2 - handle race on protocol error 2010-12-08 14:30:47 -05:00
Moises Silva
15d18e7a15 freetdm: ftmod_r2 - Fixed input size for tx and rx dumping
ftmod_r2 - Set tx queue to 4 only
         ftmod_wanpipe - Fixed stats warnings
2010-12-08 10:45:45 -05:00
Moises Silva
71a902d258 freetdm: Added core rx and tx drops
Added sig_write callback
	 ftmod_r2 - Added IO stats flag during call setup
	          - Disable user read and writes during call setup
2010-12-08 09:09:14 -05:00
Arnaldo Pereira
d25cb0282b freetdm: ftmod_r2 - fixed complation warnings on windows 2010-12-07 20:33:23 -02:00
Arnaldo Pereira
1088533626 freetdm: removed dump_mf() debug call from ftmod_r2 and added a comment to ftdm_io 2010-12-07 18:14:03 -02:00