diff --git a/configure b/configure
index 987fe0f3345e54bc8f5b42ff15de9264b854a6ec..f1fe54ff09a030903cc84a62d86185a2fcff877e 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 118608 .
+# From configure.ac Revision: 122234 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for asterisk 1.6.
 #
@@ -852,6 +852,10 @@ PRI_LIB
 PRI_INCLUDE
 PRI_DIR
 PBX_PRI
+SPANDSP_LIB
+SPANDSP_INCLUDE
+SPANDSP_DIR
+PBX_SPANDSP
 SS7_LIB
 SS7_INCLUDE
 SS7_DIR
@@ -876,6 +880,14 @@ SDL_IMAGE_LIB
 SDL_IMAGE_INCLUDE
 SDL_IMAGE_DIR
 PBX_SDL_IMAGE
+SACLM_LIB
+SACLM_INCLUDE
+SACLM_DIR
+PBX_SACLM
+SAEVT_LIB
+SAEVT_INCLUDE
+SAEVT_DIR
+PBX_SAEVT
 SPEEX_LIB
 SPEEX_INCLUDE
 SPEEX_DIR
@@ -1602,12 +1614,15 @@ Optional Packages:
   --with-popt=PATH        use popt files in PATH
   --with-portaudio=PATH   use PortAudio files in PATH
   --with-pri=PATH         use ISDN PRI files in PATH
+  --with-spandsp=PATH     use SPANDSP files in PATH
   --with-ss7=PATH         use ISDN SS7 files in PATH
   --with-pwlib=PATH       use PWlib files in PATH
   --with-h323=PATH        use OpenH323 files in PATH
   --with-radius=PATH      use Radius Client files in PATH
   --with-sdl=PATH         use Sdl files in PATH
   --with-SDL_image=PATH   use Sdl Image library files in PATH
+  --with-SaClm=PATH       use SAForum AIS CLM files in PATH
+  --with-SaEvt=PATH       use SAForum AIS EVT files in PATH
   --with-speex=PATH       use Speex files in PATH
   --with-speexdsp=PATH    use Speexdsp files in PATH
   --with-sqlite=PATH      use SQLite files in PATH
@@ -8804,6 +8819,34 @@ fi
 
 
 
+    SPANDSP_DESCRIP="SPANDSP"
+    SPANDSP_OPTION="spandsp"
+
+# Check whether --with-spandsp was given.
+if test "${with_spandsp+set}" = set; then
+  withval=$with_spandsp;
+	case ${withval} in
+	n|no)
+	USE_SPANDSP=no
+	;;
+	y|ye|yes)
+	ac_mandatory_list="${ac_mandatory_list} SPANDSP"
+	;;
+	*)
+	SPANDSP_DIR="${withval}"
+	ac_mandatory_list="${ac_mandatory_list} SPANDSP"
+	;;
+	esac
+
+fi
+
+    PBX_SPANDSP=0
+
+
+
+
+
+
     SS7_DESCRIP="ISDN SS7"
     SS7_OPTION="ss7"
 
@@ -8972,6 +9015,62 @@ fi
 
 
 
+    SACLM_DESCRIP="SAForum AIS CLM"
+    SACLM_OPTION="SaClm"
+
+# Check whether --with-SaClm was given.
+if test "${with_SaClm+set}" = set; then
+  withval=$with_SaClm;
+	case ${withval} in
+	n|no)
+	USE_SACLM=no
+	;;
+	y|ye|yes)
+	ac_mandatory_list="${ac_mandatory_list} SACLM"
+	;;
+	*)
+	SACLM_DIR="${withval}"
+	ac_mandatory_list="${ac_mandatory_list} SACLM"
+	;;
+	esac
+
+fi
+
+    PBX_SACLM=0
+
+
+
+
+
+
+    SAEVT_DESCRIP="SAForum AIS EVT"
+    SAEVT_OPTION="SaEvt"
+
+# Check whether --with-SaEvt was given.
+if test "${with_SaEvt+set}" = set; then
+  withval=$with_SaEvt;
+	case ${withval} in
+	n|no)
+	USE_SAEVT=no
+	;;
+	y|ye|yes)
+	ac_mandatory_list="${ac_mandatory_list} SAEVT"
+	;;
+	*)
+	SAEVT_DIR="${withval}"
+	ac_mandatory_list="${ac_mandatory_list} SAEVT"
+	;;
+	esac
+
+fi
+
+    PBX_SAEVT=0
+
+
+
+
+
+
     SPEEX_DESCRIP="Speex"
     SPEEX_OPTION="speex"
 
@@ -16940,6 +17039,62 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 CFLAGS="$saved_CFLAGS"
 
 
+{ echo "$as_me:$LINENO: checking for compiler 'attribute warn_unused_result' support" >&5
+echo $ECHO_N "checking for compiler 'attribute warn_unused_result' support... $ECHO_C" >&6; }
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+static void __attribute__((warn_unused_result)) *test(void *muffin, ...) {}
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ATTRIBUTE_warn_unused_result 1
+_ACEOF
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+CFLAGS="$saved_CFLAGS"
+
+
 { echo "$as_me:$LINENO: checking for -ffunction-sections support" >&5
 echo $ECHO_N "checking for -ffunction-sections support... $ECHO_C" >&6; }
 saved_CFLAGS="${CFLAGS}"
@@ -38834,25 +38989,374 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: libpri.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libpri.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libpri.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libpri.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libpri.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libpri.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libpri.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libpri.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: libpri.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libpri.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libpri.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libpri.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libpri.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libpri.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libpri.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libpri.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libpri.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libpri.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libpri.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libpri.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to www.asterisk.org ##
+## ------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for libpri.h" >&5
+echo $ECHO_N "checking for libpri.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_libpri_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_libpri_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_libpri_h" >&5
+echo "${ECHO_T}$ac_cv_header_libpri_h" >&6; }
+
+fi
+if test $ac_cv_header_libpri_h = yes; then
+  PRI_HEADER_FOUND=1
+else
+  PRI_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${saved_cppflags}"
+      fi
+      if test "x${PRI_HEADER_FOUND}" = "x0" ; then
+         PRI_LIB=""
+         PRI_INCLUDE=""
+      else
+         if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
+	    PRI_LIB=""
+	 fi
+         PBX_PRI=1
+         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PRI 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PRI_VERSION
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+
+    if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
+	{ echo "$as_me:$LINENO: checking if \"
+		#if SPANDSP_RELEASE_DATE < 20080516
+		#error \"spandsp 0.0.5 or greater is required\"
+		#endif
+	\" compiles using spandsp/version.h" >&5
+echo $ECHO_N "checking if \"
+		#if SPANDSP_RELEASE_DATE < 20080516
+		#error \"spandsp 0.0.5 or greater is required\"
+		#endif
+	\" compiles using spandsp/version.h... $ECHO_C" >&6; }
+	saved_cppflags="${CPPFLAGS}"
+	if test "x${SPANDSP_DIR}" != "x"; then
+	    SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
+	fi
+	CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE}"
+
+	cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <spandsp/version.h>
+int
+main ()
+{
+
+		#if SPANDSP_RELEASE_DATE < 20080516
+		#error "spandsp 0.0.5 or greater is required"
+		#endif
+	;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+		PBX_SPANDSP=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SPANDSP 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SPANDSP_VERSION
+_ACEOF
+
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	CPPFLAGS="${saved_cppflags}"
+    fi
+
+
+if test "x${PBX_SPANDSP}" = "x1" ; then
+	# We found the correct version in the header, now let's make sure it links
+	# properly, and that libtiff is available
+	PBX_SPANDSP=0
+
+if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
+   pbxlibdir=""
+   # if --with-SPANDSP=DIR has been specified, use it.
+   if test "x${SPANDSP_DIR}" != "x"; then
+      if test -d ${SPANDSP_DIR}/lib; then
+      	 pbxlibdir="-L${SPANDSP_DIR}/lib"
+      else
+      	 pbxlibdir="-L${SPANDSP_DIR}"
+      fi
+   fi
+   pbxfuncname="span_set_message_handler"
+   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+      AST_SPANDSP_FOUND=yes
+   else
+      as_ac_Lib=`echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lspandsp" >&5
+echo $ECHO_N "checking for ${pbxfuncname} in -lspandsp... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lspandsp ${pbxlibdir} -ltiff $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ${pbxfuncname} ();
+int
+main ()
+{
+return ${pbxfuncname} ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  AST_SPANDSP_FOUND=yes
+else
+  AST_SPANDSP_FOUND=no
+fi
+
+   fi
+
+   # now check for the header.
+   if test "${AST_SPANDSP_FOUND}" = "yes"; then
+      SPANDSP_LIB="${pbxlibdir} -lspandsp -ltiff"
+      # if --with-SPANDSP=DIR has been specified, use it.
+      if test "x${SPANDSP_DIR}" != "x"; then
+	 SPANDSP_INCLUDE="-I${SPANDSP_DIR}/include"
+      fi
+      SPANDSP_INCLUDE="${SPANDSP_INCLUDE} "
+      if test "xspandsp.h" = "x" ; then	# no header, assume found
+         SPANDSP_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${SPANDSP_INCLUDE} "
+	 if test "${ac_cv_header_spandsp_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for spandsp.h" >&5
+echo $ECHO_N "checking for spandsp.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_spandsp_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_spandsp_h" >&5
+echo "${ECHO_T}$ac_cv_header_spandsp_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking spandsp.h usability" >&5
+echo $ECHO_N "checking spandsp.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <spandsp.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking spandsp.h presence" >&5
+echo $ECHO_N "checking spandsp.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <spandsp.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: spandsp.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: spandsp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: spandsp.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: spandsp.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: libpri.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libpri.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libpri.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libpri.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libpri.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libpri.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libpri.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libpri.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libpri.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libpri.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: libpri.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libpri.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: spandsp.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: spandsp.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: spandsp.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: spandsp.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: spandsp.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: spandsp.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: spandsp.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: spandsp.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: spandsp.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: spandsp.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: spandsp.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: spandsp.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## ------------------------------- ##
 ## Report this to www.asterisk.org ##
@@ -38861,49 +39365,50 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for libpri.h" >&5
-echo $ECHO_N "checking for libpri.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_libpri_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for spandsp.h" >&5
+echo $ECHO_N "checking for spandsp.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_spandsp_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_libpri_h=$ac_header_preproc
+  ac_cv_header_spandsp_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_libpri_h" >&5
-echo "${ECHO_T}$ac_cv_header_libpri_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_spandsp_h" >&5
+echo "${ECHO_T}$ac_cv_header_spandsp_h" >&6; }
 
 fi
-if test $ac_cv_header_libpri_h = yes; then
-  PRI_HEADER_FOUND=1
+if test $ac_cv_header_spandsp_h = yes; then
+  SPANDSP_HEADER_FOUND=1
 else
-  PRI_HEADER_FOUND=0
+  SPANDSP_HEADER_FOUND=0
 fi
 
 
          CPPFLAGS="${saved_cppflags}"
       fi
-      if test "x${PRI_HEADER_FOUND}" = "x0" ; then
-         PRI_LIB=""
-         PRI_INCLUDE=""
+      if test "x${SPANDSP_HEADER_FOUND}" = "x0" ; then
+         SPANDSP_LIB=""
+         SPANDSP_INCLUDE=""
       else
          if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
-	    PRI_LIB=""
+	    SPANDSP_LIB=""
 	 fi
-         PBX_PRI=1
+         PBX_SPANDSP=1
          # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_PRI 1
+#define HAVE_SPANDSP 1
 _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_PRI_VERSION
+#define HAVE_SPANDSP_VERSION
 _ACEOF
 
       fi
    fi
 fi
 
+fi
 
 
 if test "x${PBX_SS7}" != "x1" -a "${USE_SS7}" != "no"; then
@@ -41557,38 +42062,561 @@ ac_res=`eval echo '${'$as_ac_Lib'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
-  AST_RADIUS_FOUND=yes
+  AST_RADIUS_FOUND=yes
+else
+  AST_RADIUS_FOUND=no
+fi
+
+   fi
+
+   # now check for the header.
+   if test "${AST_RADIUS_FOUND}" = "yes"; then
+      RADIUS_LIB="${pbxlibdir} -lradiusclient-ng "
+      # if --with-RADIUS=DIR has been specified, use it.
+      if test "x${RADIUS_DIR}" != "x"; then
+	 RADIUS_INCLUDE="-I${RADIUS_DIR}/include"
+      fi
+      RADIUS_INCLUDE="${RADIUS_INCLUDE} "
+      if test "xradiusclient-ng.h" = "x" ; then	# no header, assume found
+         RADIUS_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${RADIUS_INCLUDE} "
+	 if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for radiusclient-ng.h" >&5
+echo $ECHO_N "checking for radiusclient-ng.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_radiusclient_ng_h" >&5
+echo "${ECHO_T}$ac_cv_header_radiusclient_ng_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking radiusclient-ng.h usability" >&5
+echo $ECHO_N "checking radiusclient-ng.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <radiusclient-ng.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking radiusclient-ng.h presence" >&5
+echo $ECHO_N "checking radiusclient-ng.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <radiusclient-ng.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: radiusclient-ng.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: radiusclient-ng.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: radiusclient-ng.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: radiusclient-ng.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: radiusclient-ng.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: radiusclient-ng.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: radiusclient-ng.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to www.asterisk.org ##
+## ------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for radiusclient-ng.h" >&5
+echo $ECHO_N "checking for radiusclient-ng.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_radiusclient_ng_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_radiusclient_ng_h" >&5
+echo "${ECHO_T}$ac_cv_header_radiusclient_ng_h" >&6; }
+
+fi
+if test $ac_cv_header_radiusclient_ng_h = yes; then
+  RADIUS_HEADER_FOUND=1
+else
+  RADIUS_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${saved_cppflags}"
+      fi
+      if test "x${RADIUS_HEADER_FOUND}" = "x0" ; then
+         RADIUS_LIB=""
+         RADIUS_INCLUDE=""
+      else
+         if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
+	    RADIUS_LIB=""
+	 fi
+         PBX_RADIUS=1
+         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_RADIUS 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_RADIUS_VERSION
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+
+if test "x${PBX_SACLM}" != "x1" -a "${USE_SACLM}" != "no"; then
+   pbxlibdir=""
+   # if --with-SACLM=DIR has been specified, use it.
+   if test "x${SACLM_DIR}" != "x"; then
+      if test -d ${SACLM_DIR}/lib; then
+      	 pbxlibdir="-L${SACLM_DIR}/lib"
+      else
+      	 pbxlibdir="-L${SACLM_DIR}"
+      fi
+   fi
+   pbxfuncname="saClmInitialize"
+   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+      AST_SACLM_FOUND=yes
+   else
+      as_ac_Lib=`echo "ac_cv_lib_SaClm_${pbxfuncname}" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lSaClm" >&5
+echo $ECHO_N "checking for ${pbxfuncname} in -lSaClm... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lSaClm ${pbxlibdir}  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ${pbxfuncname} ();
+int
+main ()
+{
+return ${pbxfuncname} ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  AST_SACLM_FOUND=yes
 else
-  AST_RADIUS_FOUND=no
+  AST_SACLM_FOUND=no
 fi
 
    fi
 
    # now check for the header.
-   if test "${AST_RADIUS_FOUND}" = "yes"; then
-      RADIUS_LIB="${pbxlibdir} -lradiusclient-ng "
-      # if --with-RADIUS=DIR has been specified, use it.
-      if test "x${RADIUS_DIR}" != "x"; then
-	 RADIUS_INCLUDE="-I${RADIUS_DIR}/include"
+   if test "${AST_SACLM_FOUND}" = "yes"; then
+      SACLM_LIB="${pbxlibdir} -lSaClm "
+      # if --with-SACLM=DIR has been specified, use it.
+      if test "x${SACLM_DIR}" != "x"; then
+	 SACLM_INCLUDE="-I${SACLM_DIR}/include"
+      fi
+      SACLM_INCLUDE="${SACLM_INCLUDE} "
+      if test "xopenais/saClm.h" = "x" ; then	# no header, assume found
+         SACLM_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${SACLM_INCLUDE} "
+	 if test "${ac_cv_header_openais_saClm_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for openais/saClm.h" >&5
+echo $ECHO_N "checking for openais/saClm.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_openais_saClm_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_openais_saClm_h" >&5
+echo "${ECHO_T}$ac_cv_header_openais_saClm_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking openais/saClm.h usability" >&5
+echo $ECHO_N "checking openais/saClm.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <openais/saClm.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking openais/saClm.h presence" >&5
+echo $ECHO_N "checking openais/saClm.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <openais/saClm.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: openais/saClm.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: openais/saClm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saClm.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: openais/saClm.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: openais/saClm.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: openais/saClm.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saClm.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: openais/saClm.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saClm.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: openais/saClm.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saClm.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: openais/saClm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saClm.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: openais/saClm.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saClm.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: openais/saClm.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to www.asterisk.org ##
+## ------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for openais/saClm.h" >&5
+echo $ECHO_N "checking for openais/saClm.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_openais_saClm_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_openais_saClm_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_openais_saClm_h" >&5
+echo "${ECHO_T}$ac_cv_header_openais_saClm_h" >&6; }
+
+fi
+if test $ac_cv_header_openais_saClm_h = yes; then
+  SACLM_HEADER_FOUND=1
+else
+  SACLM_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${saved_cppflags}"
       fi
-      RADIUS_INCLUDE="${RADIUS_INCLUDE} "
-      if test "xradiusclient-ng.h" = "x" ; then	# no header, assume found
-         RADIUS_HEADER_FOUND="1"
+      if test "x${SACLM_HEADER_FOUND}" = "x0" ; then
+         SACLM_LIB=""
+         SACLM_INCLUDE=""
+      else
+         if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
+	    SACLM_LIB=""
+	 fi
+         PBX_SACLM=1
+         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SACLM 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SACLM_VERSION
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+if test "x${PBX_SAEVT}" != "x1" -a "${USE_SAEVT}" != "no"; then
+   pbxlibdir=""
+   # if --with-SAEVT=DIR has been specified, use it.
+   if test "x${SAEVT_DIR}" != "x"; then
+      if test -d ${SAEVT_DIR}/lib; then
+      	 pbxlibdir="-L${SAEVT_DIR}/lib"
+      else
+      	 pbxlibdir="-L${SAEVT_DIR}"
+      fi
+   fi
+   pbxfuncname="saEvtInitialize"
+   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+      AST_SAEVT_FOUND=yes
+   else
+      as_ac_Lib=`echo "ac_cv_lib_SaEvt_${pbxfuncname}" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lSaEvt" >&5
+echo $ECHO_N "checking for ${pbxfuncname} in -lSaEvt... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lSaEvt ${pbxlibdir}  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ${pbxfuncname} ();
+int
+main ()
+{
+return ${pbxfuncname} ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  AST_SAEVT_FOUND=yes
+else
+  AST_SAEVT_FOUND=no
+fi
+
+   fi
+
+   # now check for the header.
+   if test "${AST_SAEVT_FOUND}" = "yes"; then
+      SAEVT_LIB="${pbxlibdir} -lSaEvt "
+      # if --with-SAEVT=DIR has been specified, use it.
+      if test "x${SAEVT_DIR}" != "x"; then
+	 SAEVT_INCLUDE="-I${SAEVT_DIR}/include"
+      fi
+      SAEVT_INCLUDE="${SAEVT_INCLUDE} "
+      if test "xopenais/saEvt.h" = "x" ; then	# no header, assume found
+         SAEVT_HEADER_FOUND="1"
       else				# check for the header
          saved_cppflags="${CPPFLAGS}"
-         CPPFLAGS="${CPPFLAGS} ${RADIUS_INCLUDE} "
-	 if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for radiusclient-ng.h" >&5
-echo $ECHO_N "checking for radiusclient-ng.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then
+         CPPFLAGS="${CPPFLAGS} ${SAEVT_INCLUDE} "
+	 if test "${ac_cv_header_openais_saEvt_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for openais/saEvt.h" >&5
+echo $ECHO_N "checking for openais/saEvt.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_openais_saEvt_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_radiusclient_ng_h" >&5
-echo "${ECHO_T}$ac_cv_header_radiusclient_ng_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_openais_saEvt_h" >&5
+echo "${ECHO_T}$ac_cv_header_openais_saEvt_h" >&6; }
 else
   # Is the header compilable?
-{ echo "$as_me:$LINENO: checking radiusclient-ng.h usability" >&5
-echo $ECHO_N "checking radiusclient-ng.h usability... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking openais/saEvt.h usability" >&5
+echo $ECHO_N "checking openais/saEvt.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -41596,7 +42624,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <radiusclient-ng.h>
+#include <openais/saEvt.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -41628,15 +42656,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ echo "$as_me:$LINENO: checking radiusclient-ng.h presence" >&5
-echo $ECHO_N "checking radiusclient-ng.h presence... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking openais/saEvt.h presence" >&5
+echo $ECHO_N "checking openais/saEvt.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <radiusclient-ng.h>
+#include <openais/saEvt.h>
 _ACEOF
 if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
@@ -41669,25 +42697,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; }
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: radiusclient-ng.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saEvt.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: openais/saEvt.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saEvt.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: openais/saEvt.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: radiusclient-ng.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: radiusclient-ng.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: radiusclient-ng.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: radiusclient-ng.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: radiusclient-ng.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: radiusclient-ng.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saEvt.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: openais/saEvt.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saEvt.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: openais/saEvt.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saEvt.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: openais/saEvt.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saEvt.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: openais/saEvt.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saEvt.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: openais/saEvt.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openais/saEvt.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: openais/saEvt.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## ------------------------------- ##
 ## Report this to www.asterisk.org ##
@@ -41696,43 +42724,43 @@ _ASBOX
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ echo "$as_me:$LINENO: checking for radiusclient-ng.h" >&5
-echo $ECHO_N "checking for radiusclient-ng.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then
+{ echo "$as_me:$LINENO: checking for openais/saEvt.h" >&5
+echo $ECHO_N "checking for openais/saEvt.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_openais_saEvt_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_radiusclient_ng_h=$ac_header_preproc
+  ac_cv_header_openais_saEvt_h=$ac_header_preproc
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_radiusclient_ng_h" >&5
-echo "${ECHO_T}$ac_cv_header_radiusclient_ng_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_openais_saEvt_h" >&5
+echo "${ECHO_T}$ac_cv_header_openais_saEvt_h" >&6; }
 
 fi
-if test $ac_cv_header_radiusclient_ng_h = yes; then
-  RADIUS_HEADER_FOUND=1
+if test $ac_cv_header_openais_saEvt_h = yes; then
+  SAEVT_HEADER_FOUND=1
 else
-  RADIUS_HEADER_FOUND=0
+  SAEVT_HEADER_FOUND=0
 fi
 
 
          CPPFLAGS="${saved_cppflags}"
       fi
-      if test "x${RADIUS_HEADER_FOUND}" = "x0" ; then
-         RADIUS_LIB=""
-         RADIUS_INCLUDE=""
+      if test "x${SAEVT_HEADER_FOUND}" = "x0" ; then
+         SAEVT_LIB=""
+         SAEVT_INCLUDE=""
       else
          if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
-	    RADIUS_LIB=""
+	    SAEVT_LIB=""
 	 fi
-         PBX_RADIUS=1
+         PBX_SAEVT=1
          # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_RADIUS 1
+#define HAVE_SAEVT 1
 _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_RADIUS_VERSION
+#define HAVE_SAEVT_VERSION
 _ACEOF
 
       fi
@@ -49172,6 +50200,10 @@ PRI_LIB!$PRI_LIB$ac_delim
 PRI_INCLUDE!$PRI_INCLUDE$ac_delim
 PRI_DIR!$PRI_DIR$ac_delim
 PBX_PRI!$PBX_PRI$ac_delim
+SPANDSP_LIB!$SPANDSP_LIB$ac_delim
+SPANDSP_INCLUDE!$SPANDSP_INCLUDE$ac_delim
+SPANDSP_DIR!$SPANDSP_DIR$ac_delim
+PBX_SPANDSP!$PBX_SPANDSP$ac_delim
 SS7_LIB!$SS7_LIB$ac_delim
 SS7_INCLUDE!$SS7_INCLUDE$ac_delim
 SS7_DIR!$SS7_DIR$ac_delim
@@ -49196,6 +50228,14 @@ SDL_IMAGE_LIB!$SDL_IMAGE_LIB$ac_delim
 SDL_IMAGE_INCLUDE!$SDL_IMAGE_INCLUDE$ac_delim
 SDL_IMAGE_DIR!$SDL_IMAGE_DIR$ac_delim
 PBX_SDL_IMAGE!$PBX_SDL_IMAGE$ac_delim
+SACLM_LIB!$SACLM_LIB$ac_delim
+SACLM_INCLUDE!$SACLM_INCLUDE$ac_delim
+SACLM_DIR!$SACLM_DIR$ac_delim
+PBX_SACLM!$PBX_SACLM$ac_delim
+SAEVT_LIB!$SAEVT_LIB$ac_delim
+SAEVT_INCLUDE!$SAEVT_INCLUDE$ac_delim
+SAEVT_DIR!$SAEVT_DIR$ac_delim
+PBX_SAEVT!$PBX_SAEVT$ac_delim
 SPEEX_LIB!$SPEEX_LIB$ac_delim
 SPEEX_INCLUDE!$SPEEX_INCLUDE$ac_delim
 SPEEX_DIR!$SPEEX_DIR$ac_delim
@@ -49218,18 +50258,6 @@ SUPPSERV_DIR!$SUPPSERV_DIR$ac_delim
 PBX_SUPPSERV!$PBX_SUPPSERV$ac_delim
 OPENSSL_LIB!$OPENSSL_LIB$ac_delim
 OPENSSL_INCLUDE!$OPENSSL_INCLUDE$ac_delim
-OPENSSL_DIR!$OPENSSL_DIR$ac_delim
-PBX_OPENSSL!$PBX_OPENSSL$ac_delim
-FREETDS_LIB!$FREETDS_LIB$ac_delim
-FREETDS_INCLUDE!$FREETDS_INCLUDE$ac_delim
-FREETDS_DIR!$FREETDS_DIR$ac_delim
-PBX_FREETDS!$PBX_FREETDS$ac_delim
-TERMCAP_LIB!$TERMCAP_LIB$ac_delim
-TERMCAP_INCLUDE!$TERMCAP_INCLUDE$ac_delim
-TERMCAP_DIR!$TERMCAP_DIR$ac_delim
-PBX_TERMCAP!$PBX_TERMCAP$ac_delim
-TINFO_LIB!$TINFO_LIB$ac_delim
-TINFO_INCLUDE!$TINFO_INCLUDE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -49271,6 +50299,18 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+OPENSSL_DIR!$OPENSSL_DIR$ac_delim
+PBX_OPENSSL!$PBX_OPENSSL$ac_delim
+FREETDS_LIB!$FREETDS_LIB$ac_delim
+FREETDS_INCLUDE!$FREETDS_INCLUDE$ac_delim
+FREETDS_DIR!$FREETDS_DIR$ac_delim
+PBX_FREETDS!$PBX_FREETDS$ac_delim
+TERMCAP_LIB!$TERMCAP_LIB$ac_delim
+TERMCAP_INCLUDE!$TERMCAP_INCLUDE$ac_delim
+TERMCAP_DIR!$TERMCAP_DIR$ac_delim
+PBX_TERMCAP!$PBX_TERMCAP$ac_delim
+TINFO_LIB!$TINFO_LIB$ac_delim
+TINFO_INCLUDE!$TINFO_INCLUDE$ac_delim
 TINFO_DIR!$TINFO_DIR$ac_delim
 PBX_TINFO!$PBX_TINFO$ac_delim
 TONEZONE_LIB!$TONEZONE_LIB$ac_delim
@@ -49336,7 +50376,7 @@ CURL_CONFIG!$CURL_CONFIG$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 75; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index c07a03d6ec207fb907e3531e85d7af9e55380d22..c1a33783d9cf6d2fe991d2fdec39b5ad7903bf71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -441,6 +441,7 @@ AST_GCC_ATTRIBUTE(unused)
 AST_GCC_ATTRIBUTE(always_inline)
 AST_GCC_ATTRIBUTE(deprecated)
 AST_GCC_ATTRIBUTE(sentinel)
+AST_GCC_ATTRIBUTE(warn_unused_result)
 
 AC_MSG_CHECKING(for -ffunction-sections support)
 saved_CFLAGS="${CFLAGS}"
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 99aa3ca2aa8d0a128f01a3ecf422158ff4d8fd93..564b01117e6c394a45d5adbb0fdf3a75ba9ddaee 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -113,6 +113,10 @@
 /* Define to 1 if your GCC C compiler supports the 'unused' attribute. */
 #undef HAVE_ATTRIBUTE_unused
 
+/* Define to 1 if your GCC C compiler supports the 'warn_unused_result'
+   attribute. */
+#undef HAVE_ATTRIBUTE_warn_unused_result
+
 /* Define this to indicate the ${BKTR_DESCRIP} library */
 #undef HAVE_BKTR
 
diff --git a/include/asterisk/compiler.h b/include/asterisk/compiler.h
index 12b8ee728a53a3a557ebc21f05402d4417df2c6e..b6575d000e69107ef15f83371a50776c709f2698 100644
--- a/include/asterisk/compiler.h
+++ b/include/asterisk/compiler.h
@@ -59,4 +59,10 @@
 #define attribute_sentinel
 #endif
 
+#ifdef HAVE_ATTRIBUTE_warn_unused_result
+#define attribute_warn_unused_result __attribute__((warn_unused_result))
+#else
+#define attribute_warn_unused_result
+#endif
+
 #endif /* _ASTERISK_COMPILER_H */
diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h
index cb78180915d81acc666de7f7f3aefd288a9b1c29..45407e81d30f7aa7a9ff31967ed30a284fc2d3f5 100644
--- a/include/asterisk/logger.h
+++ b/include/asterisk/logger.h
@@ -83,8 +83,8 @@ void __ast_verbose(const char *file, int line, const char *func, const char *fmt
 void ast_child_verbose(int level, const char *fmt, ...)
 	__attribute__ ((format (printf, 2, 3)));
 
-int ast_register_verbose(void (*verboser)(const char *string)) __attribute__((warn_unused_result));
-int ast_unregister_verbose(void (*verboser)(const char *string)) __attribute__((warn_unused_result));
+int ast_register_verbose(void (*verboser)(const char *string)) attribute_warn_unused_result;
+int ast_unregister_verbose(void (*verboser)(const char *string)) attribute_warn_unused_result;
 
 void ast_console_puts(const char *string);
 
diff --git a/include/asterisk/sched.h b/include/asterisk/sched.h
index 526c0d90d365c5c89cdbfcc51526a1ecd3ffed6e..8177d4991997df2ca1e2a4ad3a6fc57938a350d7 100644
--- a/include/asterisk/sched.h
+++ b/include/asterisk/sched.h
@@ -149,7 +149,7 @@ char *ast_sched_report(struct sched_context *con, char *buf, int bufsiz, struct
  * \param data data to pass to the callback
  * \return Returns a schedule item ID on success, -1 on failure
  */
-int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, const void *data) __attribute__((warn_unused_result));
+int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, const void *data) attribute_warn_unused_result;
 
 /*!
  * \brief replace a scheduler entry
@@ -162,7 +162,7 @@ int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, co
  * \retval -1 failure
  * \retval otherwise, returns scheduled item ID
  */
-int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data) __attribute__((warn_unused_result));
+int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data) attribute_warn_unused_result;
 
 /*!Adds a scheduled event with rescheduling support
  * \param con Scheduler context to add
@@ -177,7 +177,7 @@ int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched
  * If callback returns 0, no further events will be re-scheduled
  * \return Returns a schedule item ID on success, -1 on failure
  */
-int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) __attribute__((warn_unused_result));
+int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) attribute_warn_unused_result;
 
 /*!
  * \brief replace a scheduler entry
@@ -190,7 +190,7 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal
  * \retval -1 failure
  * \retval otherwise, returns scheduled item ID
  */
-int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) __attribute__((warn_unused_result));
+int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) attribute_warn_unused_result;
 
 	
 /*! \brief Find a sched structure and return the data field associated with it. 
@@ -210,7 +210,7 @@ const void *ast_sched_find_data(struct sched_context *con, int id);
  * \param id ID of the scheduled item to delete
  * \return Returns 0 on success, -1 on failure
  */
-int ast_sched_del(struct sched_context *con, int id) __attribute__((warn_unused_result));
+int ast_sched_del(struct sched_context *con, int id) attribute_warn_unused_result;
 
 /*! \brief Determines number of seconds until the next outstanding event to take place
  * Determine the number of seconds until the next outstanding event
@@ -221,7 +221,7 @@ int ast_sched_del(struct sched_context *con, int id) __attribute__((warn_unused_
  * \return Returns "-1" if there is nothing there are no scheduled events
  * (and thus the poll should not timeout)
  */
-int ast_sched_wait(struct sched_context *con) __attribute__((warn_unused_result));
+int ast_sched_wait(struct sched_context *con) attribute_warn_unused_result;
 
 /*! \brief Runs the queue
  * \param con Scheduling context to run