Commit Graph

21688 Commits

Author SHA1 Message Date
Stefan Knoblich a0bd63d32d mod_conference: Fix format string errors.
Use switch_event_add_header_string() where needed and add a
dummy "%s" format string to switch_event_add_body() calls.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-12 01:44:18 +02:00
Daniel Swarbrick a8efae998f Add FreeSWITCH-Version string and Uptime-msec (uptime in *milliseconds*) to heartbeat events 2012-07-12 01:34:36 +02:00
Anthony Minessale a06eb2db30 FS-4328 try this 2012-07-11 18:12:26 -05:00
Anthony Minessale 932fc2286f update 2012-07-11 18:04:13 -05:00
Anthony Minessale 0c945168ca update 2012-07-11 17:35:40 -05:00
Anthony Minessale 4e0f40d7c6 update 2012-07-11 17:25:45 -05:00
Anthony Minessale 63147207b6 update 2012-07-11 17:09:42 -05:00
Anthony Minessale 75b36c9545 tweaks 2012-07-11 16:48:56 -05:00
Anthony Minessale 9cad51b74b flip not 2012-07-11 16:03:56 -05:00
Anthony Minessale abbe8d5a0d tweak 2012-07-11 15:50:43 -05: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
Anthony Minessale 1e7d214ae6 compiler errs from last commit 2012-07-11 15:35:49 -05:00
Anthony Minessale 088437cab1 add some rtcp stuff for sangoma 2012-07-11 15:23:12 -05:00
Anthony Minessale 2aebe2456f first pass on some new stuff 2012-07-11 15:15:50 -05:00
Stefan Knoblich 90cdc718ec FreeTDM: Whitespace fixes for load_config().
Get rid of those annoying green trailing whitespace and empty lines
with whitespace.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 20:41:55 +02:00
Stefan Knoblich fdf86c0c51 FreeTDM: Make cfg_name[] const in load_config().
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 20:40:59 +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
Michael S Collins eb7e640b59 Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch 2012-07-11 11:10:33 -07:00
Michael S Collins fbfa31d2d1 Add dump_events.pl script 2012-07-11 11:10:24 -07: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
Jeff Lenk 91236c9ad3 fix build related issues on windows - trivial 2012-07-11 07:52:20 -05:00
Stefan Knoblich 07e9467d35 freeswitch: Add more cmdline options to control file locations.
Setting the base_dir variable didn't work so this will have to be
enough for now.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 11:08:24 +02:00
Stefan Knoblich aeb4b31063 freeswitch: Show user/group name in error message if change_user_group() fails.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 11:08:24 +02:00
Stefan Knoblich edfbbb127c freeswitch: Create struct rlimit rlp where it is needed (move down into block scope).
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 11:08:24 +02:00
Stefan Knoblich 93a429fc11 freeswitch: Whitespace clean up in switch.c.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 11:08:24 +02:00
Stefan Knoblich b494d46f45 freeswitch: Clean up daemonize().
Whitespace and indentation clean up.

Use EXIT_SUCESS/_FAILURE.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 11:08:24 +02:00
Stefan Knoblich f9d0e249a1 freeswitch: Rework option handling in main() and other clean ups.
Use a chain of "else if" statements, drop known_opt completely.
Added bonus: We stop trying to parse option arguments as (possible) options.

Arguments of -u/-g and path options (-conf) now check whether their argument
starts with a dash ('-') and error out in case it does (= next option, not a valid argument).

Use PATH_MAX for everything that stores files / directories.

Use switch_bool_t and SWITCH_TRUE/_FALSE for boolean variables.

Use EXIT_SUCCESS/_FAILURE for exit() calls.

Get rid of excessive indenting (especially in the win32 parts of main()).

NOTE: Win32 parts untested.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 11:08:23 +02:00
Stefan Knoblich 659ea9f117 freeswitch: Move usage description out of main() and improve cmdline option handling.
Move empty cmdline option string check and "-help/-h/-?" handling to top of loop.

Emit a proper error message for unknown options. (Just displaying the
usage description, but not telling the user which option was wrong, is bad mojo).

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 11:08:23 +02:00
Stefan Knoblich d6a395b642 freeswitch: Use switch_strlen_zero() to check for empty strings.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-11 11:08:23 +02:00
Anthony Minessale ba428a1559 FS-4406 please test asap and report back 2012-07-10 23:04:16 -05:00
Anthony Minessale 293516be59 FS-4370 --resolve 2012-07-10 22:44:11 -05:00
Anthony Minessale 6c406aa0d9 add wait handler to forking code in ivrd 2012-07-10 13:32:35 -05:00
Anthony Minessale 6904ae6f3b FS-4404 regression from b9b4db7d40 2012-07-10 13:28:38 -05:00
Anthony Minessale 27155bcb71 come to ClueCon its in one month 2012-07-10 12:05:26 -05:00
Michael S Collins 3375c39c02 Minor update to Spanish phrase files 2012-07-10 09:28:26 -07:00
Stefan Knoblich 111ef49f1f mod_sofia: Use switch_add_event_header_string() for string values.
Errors fixed:
	sofia.c: In function 'sofia_handle_sip_i_refer':
	sofia.c:7323:5: error: format not a string literal and no format arguments
	sofia.c:7324:5: error: format not a string literal and no format arguments

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-10 14:30:01 +02:00
Anthony Minessale e79e6146c5 FS-4378 add sofia::error custom event 2012-07-09 10:56:04 -05:00
Anthony Minessale b9b4db7d40 FS-4404 --resolve 2012-07-09 10:37:15 -05:00
Jeff Lenk fa1276d949 FS-4219 --resolve 2012-07-08 09:10:28 -05:00
Anthony Minessale 2bd7155ebd come to cluecon will ya 2012-07-06 17:54:21 -05:00
Anthony Minessale 16cb32cd5c come to cluecon will ya 2012-07-06 17:54:21 -05:00
Moises Silva c81e20475f freetdm: Try to be more foolproof when creating an iterator for an empty span
to avoid triggering asserts later
2012-07-06 18:43:03 -04:00
Anthony Minessale c6fc4a2774 add Current-Energy to conference events 2012-07-06 17:20:44 -05:00
Anthony Minessale 6cf9ea181d FS-4364 --resolve 2012-07-06 16:16:51 -05:00
David Yat Sin f509b708a7 Freetdm: Fix for 64-bit check on Ubuntu 2012-07-06 15:23:37 -04:00
Anthony Minessale 9ca929218f FS-4382 --resolve 2012-07-06 11:12:14 -05:00
Anthony Minessale da8885cc51 FS-4397 --resolve 2012-07-06 10:55:53 -05:00
Stefan Knoblich a5e1101302 ftmod_libpri: Add doxygen documentation for new MSN/DDI filter functions.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-07-06 11:08:34 +02:00
Anthony Minessale 6ea4c42c95 have sql thread manually subscribe to each event it cares about instead of every event and filtering it 2012-07-05 16:42:49 -05:00