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>
Add dump_events.pl script
Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch
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>
FreeTDM: Make cfg_name[] const in load_config().

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
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>
first pass on some new stuff
add some rtcp stuff for sangoma
compiler errs from last commit
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>
tweak
flip not
tweaks
update
update
update
update
FS-4328 try this
Add FreeSWITCH-Version string and Uptime-msec (uptime in *milliseconds*) to heartbeat events