FS-4404 --resolve
FS-4378 add sofia::error custom event
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>
Minor update to Spanish phrase files
come to ClueCon its in one month
FS-4404 regression from b9b4db7d40159ec1b8d2a0c0f41655339daa0887
add wait handler to forking code in ivrd
FS-4370 --resolve
FS-4406 please test asap and report back
freeswitch: Use switch_strlen_zero() to check for empty strings.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
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>
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>
freeswitch: Clean up daemonize().

Whitespace and indentation clean up.

Use EXIT_SUCESS/_FAILURE.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
freeswitch: Whitespace clean up in switch.c.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
freeswitch: Create struct rlimit rlp where it is needed (move down into block scope).

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
freeswitch: Show user/group name in error message if change_user_group() fails.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
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>
fix build related issues on windows - trivial
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>
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>