[svn-commits] branch oej/ami_ssl r24215 - in /team/oej/ami_ssl: ./ apps/ build_tools/ cdr/ ...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue May 2 10:33:38 MST 2006


Author: oej
Date: Tue May  2 12:33:37 2006
New Revision: 24215

URL: http://svn.digium.com/view/asterisk?rev=24215&view=rev
Log:
Update to trunk, reset automerge

Removed:
    team/oej/ami_ssl/mxml/.cvsignore
    team/oej/ami_ssl/mxml/configure.in
Modified:
    team/oej/ami_ssl/   (props changed)
    team/oej/ami_ssl/Makefile
    team/oej/ami_ssl/UPGRADE.txt
    team/oej/ami_ssl/acinclude.m4
    team/oej/ami_ssl/app.c
    team/oej/ami_ssl/apps/Makefile
    team/oej/ami_ssl/apps/app_chanspy.c
    team/oej/ami_ssl/apps/app_externalivr.c
    team/oej/ami_ssl/apps/app_festival.c
    team/oej/ami_ssl/apps/app_ices.c
    team/oej/ami_ssl/apps/app_mp3.c
    team/oej/ami_ssl/apps/app_nbscat.c
    team/oej/ami_ssl/apps/app_privacy.c
    team/oej/ami_ssl/apps/app_speech_utils.c
    team/oej/ami_ssl/apps/app_voicemail.c
    team/oej/ami_ssl/apps/app_zapras.c
    team/oej/ami_ssl/asterisk.c
    team/oej/ami_ssl/build_tools/cflags.xml
    team/oej/ami_ssl/build_tools/menuselect-deps.in
    team/oej/ami_ssl/cdr.c
    team/oej/ami_ssl/cdr/Makefile
    team/oej/ami_ssl/channel.c
    team/oej/ami_ssl/channels/Makefile
    team/oej/ami_ssl/channels/chan_iax2.c
    team/oej/ami_ssl/channels/chan_misdn.c
    team/oej/ami_ssl/channels/chan_oss.c
    team/oej/ami_ssl/channels/chan_zap.c
    team/oej/ami_ssl/channels/misdn/isdn_lib.c
    team/oej/ami_ssl/channels/misdn/isdn_lib_intern.h
    team/oej/ami_ssl/cli.c
    team/oej/ami_ssl/configure.ac
    team/oej/ami_ssl/db1-ast/Makefile
    team/oej/ami_ssl/devicestate.c
    team/oej/ami_ssl/doc/asterisk-conf.txt
    team/oej/ami_ssl/editline/configure
    team/oej/ami_ssl/editline/makelist
    team/oej/ami_ssl/include/asterisk/frame.h
    team/oej/ami_ssl/include/asterisk/options.h
    team/oej/ami_ssl/include/asterisk/pbx.h
    team/oej/ami_ssl/makeopts.in
    team/oej/ami_ssl/manager.c
    team/oej/ami_ssl/mxml/Makefile.in
    team/oej/ami_ssl/pbx.c
    team/oej/ami_ssl/pbx/Makefile
    team/oej/ami_ssl/pbx/ael/ael.flex
    team/oej/ami_ssl/pbx/ael/ael.tab.c
    team/oej/ami_ssl/pbx/ael/ael.tab.h
    team/oej/ami_ssl/pbx/ael/ael.y
    team/oej/ami_ssl/pbx/ael/ael_lex.c
    team/oej/ami_ssl/pbx/pbx_ael.c
    team/oej/ami_ssl/pbx/pbx_dundi.c
    team/oej/ami_ssl/res/Makefile
    team/oej/ami_ssl/res/res_agi.c
    team/oej/ami_ssl/res/res_features.c
    team/oej/ami_ssl/res/res_monitor.c
    team/oej/ami_ssl/res/res_musiconhold.c
    team/oej/ami_ssl/res/snmp/agent.c
    team/oej/ami_ssl/udptl.c
    team/oej/ami_ssl/utils/   (props changed)
    team/oej/ami_ssl/utils/Makefile
    team/oej/ami_ssl/utils/ael_main.c

Propchange: team/oej/ami_ssl/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/ami_ssl/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/ami_ssl/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/ami_ssl/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May  2 12:33:37 2006
@@ -1,1 +1,1 @@
-/trunk:1-23298
+/trunk:1-24167

Modified: team/oej/ami_ssl/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/Makefile?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/Makefile (original)
+++ team/oej/ami_ssl/Makefile Tue May  2 12:33:37 2006
@@ -201,8 +201,9 @@
 endif
 
 ASTCFLAGS+=$(MENUSELECT_CFLAGS)
-TOPDIR_CFLAGS=-include include/autoconfig.h
-MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h
+TOPDIR_CFLAGS=-include include/autoconfig.h -Iinclude
+MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
+OTHER_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
 
 #   *CLI> show memory allocations [filename]
 #   *CLI> show memory summary [filename]
@@ -218,7 +219,6 @@
     # You must have GCC 3.4 to use k8, otherwise use athlon
     PROC=k8
     #PROC=athlon
-    OPTIONS+=-m64
   endif
 
   ifeq ($(PROC),sparc64)
@@ -239,9 +239,9 @@
       OPTIONS+=-fsigned-char -mcpu=ep9312
     else
       ifeq ($(SUB_PROC),xscale)
-        OPTIONS+=-fsigned-char -msoft-float -mcpu=xscale
+        OPTIONS+=-fsigned-char -mcpu=xscale
       else
-        OPTIONS+=-fsigned-char -msoft-float 
+        OPTIONS+=-fsigned-char 
       endif
     endif
   endif
@@ -257,7 +257,6 @@
   ID=/usr/xpg4/bin/id
 endif
 
-INCLUDE+=-Iinclude -I../include
 ASTCFLAGS+=-pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) #-DMAKE_VALGRIND_HAPPY
 ASTCFLAGS+=$(OPTIMIZE)
 
@@ -474,10 +473,10 @@
 endif
 
 editline/config.h:
-	cd editline && unset CFLAGS LIBS && ./configure ; \
+	cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
 
 editline/libedit.a:
-	cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
+	cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a:
@@ -554,8 +553,8 @@
 
 subdirs: 
 	for x in $(MOD_SUBDIRS); do CFLAGS="$(ASTCFLAGS) $(MOD_SUBDIR_CFLAGS)" $(MAKE) -C $$x || exit 1 ; done
-	CFLAGS="$(ASTCFLAGS)" $(MAKE) -C utils
-	CFLAGS="$(ASTCFLAGS) -include ../include/autoconfig.h" $(MAKE) -C agi
+	CFLAGS="$(ASTCFLAGS) $(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C utils
+	CFLAGS="$(ASTCFLAGS) $(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C agi
 
 clean-depend:
 	for x in $(SUBDIRS); do $(MAKE) -C $$x clean-depend || exit 1 ; done
@@ -589,7 +588,7 @@
 # improved a lot.  I'll put it here for now.
 	mkdir -p $(DESTDIR)$(ASTDATADIR)/static-http
 	for x in static-http/*; do \
-		install -m 644 $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \
+		$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \
 	done
 	mkdir -p $(DESTDIR)$(ASTDATADIR)/sounds/digits
 	mkdir -p $(DESTDIR)$(ASTDATADIR)/sounds/priv-callerintros
@@ -692,7 +691,6 @@
 		cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
 		chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
 	fi
-	for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
 	$(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
 	$(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
 	if [ -n "$(OLDHEADERS)" ]; then \
@@ -717,37 +715,9 @@
 		echo "You need to do cvs update -d not just cvs update" ; \
 	fi 
 	if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
-	@echo " +---- Asterisk Installation Complete -------+"  
-	@echo " +                                           +"
-	@echo " +    YOU MUST READ THE SECURITY DOCUMENT    +"
-	@echo " +                                           +"
-	@echo " + Asterisk has successfully been installed. +"  
-	@echo " + If you would like to install the sample   +"  
-	@echo " + configuration files (overwriting any      +"
-	@echo " + existing config files), run:              +"  
-	@echo " +                                           +"
-	@echo " +               $(MAKE) samples                +"
-	@echo " +                                           +"
-	@echo " +-----------------  or ---------------------+"
-	@echo " +                                           +"
-	@echo " + You can go ahead and install the asterisk +"
-	@echo " + program documentation now or later run:   +"
-	@echo " +                                           +"
-	@echo " +              $(MAKE) progdocs                +"
-	@echo " +                                           +"
-	@echo " + **Note** This requires that you have      +"
-	@echo " + doxygen installed on your local system    +"
-	@echo " +-------------------------------------------+"
-	@echo " +                                           +"
-	@echo " + AMI can be encrypted or unencrypted. For  +"
-	@echo " + encrypted you can either create your own  +"
-	@echo " + certificate or  use the one provided by   +"
-	@echo " + the asterisk. If you want to create your  +"
-	@echo " + own certificate, please read the ssl.txt  +"
-	@echo " + documentation in the doc directory.       +"
-	@echo " +                                           +"
-	@echo " +-------------------------------------------+"
-	@$(MAKE) -s oldmodcheck
+
+install-subdirs:
+	for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
 
 NEWMODS=$(notdir $(wildcard */*.so))
 OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
@@ -770,10 +740,41 @@
 		echo " WARNING WARNING WARNING" ;\
 	fi
 
-install: all datafiles cert bininstall 
+install: all datafiles cert bininstall install-subdirs
 	@if [ -x /usr/sbin/asterisk-post-install ]; then \
 		/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
 	fi
+	@echo " +---- Asterisk Installation Complete -------+"  
+	@echo " +                                           +"
+	@echo " +    YOU MUST READ THE SECURITY DOCUMENT    +"
+	@echo " +                                           +"
+	@echo " + Asterisk has successfully been installed. +"  
+	@echo " + If you would like to install the sample   +"  
+	@echo " + configuration files (overwriting any      +"
+	@echo " + existing config files), run:              +"  
+	@echo " +                                           +"
+	@echo " +               $(MAKE) samples                +"
+	@echo " +                                           +"
+	@echo " +-----------------  or ---------------------+"
+	@echo " +                                           +"
+	@echo " + You can go ahead and install the asterisk +"
+	@echo " + program documentation now or later run:   +"
+	@echo " +                                           +"
+	@echo " +              $(MAKE) progdocs                +"
+	@echo " +                                           +"
+	@echo " + **Note** This requires that you have      +"
+	@echo " + doxygen installed on your local system    +"
+	@echo " +-------------------------------------------+"
+	@echo " +                                           +"
+	@echo " + AMI can be encrypted or unencrypted. For  +"
+	@echo " + encrypted you can either create your own  +"
+	@echo " + certificate or  use the one provided by   +"
+	@echo " + the asterisk. If you want to create your  +"
+	@echo " + own certificate, please read the ssl.txt  +"
+	@echo " + documentation in the doc directory.       +"
+	@echo " +                                           +"
+	@echo " +-------------------------------------------+"
+	@$(MAKE) -s oldmodcheck
 
 upgrade: all bininstall
 

Modified: team/oej/ami_ssl/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/UPGRADE.txt?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/UPGRADE.txt (original)
+++ team/oej/ami_ssl/UPGRADE.txt Tue May  2 12:33:37 2006
@@ -122,6 +122,11 @@
   option in sip.conf is removed to osp.conf as authpolicy. allowguest option
   in sip.conf cannot be set as osp anymore. 
 
+The Zap channel:
+
+* Support for MFC/R2 has been removed, as it has not been functional for some time
+  and it has no maintainer.
+
 Installation:
 
 * On BSD systems, the installation directories have changed to more "FreeBSDish" directories. On startup, Asterisk will look for the main configuration in /usr/local/etc/asterisk/asterisk.conf

Modified: team/oej/ami_ssl/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/acinclude.m4?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/acinclude.m4 (original)
+++ team/oej/ami_ssl/acinclude.m4 Tue May  2 12:33:37 2006
@@ -19,14 +19,18 @@
 
 PBX_LIB$1=0
 
-if test "${USE_$1}" != "no"; then	
-   AC_CHECK_LIB([$1], [$2], [], [], -L${$1_DIR}/lib $6)
+if test "${USE_$1}" != "no"; then
+   libdir=""
+   if test "x${$1_DIR}" != "x"; then
+      libdir="-L${$1_DIR}/lib"
+   fi
+   AC_CHECK_LIB([$1], [$2], [:], [], ${libdir} $6)
 
    if test "${ac_cv_lib_$1_$2}" = "yes"; then
       $1_LIB="-l$1 $6"
       $4_HEADER_FOUND="1"
       if test "x${$1_DIR}" != "x"; then
-         $1_LIB="-L${$1_DIR}/lib ${$1_LIB}"
+         $1_LIB="${libdir} ${$1_LIB}"
 	 $1_INCLUDE="-I${$1_DIR}/include"
 	 if test "x$3" != "x" ; then
 	    AC_CHECK_HEADER([${$1_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
@@ -68,7 +72,7 @@
 
 
 AC_DEFUN(
-[AST_CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make, GNU_MAKE,
+[AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE,
    GNU_MAKE='Not Found' ;
    for a in make gmake gnumake ; do
       if test -z "$a" ; then continue ; fi ;
@@ -83,4 +87,4 @@
    exit 1
 fi
 AC_SUBST([GNU_MAKE])
-] )
+])

Modified: team/oej/ami_ssl/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/app.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/app.c (original)
+++ team/oej/ami_ssl/app.c Tue May  2 12:33:37 2006
@@ -1042,7 +1042,7 @@
  		test = pbx_builtin_getvar_helper(chan, cat);
 		if (test && !strcasecmp(test, group))
  			count++;
-		ast_mutex_unlock(&chan->lock);
+		ast_channel_unlock(chan);
 	}
 
 	return count;
@@ -1072,7 +1072,7 @@
 		test = pbx_builtin_getvar_helper(chan, cat);
 		if (test && !regexec(&regexbuf, test, 0, NULL, 0))
 			count++;
-		ast_mutex_unlock(&chan->lock);
+		ast_channel_unlock(chan);
 	}
 
 	regfree(&regexbuf);

Modified: team/oej/ami_ssl/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/Makefile?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/Makefile (original)
+++ team/oej/ami_ssl/apps/Makefile Tue May  2 12:33:37 2006
@@ -41,7 +41,7 @@
 	$(CC) $(SOLINK) -o $@ $< $(ZAPTEL_LIB)
 
 app_rpt.o: app_rpt.c
-	$(CC) $(SOLINK) -o $@ $< $(ZAPTEL_INCLUDE) 
+	$(CC) -c -o $@ $(CFLAGS) $(ZAPTEL_INCLUDE) $<
 
 install: all
 	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done

Modified: team/oej/ami_ssl/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_chanspy.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_chanspy.c (original)
+++ team/oej/ami_ssl/apps/app_chanspy.c Tue May  2 12:33:37 2006
@@ -56,7 +56,7 @@
 #define ALL_DONE(u, ret) LOCAL_USER_REMOVE(u); return ret;
 #define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
 
-static const char *synopsis = "Listen to the audio of an active channel\n";
+static const char *synopsis = "Listen to the audio of an active channel";
 static const char *app = "ChanSpy";
 static const char *desc = 
 "  ChanSpy([chanprefix][|options]): This application is used to listen to the\n"

Modified: team/oej/ami_ssl/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_externalivr.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_externalivr.c (original)
+++ team/oej/ami_ssl/apps/app_externalivr.c Tue May  2 12:33:37 2006
@@ -50,6 +50,7 @@
 #include "asterisk/linkedlists.h"
 #include "asterisk/app.h"
 #include "asterisk/utils.h"
+#include "asterisk/options.h"
 
 
 static const char *app = "ExternalIVR";
@@ -315,6 +316,9 @@
 	if (!pid) {
 		/* child process */
 		int i;
+
+		if (ast_opt_high_priority)
+			ast_set_priority(0);
 
 		dup2(child_stdin[0], STDIN_FILENO);
 		dup2(child_stdout[1], STDOUT_FILENO);

Modified: team/oej/ami_ssl/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_festival.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_festival.c (original)
+++ team/oej/ami_ssl/apps/app_festival.c Tue May  2 12:33:37 2006
@@ -55,6 +55,7 @@
 #include "asterisk/config.h"
 #include "asterisk/utils.h"
 #include "asterisk/lock.h"
+#include "asterisk/options.h"
 
 #define FESTIVAL_CONFIG "festival.conf"
 
@@ -140,6 +141,9 @@
                 if (x != fd)
                         close(x);
         }
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
+
 /*IAS */
 #ifdef __PPC__  
 	for( x=0; x<length; x+=2)

Modified: team/oej/ami_ssl/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_ices.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_ices.c (original)
+++ team/oej/ami_ssl/apps/app_ices.c Tue May  2 12:33:37 2006
@@ -46,6 +46,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/options.h"
 
 #define ICES "/usr/bin/ices"
 #define LOCAL_ICES "/usr/local/bin/ices"
@@ -70,6 +71,8 @@
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res)
 		return res;
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
 	dup2(fd, STDIN_FILENO);
 	for (x=STDERR_FILENO + 1;x<256;x++) {
 		if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))

Modified: team/oej/ami_ssl/apps/app_mp3.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_mp3.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_mp3.c (original)
+++ team/oej/ami_ssl/apps/app_mp3.c Tue May  2 12:33:37 2006
@@ -45,6 +45,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/options.h"
 
 #define LOCAL_MPG_123 "/usr/local/bin/mpg123"
 #define MPG_123 "/usr/bin/mpg123"
@@ -71,6 +72,8 @@
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res)
 		return res;
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
 	dup2(fd, STDOUT_FILENO);
 	for (x=0;x<256;x++) {
 		if (x != STDOUT_FILENO)

Modified: team/oej/ami_ssl/apps/app_nbscat.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_nbscat.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_nbscat.c (original)
+++ team/oej/ami_ssl/apps/app_nbscat.c Tue May  2 12:33:37 2006
@@ -46,6 +46,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/options.h"
 
 #define LOCAL_NBSCAT "/usr/local/bin/nbscat8k"
 #define NBSCAT "/usr/bin/nbscat8k"
@@ -75,6 +76,9 @@
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res)
 		return res;
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
+
 	dup2(fd, STDOUT_FILENO);
 	for (x=0;x<256;x++) {
 		if (x != STDOUT_FILENO)

Modified: team/oej/ami_ssl/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_privacy.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_privacy.c (original)
+++ team/oej/ami_ssl/apps/app_privacy.c Tue May  2 12:33:37 2006
@@ -189,13 +189,21 @@
 		}
 		
 		/*Got a number, play sounds and send them on their way*/
-		if ((retries < maxretries) && !res ) {
+		if ((retries < maxretries) && res >= 0 ) {
 			res = ast_streamfile(chan, "privacy-thankyou", chan->language);
 			if (!res)
 				res = ast_waitstream(chan, "");
-			ast_set_callerid (chan, phone, "Privacy Manager", NULL);
-			if (option_verbose > 2)
-				ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s\n",phone);
+
+			ast_set_callerid (chan, phone, "Privacy Manager", NULL); 
+
+			/* Clear the unavailable presence bit so if it came in on PRI
+			 * the caller id will now be passed out to other channels
+			 */
+			chan->cid.cid_pres &= (AST_PRES_UNAVAILABLE ^ 0xFF);
+
+			if (option_verbose > 2) {
+				ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s, callerpres to %d\n",phone,chan->cid.cid_pres);
+			}
 			pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
 		} else {
 			if (priority_jump || ast_opt_priority_jumping)	

Modified: team/oej/ami_ssl/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_speech_utils.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_speech_utils.c (original)
+++ team/oej/ami_ssl/apps/app_speech_utils.c Tue May  2 12:33:37 2006
@@ -168,7 +168,7 @@
 
 static struct ast_custom_function speech_score_function = {
         .name = "SPEECH_SCORE",
-        .synopsis = "Gets the confidence score of a result.\n",
+        .synopsis = "Gets the confidence score of a result.",
         .syntax = "SPEECH_SCORE(result number)",
         .desc =
         "Gets the confidence score of a result.\n",
@@ -194,7 +194,7 @@
 
 static struct ast_custom_function speech_text_function = {
         .name = "SPEECH_TEXT",
-        .synopsis = "Gets the recognized text of a result.\n",
+        .synopsis = "Gets the recognized text of a result.",
         .syntax = "SPEECH_TEXT(result number)",
         .desc =
         "Gets the recognized text of a result.\n",

Modified: team/oej/ami_ssl/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_voicemail.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_voicemail.c (original)
+++ team/oej/ami_ssl/apps/app_voicemail.c Tue May  2 12:33:37 2006
@@ -2565,9 +2565,14 @@
 				ast_log(LOG_WARNING, "Error opening text file for output\n");
 			res = play_record_review(chan, NULL, fn, vmmaxmessage, fmt, 1, vmu, &duration, dir, options->record_gain);
 			if (res == '0') {
-				if (txt) {
+				if (txt && EXISTS(dir,msgnum,fn,chan->language)) {
 					fclose(txt);
 					rename(tmptxtfile, txtfile);
+				} else if (txt && !EXISTS(dir,msgnum,fn,chan->language)) {
+					if (option_debug) 
+						ast_log(LOG_DEBUG, "The recorded media file is gone, so we should remove the .txt file too!\n");
+					fclose(txt);
+					unlink(tmptxtfile);	
 				}
 				goto transfer;
 			}

Modified: team/oej/ami_ssl/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/apps/app_zapras.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/apps/app_zapras.c (original)
+++ team/oej/ami_ssl/apps/app_zapras.c Tue May  2 12:33:37 2006
@@ -99,6 +99,10 @@
 
 	/* Execute RAS on File handles */
 	dup2(chan->fds[0], STDIN_FILENO);
+
+	/* Drop high priority */
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
 
 	/* Close other file descriptors */
 	for (x=STDERR_FILENO + 1;x<1024;x++) 

Modified: team/oej/ami_ssl/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/asterisk.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/asterisk.c (original)
+++ team/oej/ami_ssl/asterisk.c Tue May  2 12:33:37 2006
@@ -111,9 +111,7 @@
 #include "asterisk/enum.h"
 #include "asterisk/rtp.h"
 #include "asterisk/http.h"
-#if defined(T38_SUPPORT)
 #include "asterisk/udptl.h"
-#endif
 #include "asterisk/app.h"
 #include "asterisk/lock.h"
 #include "asterisk/utils.h"
@@ -637,6 +635,8 @@
 	pid = fork();
 
 	if (pid == 0) {
+		if (ast_opt_high_priority)
+			ast_set_priority(0);
 		/* Close file descriptors and launch system command */
 		for (x = STDERR_FILENO + 1; x < 4096; x++)
 			close(x);
@@ -2181,6 +2181,9 @@
 		/* Disable forking (-f at startup) */
 		} else if (!strcasecmp(v->name, "nofork")) {
 			ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_NO_FORK);
+		/* Always fork, even if verbose or debug are enabled (-F at startup) */
+		} else if (!strcasecmp(v->name, "alwaysfork")) {
+			ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_ALWAYS_FORK);
 		/* Run quietly (-q at startup ) */
 		} else if (!strcasecmp(v->name, "quiet")) {
 			ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_QUIET);
@@ -2291,6 +2294,9 @@
 	/* Check for options */
 	while ((c = getopt(argc, argv, "tThfdvVqprRgciInx:U:G:C:L:M:")) != -1) {
 		switch (c) {
+		case 'F':
+			ast_set_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK);
+			break;
 		case 'd':
 			option_debug++;
 			ast_set_flag(&ast_options, AST_OPT_FLAG_NO_FORK);
@@ -2366,6 +2372,11 @@
 		case '?':
 			exit(1);
 		}
+	}
+
+	if (ast_opt_always_fork && (ast_opt_remote || ast_opt_console)) {
+		ast_log(LOG_WARNING, "'alwaysfork' is not compatible with console or remote console mode; ignored\n");
+		ast_clear_flag(&ast_options, AST_OPT_FLAG_ALWAYS_FORK);
 	}
 
 	/* For remote connections, change the name of the remote connection.
@@ -2508,7 +2519,7 @@
 	} else
 		ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", ast_config_AST_PID, strerror(errno));
 
-	if (!option_verbose && !option_debug && !ast_opt_no_fork && !ast_opt_console) {
+	if (ast_opt_always_fork || !ast_opt_no_fork) {
 		daemon(0, 0);
 		/* Blindly re-write pid file since we are forking */
 		unlink(ast_config_AST_PID);
@@ -2582,9 +2593,7 @@
 		exit(1);
 	}
 	ast_rtp_init();
-#if defined(T38_SUPPORT)
 	ast_udptl_init();
-#endif
 	if (ast_image_init()) {
 		printf(term_quit());
 		exit(1);

Modified: team/oej/ami_ssl/build_tools/cflags.xml
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/build_tools/cflags.xml?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/build_tools/cflags.xml (original)
+++ team/oej/ami_ssl/build_tools/cflags.xml Tue May  2 12:33:37 2006
@@ -17,7 +17,4 @@
 		</member>
 		<member name="-DMTX_PROFILE">
 		</member>
-		<member name="-DT38_SUPPORT">
-			<defaultenabled>yes</defaultenabled>
-		</member>
 	</category>

Modified: team/oej/ami_ssl/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/build_tools/menuselect-deps.in?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/build_tools/menuselect-deps.in (original)
+++ team/oej/ami_ssl/build_tools/menuselect-deps.in Tue May  2 12:33:37 2006
@@ -4,7 +4,6 @@
 GTK=@PBX_GTK@
 H323=@PBX_H323@
 KDE=@PBX_KDE@
-LIBMFCR2=@PBX_LIBmfcr2@
 LIBNEWT=@PBX_LIBnewt@
 LIBOSPTK=@PBX_LIBosptk@
 LIBPOPT=@PBX_LIBpopt@

Modified: team/oej/ami_ssl/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/cdr.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/cdr.c (original)
+++ team/oej/ami_ssl/cdr.c Tue May  2 12:33:37 2006
@@ -1087,7 +1087,7 @@
 				batchtime = cfg_time;
 		}
 		if ((end_before_h_value = ast_variable_retrieve(config, "general", "endbeforehexten")))
-			ast_set2_flag(&ast_options, ast_true(end_before_h_value), AST_OPT_END_CDR_BEFORE_H_EXTEN);
+			ast_set2_flag(&ast_options, ast_true(end_before_h_value), AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN);
 	}
 
 	if (enabled && !batchmode) {

Modified: team/oej/ami_ssl/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/cdr/Makefile?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/cdr/Makefile (original)
+++ team/oej/ami_ssl/cdr/Makefile Tue May  2 12:33:37 2006
@@ -20,7 +20,7 @@
 #the default as we now have a better instruction set to work with. - Belgarath
 ifeq ($(PROC),sparc64)
   PROC=ultrasparc
-  CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+  CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
 endif
 
 ifneq ($(TDS_LIB),)

Modified: team/oej/ami_ssl/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/channel.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/channel.c (original)
+++ team/oej/ami_ssl/channel.c Tue May  2 12:33:37 2006
@@ -3330,9 +3330,7 @@
 		    (f->frametype == AST_FRAME_VIDEO) ||
 		    (f->frametype == AST_FRAME_IMAGE) ||
 		    (f->frametype == AST_FRAME_HTML) ||
-#if defined(T38_SUPPORT)
 		    (f->frametype == AST_FRAME_MODEM) ||
-#endif
 		    (f->frametype == AST_FRAME_TEXT)) {
 			/* monitored dtmf causes exit from bridge */
 			int monitored_source = (who == c0) ? watch_c0_dtmf : watch_c1_dtmf;

Modified: team/oej/ami_ssl/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/channels/Makefile?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/channels/Makefile (original)
+++ team/oej/ami_ssl/channels/Makefile Tue May  2 12:33:37 2006
@@ -26,7 +26,7 @@
 
 ifeq ($(PROC),sparc64)
   PROC=ultrasparc
-  CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
+  CFLAGS += -mtune=$(PROC) -pipe -fomit-frame-pointer -mcpu=v8
 endif
 
 ifeq ($(OSARCH),FreeBSD)
@@ -103,21 +103,16 @@
 	./gentone ringtone 440 480
 
 chan_oss.o: chan_oss.c busy.h ringtone.h
+	$(CC) -c -o $@ $(CFLAGS) $(OSSAUDIO_INCLUDE) $<
 
-ifeq ($(OSARCH),OpenBSD)
 chan_oss.so: chan_oss.o
-	$(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
-endif
-ifeq ($(OSARCH),NetBSD)
-chan_oss.so: chan_oss.o
-	$(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
-endif
+	$(CC) $(SOLINK) -o $@ chan_oss.o $(OSSAUDIO_LIB)
 
 chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
 	$(CC) $(SOLINK) -o $@ $< iax2-parser.o iax2-provision.o
 
 chan_zap.so: chan_zap.o
-	$(CC) $(SOLINK) -o $@ $< $(PRI_LIB) $(MFCR2_LIB) $(ZAPTEL_LIB)
+	$(CC) $(SOLINK) -o $@ $< $(PRI_LIB) $(ZAPTEL_LIB)
 
 chan_zap.o: chan_zap.c
 	$(CC) -c -o $@ $(CFLAGS) $(ZAPTEL_INCLUDE) $<

Modified: team/oej/ami_ssl/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/channels/chan_iax2.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/channels/chan_iax2.c (original)
+++ team/oej/ami_ssl/channels/chan_iax2.c Tue May  2 12:33:37 2006
@@ -5062,10 +5062,10 @@
 	}
 	ast_mutex_unlock(&userl.lock);
 	user = best;
-	if (!user && !ast_strlen_zero(iaxs[callno]->username) && (strlen(iaxs[callno]->username) < 128)) {
+	if (!user && !ast_strlen_zero(iaxs[callno]->username)) {
 		user = realtime_user(iaxs[callno]->username);
 		if (user && !ast_strlen_zero(iaxs[callno]->context) &&			/* No context specified */
-			     !apply_context(user->contexts, iaxs[callno]->context)) {			/* Context is permitted */
+		    !apply_context(user->contexts, iaxs[callno]->context)) {		/* Context is permitted */
 			destroy_user(user);
 			user = NULL;
 		}

Modified: team/oej/ami_ssl/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/channels/chan_misdn.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/channels/chan_misdn.c (original)
+++ team/oej/ami_ssl/channels/chan_misdn.c Tue May  2 12:33:37 2006
@@ -182,6 +182,9 @@
 	int addr;
 
 	char context[BUFFERSIZE];
+
+	int zero_read_cnt;
+	int dropped_frame_cnt;
 
 	const struct tone_zone_sound *ts;
 	
@@ -749,7 +752,7 @@
 static int misdn_show_stacks (int fd, int argc, char *argv[])
 {
 	int port;
-	
+
 	ast_cli(fd, "BEGIN STACK_LIST:\n");
 
 	for (port=misdn_cfg_get_next_port(0); port > 0;
@@ -1504,17 +1507,16 @@
 		if ( strcmp(bc->dad,ast->exten)) {
 			ast_copy_string(ast->exten, bc->dad, sizeof(ast->exten));
 		}
-		if ( ast->cid.cid_num && strcmp(ast->cid.cid_num, bc->oad)) {
-			free(ast->cid.cid_num);
-			ast->cid.cid_num=NULL;
-			
-		}
+		
 		if ( !ast->cid.cid_num) {
-			ast->cid.cid_num=strdup(bc->oad);
-		}
-		
-		if ( !ast_strlen_zero(bc->rad) ) 
-			ast->cid.cid_rdnis=strdup(bc->rad);
+			ast_set_callerid(ast, bc->oad, NULL, bc->oad);
+		}
+		
+		if ( !ast_strlen_zero(bc->rad) ) {
+			if (ast->cid.cid_rdnis)
+				free(ast->cid.cid_rdnis);
+			ast->cid.cid_rdnis = strdup(bc->rad);
+		}
 	}
 	return 0;
 }
@@ -2062,10 +2064,20 @@
 	len = misdn_ibuf_usedcount(tmp->bc->astbuf);
 
 	if (!len) {
-		chan_misdn_log(4,tmp->bc->port,"misdn_read: ZERO READ\n");
+		struct ast_frame *frame;
+		if(!tmp->zero_read_cnt)
+			chan_misdn_log(4,tmp->bc->port,"misdn_read: ZERO READ\n");
+		tmp->zero_read_cnt++;
+
+		if (tmp->zero_read_cnt > 5000) {
+			chan_misdn_log(4,tmp->bc->port,"misdn_read: ZERO READ counted > 5000 times\n");
+			tmp->zero_read_cnt=0;
+
+		}
 		tmp->frame.frametype = AST_FRAME_NULL;
 		tmp->frame.subclass = 0;
-		return &tmp->frame;
+		frame=ast_frisolate(&tmp->frame);
+		return frame;
 	}
 
 	/*shrinken len if necessary, we transmit at maximum 4k*/
@@ -2154,7 +2166,16 @@
 		case BCHAN_BRIDGED:
 			break;
 		default:
-		chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) droping: %d frames addr:%x exten:%s cid:%s ch->state:%s\n",frame->samples,ch->bc->addr, ast->exten, ast->cid.cid_num,misdn_get_ch_state( ch));
+		if (!ch->dropped_frame_cnt)
+			chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) droping: %d frames addr:%x exten:%s cid:%s ch->state:%s bc_state:%d\n",frame->samples,ch->bc->addr, ast->exten, ast->cid.cid_num,misdn_get_ch_state( ch), ch->bc->bc_state);
+		
+		ch->dropped_frame_cnt++;
+		if (ch->dropped_frame_cnt > 100) {
+			ch->dropped_frame_cnt=0;
+			chan_misdn_log(5, ch->bc->port, "BC not active (nor bridged) droping: %d frames addr:%x  dropped > 100 frames!\n",frame->samples,ch->bc->addr);
+
+		}
+
 		return 0;
 	}
 	
@@ -2262,10 +2283,6 @@
 			ast_write(c0,f);
 		}
     
-	}
-  
-	if (bridging) {
-		misdn_lib_split_bridge(ch1->bc,ch2->bc);
 	}
   
 	return 0;
@@ -2612,10 +2629,9 @@
 			char *cid_name, *cid_num;
       
 			ast_callerid_parse(callerid, &cid_name, &cid_num);
-			if (cid_name)
-				tmp->cid.cid_name=strdup(cid_name);
-			if (cid_num)
-				tmp->cid.cid_num=strdup(cid_num);
+			ast_set_callerid(tmp, cid_num,cid_name,cid_num);
+		} else {
+			ast_set_callerid(tmp, NULL,NULL,NULL);
 		}
 
 		{

Modified: team/oej/ami_ssl/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/channels/chan_oss.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/channels/chan_oss.c (original)
+++ team/oej/ami_ssl/channels/chan_oss.c Tue May  2 12:33:37 2006
@@ -33,7 +33,7 @@
  */
 
 /*** MODULEINFO
-	<depend>osssound</depend>
+	<depend>ossaudio</depend>
  ***/
 
 #include <stdio.h>

Modified: team/oej/ami_ssl/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/oej/ami_ssl/channels/chan_zap.c?rev=24215&r1=24214&r2=24215&view=diff
==============================================================================
--- team/oej/ami_ssl/channels/chan_zap.c (original)
+++ team/oej/ami_ssl/channels/chan_zap.c Tue May  2 12:33:37 2006
@@ -72,9 +72,6 @@
 #ifndef PRI_KEYPAD_FACILITY_TX
 #error "You need newer libpri"
 #endif
-#endif
-#ifdef HAVE_MFCR2
-#include <libmfcr2.h>
 #endif
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -157,9 +154,6 @@
 #ifdef HAVE_LIBPRI
                " w/PRI"
 #endif
-#ifdef HAVE_MFCR2
-               " w/R2"
-#endif
 ;
 
 static const char config[] = "zapata.conf";
@@ -180,7 +174,6 @@
 #define SIG_FXOGS	ZT_SIG_FXOGS
 #define SIG_FXOKS	ZT_SIG_FXOKS
 #define SIG_PRI		ZT_SIG_CLEAR
-#define SIG_R2		ZT_SIG_CAS
 #define	SIG_SF		ZT_SIG_SF
 #define SIG_SFWINK 	(0x0100000 | ZT_SIG_SF)
 #define SIG_SF_FEATD	(0x0200000 | ZT_SIG_SF)
@@ -399,11 +392,6 @@
 #define DEFAULT_RINGT 				( (8000 * 8) / READ_SIZE)
 
 struct zt_pvt;
-
-
-#ifdef HAVE_MFCR2
-static int r2prot = -1;
-#endif
 
 static int ringt_base = DEFAULT_RINGT;
 
@@ -607,11 +595,6 @@
 	unsigned int progress:1;
 	unsigned int resetting:1;
 	unsigned int setup_ack:1;
-#endif
-#if defined(HAVE_MFCR2)
-	unsigned int hasr2call:1;
-	unsigned int r2blocked:1;
-	unsigned int sigchecked:1;
 #endif
 #ifdef WITH_SMDI
 	unsigned int use_smdi:1;		/* Whether to use SMDI on this channel */
@@ -698,10 +681,6 @@
 	int prioffset;
 	int logicalspan;
 #endif	
-#ifdef HAVE_MFCR2
-	int r2prot;
-	mfcr2_t *r2;
-#endif	
 	int polarity;
 	int dsp_features;
 
@@ -961,15 +940,6 @@
 	return 0;
 }
 
-
-static int zt_setlaw(int zfd, int law)
-{
-	int res;
-	res = ioctl(zfd, ZT_SETLAW, &law);
-	if (res)
-		return res;
-	return 0;
-}
 
 static int alloc_sub(struct zt_pvt *p, int x)
 {
@@ -1129,22 +1099,6 @@
 		return("Dynamically set dialplan in ISDN");
 	}
 	return(pri_plan2str(dialplan));
-}
-#endif
-
-#ifdef HAVE_MFCR2
-static int str2r2prot(char *swtype)
-{
-	 if (!strcasecmp(swtype, "ar"))
-		  return MFCR2_PROT_ARGENTINA;
-	 /*endif*/
-	 if (!strcasecmp(swtype, "cn"))
-		  return MFCR2_PROT_CHINA;
-	 /*endif*/
-	 if (!strcasecmp(swtype, "kr"))
-		  return MFCR2_PROT_KOREA;
-	 /*endif*/
-	 return -1;
 }
 #endif
 
@@ -1186,8 +1140,6 @@
 		return "FXO Kewlstart";
 	case SIG_PRI:
 		return "PRI Signalling";
-	case SIG_R2:
-		return "R2 Signalling";
 	case SIG_SF:
 		return "SF (Tone) Signalling Immediate";
 	case SIG_SFWINK:
@@ -2596,18 +2548,7 @@
 			}
 		}
 #endif
-#ifdef HAVE_MFCR2
-		if (p->sig == SIG_R2) {
-			if (p->hasr2call) {
-				mfcr2_DropCall(p->r2, NULL, UC_NORMAL_CLEARING);
-				p->hasr2call = 0;
-				res = 0;
-			} else
-				res = 0;
-
-		}
-#endif
-		if (p->sig && (p->sig != SIG_PRI) && (p->sig != SIG_R2))
+		if (p->sig && (p->sig != SIG_PRI))
 			res = zt_set_hook(p->subs[SUB_REAL].zfd, ZT_ONHOOK);
 		if (res < 0) {
 			ast_log(LOG_WARNING, "Unable to hangup line %s\n", ast->name);
@@ -2786,13 +2727,6 @@
 		}
 		break;
 #endif
-#ifdef HAVE_MFCR2
-	case SIG_R2:
-		res = mfcr2_AnswerCall(p->r2, NULL);
-		if (res)
-			ast_log(LOG_WARNING, "R2 Answer call failed :( on %s\n", ast->name);
-		break;
-#endif			
 	case 0:
 		ast_mutex_unlock(&p->lock);
 		return 0;
@@ -3499,78 +3433,6 @@
 	return 0;
 }
 
-#ifdef HAVE_MFCR2
-static struct ast_frame *handle_r2_event(struct zt_pvt *p, mfcr2_event_t *e, int index)
-{
-	struct ast_frame *f;
-	f = &p->subs[index].f;
-	if (!p->r2) {
-		ast_log(LOG_WARNING, "Huh?  No R2 structure :(\n");
-		return NULL;
-	}
-	switch(e->e) {
-	case MFCR2_EVENT_BLOCKED:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Channel %d blocked\n", p->channel);
-		break;
-	case MFCR2_EVENT_UNBLOCKED:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Channel %d unblocked\n", p->channel);
-		break;
-	case MFCR2_EVENT_CONFIG_ERR:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Config error on channel %d\n", p->channel);
-		break;
-	case MFCR2_EVENT_RING:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Ring on channel %d\n", p->channel);
-		break;
-	case MFCR2_EVENT_HANGUP:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Hangup on channel %d\n", p->channel);
-		break;
-	case MFCR2_EVENT_RINGING:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Ringing on channel %d\n", p->channel);
-		break;
-	case MFCR2_EVENT_ANSWER:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Answer on channel %d\n", p->channel);
-		break;
-	case MFCR2_EVENT_HANGUP_ACK:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Hangup ACK on channel %d\n", p->channel);
-		break;
-	case MFCR2_EVENT_IDLE:
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Idle on channel %d\n", p->channel);
-		break;
-	default:
-		ast_log(LOG_WARNING, "Unknown MFC/R2 event %d\n", e->e);
-		break;
-	}
-	return f;
-}
-
-static mfcr2_event_t *r2_get_event_bits(struct zt_pvt *p)
-{
-	int x;
-	int res;
-	mfcr2_event_t *e;
-	res = ioctl(p->subs[SUB_REAL].zfd, ZT_GETRXBITS, &x);
-	if (res) {
-		ast_log(LOG_WARNING, "Unable to check received bits\n");

[... 9443 lines stripped ...]


More information about the svn-commits mailing list