Commit Graph

168 Commits

Author SHA1 Message Date
Moises Silva eb30491688 Merge remote-tracking branch 'moystash/em-suspend-support'
Conflicts:
	libs/freetdm/src/include/private/ftdm_core.h
2014-11-09 03:50:07 -05:00
Moises Silva d65716d83a freetdm: Added dtmf_time_on and dtmf_time_off parameters to tweak DTMF duration in milliseconds 2014-07-27 13:29:58 -04:00
Moises Silva 09198ee357 freetdm: Raise some buffer limits 2014-07-22 23:44:17 -04:00
Moises Silva b8a32ed0f3 freetdm: Fixes for GSM module 2014-05-10 02:57:17 -04:00
Nathan Neulinger 32adc789f6 make noexpandtab explicit in all vim modelines other than xml files 2013-06-25 11:50:17 -05:00
Stefan Knoblich 23c2c751bd FreeTDM: Move I/O interface lookup code into common ftdm_global_get_io_interface()
Auto-loading can be toggled by setting the new autoload parameter
to FTDM_FALSE/FTDM_TRUE.

Update ftdm_span_create() and ftdm_api_execute() to use the new code.

NOTE: Auto-loading of missing I/O interfaces remains enabled in both cases,
      but I guess we should disable it for ftdm_api_execute().

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-02 02:56:44 +02:00
Stefan Knoblich 4bc05eae68 FreeTDM: Add span iterator
Part of my ongoing effort to split ftdm_io.c into more manageable pieces.

This change (along with others in the future) allows decoupling of the
span registry and its users, in preparation of moving all span related
functions and data structures into ftdm_span.c.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-01 15:20:51 +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 fcbfc69466 mod_media_gateway now specifies physical channel when opening TDM terminations 2012-09-11 14:45:57 -04:00
David Yat Sin f49ee5ebf9 FreeTDM: Added function to listen for mg-tdm-dtmfremoval command to disable/enable DTMF removal per channel 2012-09-06 16:53:58 -04:00
Kapil Gupta 917609df1b removing "raw_ftdm_chan_open" API as we have M2UA sig type 2012-08-23 10:59:21 -04:00
Stefan Knoblich 548222f9f3 FreeTDM: Add span start/stop callbacks to ftdm_io_interface.
Callbacks are invoked from ftdm_span_start/_stop().
I/O is started before SIG and shut down in reverse order.

This is needed for ftmod_misdn, to move the mISDN message handling
into a separate thread (solving the mISDN socket vs. FreeTDM API issues).

With these callbacks, the I/O thread can be started after the span I/O configuration
has been (successfully) completed and stopped before destroying the span.

NOTE: Both SIG and I/O callbacks are called with the span mutex locked,
so threads created or destroyed synchronously in either of the custom
start/stop functions, can not use ftdm_span_*() functions that lock
the span mutex (e.g. ftdm_span_get_channel_count()).

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-08-15 13:34:22 +02:00
Kapil 7b7256b55f fixing issues 2012-08-06 10:20:02 -04:00
root 2dc5b322dd Added event system for TDM termination alarms 2012-07-27 21:31:24 -04:00
David Yat Sin a4bb00023c Reverted back clear-channel, used existing FTDM_SIGTYPE instead 2012-07-25 23:16:32 -04:00
David Yat Sin 3c38278134 Added new channel type clear-channel for channels that do not have a signalling module 2012-07-25 20:41:01 -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 f384e247fc FreeTDM: Add gcc printf()-style format string checks to ftdm_log(), also add FTDM_(U)INT64_FMT and FTDM_TIME_FMT constants.
The format string checks already caught a couple crash-worthy bugs and this
commit fixes a couple more.

Also includes __ftdm_check_scanf(), for completeness (currently unused).

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 22:44:08 +02:00
Stefan Knoblich ab285ace3d FreeTDM: Improve error checking and logging in load_config(), add FTDM_SPAN_IS_DIGITAL() helper.
Output the current trunk_type in "add X-channel vs. trunk_type" error messages and
check this for B-/D-channels too.

ISDN (= digital) spans need to have a trunk_type set before adding channels,
bail out early with an error message (actually two) if this is not the case.

(Adding channels should really be moved out of the parsing loop, to catch
 certain types of errors easier.)

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 20:32:34 +02:00
Stefan Knoblich 7a12804577 FreeTDM: Add trunk mode (NET/CPE) to span configuration in freetdm.conf and use it in ftmod_misdn and ftmod_libpri.
Some I/O implementations (e.g. mISDN) need this information to correctly
set up the port configuration. In FreeTDM, the mode of a span has been.
up until now, a part of the signalling module configuration ("node" or "mode"
for libpri and isdn spans), which is parsed _after_ the I/O part of a span
has been initialized. This limitation currently prevents us from using mISDN
in NT mode.

To work around this problem (without adding a lot of new tunk_type values like "E1_NET" etc.),
add a new "trunk_mode" parameter to the span categories in freetdm.conf, which by default
is "CPE" for all trunk types, except "FXS" (which defaults to "NET").

ftmod_misdn uses trunk_type + trunk_mode to correctly choose the d-channel protocol
for a port.

ftmod_libpri uses trunk_mode as a hint for the default "mode" setting.
(NOTE: It will print a warning if trunk_mode and signalling mode do not match.)

All other modules currently ignore the value of trunk_mode.

Example freetdm.conf snippet for a mISDN span in NET/NT mode
(using a HFC-S USB dongle):

  [span misdn MBRI_1]
  trunk_type => BRI_PTMP
  trunk_mode => NET
  b-channel  => HFC-S_USB.1:1-2
  d-channel  => HFC-S_USB.1:3

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 19:15:35 +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 eb0404d025 Merge remote branch 'fsorig/master' into releases.3.5
Conflicts:
	build/modules.conf.in
	libs/freetdm/mod_freetdm/mod_freetdm.c
2012-05-31 13:57:42 -04:00
Moises Silva 1f08e2b0ec Merge remote branch 'fsorig/master' 2012-05-07 15:46:08 -04:00
Moises Silva f316f9307f freetdm: First GSM working version
- Manually merging latest code from gideon.gsm branch after review/inspection/modifications
2012-05-07 15:35:13 -04:00
Moises Silva cf9f937079 Merge branch 'master' into gsm.merge 2012-05-07 15:15:44 -04:00
Moises Silva de98034145 freetdm: - Extend ftdm interrupt object to notify which IO events are ready in the device
- Add definition of FTDM_MAX_SIG_PARAMETERS to have a standard limit for signaling module parameters
2012-05-07 15:13:26 -04:00
Moises Silva 412c808e0c freetdm: Added GSM module skeleton 2012-05-07 15:10:25 -04:00
David Yat Sin 67c43a0759 Initial commit 2012-05-04 18:42:59 -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
David Yat Sin e3369119e0 Merge branch 'master' into releases.3.5 2012-04-03 18:16:36 -04:00
David Yat Sin 27e4cdb4dd Merge branch 'fsorig'
Conflicts:
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_cfg.c
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_stack_hndl.c
2012-04-03 18:08:49 -04:00
David Yat Sin 1377b9c84d freetdm: support for dtmf_on_start 2012-02-07 14:28:47 -05:00
Moises Silva 541aa551c7 Merge branch 'releases.3.4.experimental_head' into releases.3.5 2012-01-31 17:17:25 -05:00
Moises Silva 1ad0bc250c Merge remote-tracking branch 'fsorig/master' 2012-01-31 15:57:07 -05:00
David Yat Sin badc80ad3e freetdm: Added dtmfdetect duration option 2012-01-04 11:16:29 -05:00
Moises Silva 7bd2d154d6 Merge branch 'smgmaster' into releases.3.4.experimental_head
Conflicts:
	libs/freetdm/mod_freetdm/mod_freetdm.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_handle.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.c
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_main.h
	libs/freetdm/src/ftmod/ftmod_sangoma_ss7/ftmod_sangoma_ss7_relay.c
	src/mod/endpoints/mod_sofia/mod_sofia.c
	src/mod/endpoints/mod_sofia/sofia_glue.c
2011-12-17 17:42:34 -05:00
James Zhang 4aa0285a22 freetdm: CDR - location number implementation (for incoming and outgoing calls) 2011-10-12 17:44:52 -04:00
root c0f988b292 freetdm: changing call reference to generic header; removing location area code 2011-10-06 19:08:25 -04:00
root 595454126b freetdm: changing call reference to generic header; removing location area code 2011-09-30 13:09:13 -04:00
Moises Silva 46f097c1b9 freetdm: ftmod_wanpipe - tx idle frames needs to be bigger 2011-08-07 01:33:26 -04:00
Moises Silva 3b2203b71b freetdm: default iostats to yes and allow configuration thru freetdm.conf 2011-08-03 20:30:39 -04:00
Moises Silva 68b887c760 freetdm: allow IO statistics access to users
added ftdm iostats command
2011-07-30 17:40:32 -04:00
David Yat Sin 818e7541fb freetdm: Increased maximum number of channels per group to 2048 2011-07-07 11:24:58 -04:00
David Yat Sin f0da8f4757 chlog: freetdm: Increased Maximum number of spans to 128 (requires libsng_isdn 7.7.2 or later) 2011-07-05 18:24:50 -04:00
David Yat Sin bd7672242c Support for AT&T *8 Transfer (VRU only) 2011-06-03 17:18:30 -04:00
Moises Silva fccbba53c3 added FTDM_SILENCE_VALUE macro 2011-05-18 19:00:42 -04:00
Moises Silva 0b59756edd Merge remote-tracking branch 'smgfs/master'
Conflicts:
	libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_support.c
2011-05-17 19:57:49 -04:00
David Yat Sin ea428669d3 chlog: freetdm - SS7: Support for Transparent IAM 2011-05-17 17:27:05 -04:00
David Yat Sin 05fa93f831 chlog: freetdm: ss7 - Support for Calling Party's Category 2011-05-10 11:38:23 -04:00
David Yat Sin 403dd0c5b0 freetdm: ISDN - Fix for segfault when setting outbound-called-npi=e164 2011-05-09 18:04:07 -04:00