[asterisk-commits] branch group/new_loader_completion r37679 - in /team/group/new_loader_complet...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Jul 15 14:40:36 MST 2006


Author: kpfleming
Date: Sat Jul 15 16:40:35 2006
New Revision: 37679

URL: http://svn.digium.com/view/asterisk?rev=37679&view=rev
Log:
first round of updating to trunk

Added:
    team/group/new_loader_completion/Makefile.moddir_rules
      - copied, changed from r37586, trunk/Makefile.moddir_rules
    team/group/new_loader_completion/channels/chan_vpb.cc
      - copied unchanged from r37586, trunk/channels/chan_vpb.cc
    team/group/new_loader_completion/pbx/ael/ael-test/ael-ntest9/
      - copied from r37586, trunk/pbx/ael/ael-test/ael-ntest9/
    team/group/new_loader_completion/pbx/ael/ael-test/ael-ntest9/extensions.ael
      - copied unchanged from r37586, trunk/pbx/ael/ael-test/ael-ntest9/extensions.ael
    team/group/new_loader_completion/pbx/ael/ael-test/ref.ael-ntest9
      - copied unchanged from r37586, trunk/pbx/ael/ael-test/ref.ael-ntest9
    team/group/new_loader_completion/pbx/kdeconsole_main.cc
      - copied unchanged from r37586, trunk/pbx/kdeconsole_main.cc
Removed:
    team/group/new_loader_completion/channels/chan_vpb.c
    team/group/new_loader_completion/codecs/codec_g723_1.c
    team/group/new_loader_completion/codecs/g723_slin_ex.h
    team/group/new_loader_completion/codecs/slin_g723_ex.h
    team/group/new_loader_completion/pbx/pbx_kdeconsole_main.cc
Modified:
    team/group/new_loader_completion/   (props changed)
    team/group/new_loader_completion/Makefile
    team/group/new_loader_completion/UPGRADE.txt
    team/group/new_loader_completion/acinclude.m4
    team/group/new_loader_completion/acl.c
    team/group/new_loader_completion/agi/Makefile
    team/group/new_loader_completion/app.c
    team/group/new_loader_completion/apps/Makefile
    team/group/new_loader_completion/apps/app_dial.c
    team/group/new_loader_completion/apps/app_dumpchan.c
    team/group/new_loader_completion/apps/app_flash.c
    team/group/new_loader_completion/apps/app_ivrdemo.c
    team/group/new_loader_completion/apps/app_meetme.c
    team/group/new_loader_completion/apps/app_osplookup.c
    team/group/new_loader_completion/apps/app_queue.c
    team/group/new_loader_completion/apps/app_rpt.c
    team/group/new_loader_completion/apps/app_skel.c
    team/group/new_loader_completion/apps/app_sms.c
    team/group/new_loader_completion/apps/app_voicemail.c
    team/group/new_loader_completion/apps/app_zapbarge.c
    team/group/new_loader_completion/apps/app_zapras.c
    team/group/new_loader_completion/apps/app_zapscan.c
    team/group/new_loader_completion/asterisk.c
    team/group/new_loader_completion/build_tools/menuselect-deps.in
    team/group/new_loader_completion/build_tools/prep_moduledeps
    team/group/new_loader_completion/cdr/Makefile
    team/group/new_loader_completion/cdr/cdr_radius.c
    team/group/new_loader_completion/channel.c
    team/group/new_loader_completion/channels/   (props changed)
    team/group/new_loader_completion/channels/Makefile
    team/group/new_loader_completion/channels/chan_agent.c
    team/group/new_loader_completion/channels/chan_h323.c
    team/group/new_loader_completion/channels/chan_iax2.c
    team/group/new_loader_completion/channels/chan_jingle.c
    team/group/new_loader_completion/channels/chan_mgcp.c
    team/group/new_loader_completion/channels/chan_misdn.c
    team/group/new_loader_completion/channels/chan_oss.c
    team/group/new_loader_completion/channels/chan_phone.c
    team/group/new_loader_completion/channels/chan_sip.c
    team/group/new_loader_completion/channels/chan_skinny.c
    team/group/new_loader_completion/channels/chan_zap.c
    team/group/new_loader_completion/channels/iax2-parser.c
    team/group/new_loader_completion/channels/iax2-provision.c
    team/group/new_loader_completion/channels/misdn/chan_misdn_config.h
    team/group/new_loader_completion/channels/misdn/isdn_lib.c
    team/group/new_loader_completion/channels/misdn/isdn_lib.h
    team/group/new_loader_completion/channels/misdn_config.c
    team/group/new_loader_completion/codecs/Makefile
    team/group/new_loader_completion/codecs/codec_g726.c
    team/group/new_loader_completion/codecs/codec_gsm.c
    team/group/new_loader_completion/codecs/codec_ilbc.c
    team/group/new_loader_completion/codecs/codec_lpc10.c
    team/group/new_loader_completion/codecs/codec_speex.c
    team/group/new_loader_completion/codecs/codec_zap.c
    team/group/new_loader_completion/codecs/gsm/Makefile
    team/group/new_loader_completion/codecs/gsm/src/preprocess.c
    team/group/new_loader_completion/codecs/ilbc/Makefile
    team/group/new_loader_completion/codecs/lpc10/Makefile
    team/group/new_loader_completion/configs/extconfig.conf.sample
    team/group/new_loader_completion/configs/iax.conf.sample
    team/group/new_loader_completion/configs/misdn.conf.sample
    team/group/new_loader_completion/configs/modules.conf.sample
    team/group/new_loader_completion/configs/sip.conf.sample
    team/group/new_loader_completion/configs/zapata.conf.sample
    team/group/new_loader_completion/configure
    team/group/new_loader_completion/configure.ac
    team/group/new_loader_completion/contrib/init.d/rc.mandrake.zaptel
    team/group/new_loader_completion/db1-ast/Makefile
    team/group/new_loader_completion/devicestate.c
    team/group/new_loader_completion/dns.c
    team/group/new_loader_completion/doc/enum.txt
    team/group/new_loader_completion/doc/misdn.txt
    team/group/new_loader_completion/dsp.c
    team/group/new_loader_completion/enum.c
    team/group/new_loader_completion/formats/Makefile
    team/group/new_loader_completion/formats/format_ogg_vorbis.c
    team/group/new_loader_completion/formats/format_wav_gsm.c
    team/group/new_loader_completion/frame.c
    team/group/new_loader_completion/funcs/Makefile
    team/group/new_loader_completion/funcs/func_db.c
    team/group/new_loader_completion/funcs/func_strings.c
    team/group/new_loader_completion/http.c
    team/group/new_loader_completion/include/asterisk/autoconfig.h.in
    team/group/new_loader_completion/include/asterisk/devicestate.h
    team/group/new_loader_completion/include/asterisk/dns.h
    team/group/new_loader_completion/include/asterisk/frame.h
    team/group/new_loader_completion/include/asterisk/pbx.h
    team/group/new_loader_completion/include/asterisk/rtp.h
    team/group/new_loader_completion/makeopts.in
    team/group/new_loader_completion/manager.c
    team/group/new_loader_completion/pbx.c
    team/group/new_loader_completion/pbx/Makefile
    team/group/new_loader_completion/pbx/ael/ael-test/runtests
    team/group/new_loader_completion/pbx/ael/ael.flex
    team/group/new_loader_completion/pbx/ael/ael_lex.c
    team/group/new_loader_completion/pbx/pbx_config.c
    team/group/new_loader_completion/pbx/pbx_kdeconsole.cc
    team/group/new_loader_completion/plc.c
    team/group/new_loader_completion/res/Makefile
    team/group/new_loader_completion/res/res_adsi.c
    team/group/new_loader_completion/res/res_agi.c
    team/group/new_loader_completion/res/res_jabber.c
    team/group/new_loader_completion/res/res_musiconhold.c
    team/group/new_loader_completion/rtp.c
    team/group/new_loader_completion/say.c
    team/group/new_loader_completion/sched.c
    team/group/new_loader_completion/sha1.c
    team/group/new_loader_completion/slinfactory.c
    team/group/new_loader_completion/srv.c
    team/group/new_loader_completion/tdd.c
    team/group/new_loader_completion/translate.c
    team/group/new_loader_completion/udptl.c
    team/group/new_loader_completion/ulaw.c
    team/group/new_loader_completion/utils.c
    team/group/new_loader_completion/utils/Makefile
    team/group/new_loader_completion/utils/smsq.c

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jul 15 16:40:35 2006
@@ -21,3 +21,4 @@
 config.log
 makeopts.xml
 autom4te.cache
+muted

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Jul 15 16:40:35 2006
@@ -1,1 +1,1 @@
-/trunk:1-36580
+/trunk:1-37595

Modified: team/group/new_loader_completion/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/Makefile?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/Makefile (original)
+++ team/group/new_loader_completion/Makefile Sat Jul 15 16:40:35 2006
@@ -13,6 +13,9 @@
 
 .EXPORT_ALL_VARIABLES:
 
+#Uncomment this to see all build commands instead of 'quiet' output
+#NOISY_BUILD=yes
+
 # Create OPTIONS variable
 OPTIONS=
 
@@ -25,14 +28,14 @@
 #SUB_PROC=xscale # or maverick
 
 ifeq ($(CROSS_COMPILE),)
-  OSARCH=$(shell uname -s)
-  PROC?=$(shell uname -m)
+  OSARCH:=$(shell uname -s)
+  PROC?:=$(shell uname -m)
 else
   OSARCH=$(CROSS_ARCH)
   PROC=$(CROSS_PROC)
 endif
 
-PWD=$(shell pwd)
+ASTTOPDIR:=$(shell pwd)
 
 # Remember the MAKELEVEL at the top
 MAKETOPLEVEL?=$(MAKELEVEL)
@@ -218,9 +221,6 @@
   ASTCFLAGS+=-Werror -Wunused
 endif
 
-ifeq ($(shell gcc -v 2>&1 | grep 'gcc version' | cut -f3 -d' ' | cut -f1 -d.),4)
-ASTCFLAGS+=-Wno-pointer-sign
-endif
 ASTOBJ=-o asterisk
 
 ifeq ($(findstring BSD,$(OSARCH)),BSD)
@@ -366,6 +366,8 @@
   HAVEDOT=no
 endif
 
+include Makefile.rules
+
 _all: all
 	@echo " +--------- Asterisk Build Complete ---------+"  
 	@echo " + Asterisk has successfully been built, but +"  
@@ -484,16 +486,17 @@
 channel.o: CFLAGS+=$(ZAPTEL_INCLUDE)
 
 asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a $(OBJS)
-	build_tools/make_build_h > include/asterisk/build.h.tmp
-	if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
+	@build_tools/make_build_h > include/asterisk/build.h.tmp
+	@if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
 		mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
 	fi
-	rm -f include/asterisk/build.h.tmp
-	$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
-	$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(LIBS)
+	@rm -f include/asterisk/build.h.tmp
+	@$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
+	@echo "   [LD] $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.1 $(LIBS) -> $@"
+	@$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a $(LIBS)
 
 muted: muted.o
-	$(CC) $(AUDIO_LIBS) -o muted muted.o
+muted: LDFLAGS+=$(AUDIO_LIBS)
 
 $(SUBDIRS_CLEAN_DEPEND):
 	@$(MAKE) -C $(@:-clean-depend=) clean-depend
@@ -886,13 +889,13 @@
 	- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
 menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a
-	@CFLAGS="-include $(PWD)/include/asterisk/autoconfig.h -I$(PWD)/include" PARENTSRC="$(PWD)" $(MAKE) -C menuselect menuselect
+	@CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect menuselect
 
 mxml/libmxml.a:
 	@cd mxml && unset CFLAGS LIBS && test -f config.h || ./configure
 	$(MAKE) -C mxml libmxml.a
 
-makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(dir)/*.c) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml
+makeopts.xml: $(foreach dir,$(MOD_SUBDIRS),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml
 	@echo "Generating list of available modules ..."
 	@build_tools/prep_moduledeps > $@
 

Copied: team/group/new_loader_completion/Makefile.moddir_rules (from r37586, trunk/Makefile.moddir_rules)
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/Makefile.moddir_rules?p2=team/group/new_loader_completion/Makefile.moddir_rules&p1=trunk/Makefile.moddir_rules&r1=37586&r2=37679&rev=37679&view=diff
==============================================================================
--- trunk/Makefile.moddir_rules (original)
+++ team/group/new_loader_completion/Makefile.moddir_rules Sat Jul 15 16:40:35 2006
@@ -15,12 +15,12 @@
 
 define module_o_c_template
 $(1).o: $(1).c
-$(1).o: CFLAGS+=$$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
+$(1).o: CFLAGS+=-DAST_MODULE=\"$(1)\" $$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
 endef
 
 define module_oo_cc_template
 $(1).oo: $(1).cc
-$(1).oo: CFLAGS+=$$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
+$(1).oo: CFLAGS+=-DAST_MODULE=\"$(1)\" $$(MENUSELECT_OPTS_$(1):%=-D%) $(foreach dep,$(MENUSELECT_DEPENDS_$(1)),$$(value $(dep)_INCLUDE))
 endef
 
 define module_so_o_template

Modified: team/group/new_loader_completion/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/UPGRADE.txt?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/UPGRADE.txt (original)
+++ team/group/new_loader_completion/UPGRADE.txt Sat Jul 15 16:40:35 2006
@@ -285,6 +285,23 @@
 * Support for MFC/R2 has been removed, as it has not been functional for some
   time and it has no maintainer.
 
+The G726-32 codec:
+
+* It has been determined that previous versions of Asterisk used the wrong codeword
+  packing order for G726-32 data. This version supports both available packing orders,
+  and can transcode between them. It also now selects the proper order when
+  negotiating with a SIP peer based on the codec name supplied in the SDP. However,
+  there are existing devices that improperly request one order and then use another;
+  Sipura and Grandstream ATAs are known to do this, and there may be others. To
+  be able to continue to use these devices with this version of Asterisk and the
+  G726-32 codec, a configuration parameter called 'g726nonstandard' has been added
+  to sip.conf, so that Asterisk can use the packing order expected by the device (even
+  though it requested a different order). In addition, the internal format number for
+  G726-32 has been changed, and the old number is now assigned to AAL2-G726-32. The
+  result of this is that this version of Asterisk will be able to interoperate over
+  IAX2 with older versions of Asterisk, as long as this version is told to allow
+  'g726aal2' instead of 'g726' as the codec for the call.
+
 Installation:
 
 * On BSD systems, the installation directories have changed to more "FreeBSDish"

Modified: team/group/new_loader_completion/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/acinclude.m4?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/acinclude.m4 (original)
+++ team/group/new_loader_completion/acinclude.m4 Sat Jul 15 16:40:35 2006
@@ -1,73 +1,83 @@
-# AST_EXT_LIB([NAME], [FUNCTION], [package header], [package symbol name], [package friendly name], [additional LIB data])
+# AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
 
-AC_DEFUN([AST_EXT_LIB],
+AC_DEFUN([AST_EXT_LIB_SETUP],
 [
-AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH],[use $5 files in PATH]),[
+$1_DESCRIP="$2"
+$1_OPTION="$3"
+AC_ARG_WITH([$3], AC_HELP_STRING([--with-$3=PATH],[use $2 files in PATH $4]),[
 case ${withval} in
      n|no)
-     USE_$4=no
+     USE_$1=no
      ;;
      y|ye|yes)
-     $4_MANDATORY="yes"
+     $1_MANDATORY="yes"
      ;;
      *)
-     $4_DIR="${withval}"
-     $4_MANDATORY="yes"
+     $1_DIR="${withval}"
+     $1_MANDATORY="yes"
      ;;
 esac
 ])
+PBX_$1=0
+AC_SUBST([$1_LIB])
+AC_SUBST([$1_INCLUDE])
+AC_SUBST([PBX_$1])
+])
 
-PBX_LIB$4=0
+# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data])
 
-if test "${USE_$4}" != "no"; then
+AC_DEFUN([AST_EXT_LIB_CHECK],
+[
+if test "${USE_$1}" != "no"; then
    pbxlibdir=""
-   if test "x${$4_DIR}" != "x"; then
-      pbxlibdir="-L${$1_DIR}/lib"
+   if test "x${$1_DIR}" != "x"; then
+      if test -d ${$1_DIR}/lib; then
+      	 pbxlibdir="-L${$1_DIR}/lib"
+      else
+      	 pbxlibdir="-L${$1_DIR}"
+      fi
    fi
-   AC_CHECK_LIB([$1], [$2], [AST_$4_FOUND=yes], [AST_$4_FOUND=no], ${pbxlibdir} $6)
+   AC_CHECK_LIB([$2], [$3], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
 
-   if test "${AST_$4_FOUND}" = "yes"; then
-      $4_LIB="-l$1 $6"
-      $4_HEADER_FOUND="1"
-      if test "x${$4_DIR}" != "x"; then
-         $4_LIB="${pbxlibdir} ${$4_LIB}"
-	 $4_INCLUDE="-I${$4_DIR}/include"
-	 if test "x$3" != "x" ; then
-	    AC_CHECK_HEADER([${$4_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+   if test "${AST_$1_FOUND}" = "yes"; then
+      $1_LIB="-l$2 $5"
+      $1_HEADER_FOUND="1"
+      if test "x${$1_DIR}" != "x"; then
+         $1_LIB="${pbxlibdir} ${$1_LIB}"
+	 $1_INCLUDE="-I${$1_DIR}/include"
+	 if test "x$4" != "x" ; then
+	    AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
 	 fi
       else
-	 if test "x$3" != "x" ; then
-            AC_CHECK_HEADER([$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+	 if test "x$4" != "x" ; then
+            AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
 	 fi
       fi
-      if test "x${$4_HEADER_FOUND}" = "x0" ; then
-         if test ! -z "${$4_MANDATORY}" ;
+      if test "x${$1_HEADER_FOUND}" = "x0" ; then
+         if test ! -z "${$1_MANDATORY}" ;
          then
             echo " ***"
-            echo " *** It appears that you do not have the $1 development package installed."
-            echo " *** Please install it to include $5 support, or re-run configure"
-            echo " *** without explicitly specifying --with-$1"
+            echo " *** It appears that you do not have the $2 development package installed."
+            echo " *** Please install it to include ${$1_DESCRIP} support, or re-run configure"
+            echo " *** without explicitly specifying --with-${$1_OPTION}"
             exit 1
          fi
-         $4_LIB=""
-         $4_INCLUDE=""
-         PBX_LIB$4=0
+         $1_LIB=""
+         $1_INCLUDE=""
+         PBX_$1=0
       else
-         PBX_LIB$4=1
-         AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library])
+         PBX_$1=1
+         AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to indicate the ${$1_DESCRIP} library])
       fi
-   elif test ! -z "${$4_MANDATORY}";
+   elif test ! -z "${$1_MANDATORY}";
    then
       echo "***"
-      echo "*** The $5 installation on this system appears to be broken."
+      echo "*** The ${$1_DESCRIP} installation on this system appears to be broken."
       echo "*** Either correct the installation, or run configure"
-      echo "*** without explicity specifying --with-$1"
+      echo "*** without explicitly specifying --with-${$1_OPTION}"
       exit 1
    fi
 fi
-AC_SUBST([$4_LIB])
-AC_SUBST([$4_INCLUDE])
-AC_SUBST([PBX_LIB$4])
 ])
 
 

Modified: team/group/new_loader_completion/acl.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/acl.c?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/acl.c (original)
+++ team/group/new_loader_completion/acl.c Sat Jul 15 16:40:35 2006
@@ -90,7 +90,7 @@
 void ast_free_ha(struct ast_ha *ha)
 {
 	struct ast_ha *hal;
-	while(ha) {
+	while (ha) {
 		hal = ha;
 		ha = ha->next;
 		free(hal);
@@ -122,9 +122,9 @@
 /*  Used in chan_sip2 templates */
 struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
 {
-	struct ast_ha *start=original;
+	struct ast_ha *start = original;
 	struct ast_ha *ret = NULL;
-	struct ast_ha *link,*prev=NULL;
+	struct ast_ha *link, *prev = NULL;
 
 	while (start) {
 		link = ast_duplicate_ha(start);  /* Create copy of this object */
@@ -167,7 +167,7 @@
 		if (!strchr(nm, '.')) {
 			if ((sscanf(nm, "%d", &x) == 1) && (x >= 0) && (x <= 32)) {
 				y = 0;
-				for (z=0;z<x;z++) {
+				for (z = 0; z < x; z++) {
 					y >>= 1;
 					y |= 0x80000000;
 				}
@@ -423,3 +423,4 @@
 		return 0;
 	return -1;
 }
+

Modified: team/group/new_loader_completion/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/agi/Makefile?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/agi/Makefile (original)
+++ team/group/new_loader_completion/agi/Makefile Sat Jul 15 16:40:35 2006
@@ -15,12 +15,17 @@
 
 AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
 
-LIBS=
 ifeq ($(OSARCH),SunOS)
-  LIBS=-lsocket -lnsl ../strcompat.o
+  LDFLAGS+=-lsocket -lnsl ../strcompat.o
 endif
 
+include $(ASTTOPDIR)/Makefile.rules
+
 all: $(AGIS)
+
+eagi-test: eagi-test.o
+
+eagi-sphinx-test: eagi-sphinx-test.o
 
 install: all
 	mkdir -p $(DESTDIR)$(AGI_DIR)
@@ -29,20 +34,11 @@
 uninstall:
 	for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done
 
-eagi-test: eagi-test.o
-	$(CC) $(CFLAGS) -include ../include/autoconfig.h -o eagi-test eagi-test.o $(LIBS)
-
-eagi-sphinx-test: eagi-sphinx-test.o
-	$(CC) $(CFLAGS) -include ../include/autoconfig.h -o eagi-sphinx-test eagi-sphinx-test.o $(LIBS) 
-
 clean-depend:
 	rm -f .depend
 
 clean: clean-depend
 	rm -f *.so *.o look eagi-test eagi-sphinx-test
-
-%.so : %.o
-	$(CC) -shared -Xlinker -x -o $@ $^
 
 ifneq ($(wildcard .depend),)
 include .depend

Modified: team/group/new_loader_completion/app.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/app.c?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/app.c (original)
+++ team/group/new_loader_completion/app.c Sat Jul 15 16:40:35 2006
@@ -65,12 +65,12 @@
 	struct tone_zone_sound *ts;
 	int res=0, x=0;
 
-	if(maxlen > size)
+	if (maxlen > size)
 		maxlen = size;
 	
-	if(!timeout && chan->pbx)
+	if (!timeout && chan->pbx)
 		timeout = chan->pbx->dtimeout;
-	else if(!timeout)
+	else if (!timeout)
 		timeout = 5;
 	
 	ts = ast_get_indication_tone(chan->zone,"dial");
@@ -99,8 +99,6 @@
 	return res;
 }
 
-
-
 /*! \param timeout set timeout to 0 for "standard" timeouts. Set timeout to -1 for 
    "ludicrous time" (essentially never times out) */
 int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout)
@@ -128,7 +126,7 @@
 
 int ast_app_getdata_full(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout, int audiofd, int ctrlfd)
 {
-	int res,to,fto;
+	int res, to, fto;
 	if (prompt) {
 		res = ast_streamfile(c, prompt, c->language);
 		if (res < 0)
@@ -538,7 +536,7 @@
 
 	stringp = fmts;
 	strsep(&stringp, "|");
-	ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
+	ast_log(LOG_DEBUG, "Recording Formats: sfmts=%s\n", fmts);
 	sfmt[0] = ast_strdupa(fmts);
 
 	while ((fmt = strsep(&stringp, "|"))) {
@@ -555,9 +553,8 @@
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "x=%d, open writing:  %s format: %s, %p\n", x, prepend ? prependfile : recordfile, sfmt[x], others[x]);
 
-		if (!others[x]) {
+		if (!others[x])
 			break;
-		}
 	}
 
 	if (path)
@@ -705,7 +702,7 @@
 			if (!others[x])
 				break;
 			if (res > 0)
-				ast_stream_rewind(others[x], totalsilence ? totalsilence-200 : 200);
+				ast_stream_rewind(others[x], totalsilence ? totalsilence - 200 : 200);
 			ast_truncstream(others[x]);
 			ast_closestream(others[x]);
 		}
@@ -720,7 +717,7 @@
 			realfiles[x] = ast_readfile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0);
 			if (!others[x] || !realfiles[x])
 				break;
-			ast_stream_rewind(others[x], totalsilence ? totalsilence-200 : 200);
+			ast_stream_rewind(others[x], totalsilence ? totalsilence - 200 : 200);
 			ast_truncstream(others[x]);
 			/* add the original file too */
 			while ((fr = ast_readframe(realfiles[x]))) {
@@ -925,7 +922,7 @@
 	snprintf(fs, strlen(path) + 19, "%s/.lock-%08lx", path, ast_random());
 	fd = open(fs, O_WRONLY | O_CREAT | O_EXCL, 0600);
 	if (fd < 0) {
-		fprintf(stderr, "Unable to create lock file '%s': %s\n", path, strerror(errno));
+		ast_log(LOG_ERROR, "Unable to create lock file '%s': %s\n", path, strerror(errno));
 		return AST_LOCK_PATH_NOT_FOUND;
 	}
 	close(fd);
@@ -934,11 +931,13 @@
 	start = time(NULL);
 	while (((res = link(fs, s)) < 0) && (errno == EEXIST) && (time(NULL) - start < 5))
 		usleep(1);
+
+	unlink(fs);
+
 	if (res) {
 		ast_log(LOG_WARNING, "Failed to lock path '%s': %s\n", path, strerror(errno));
 		return AST_LOCK_TIMEOUT;
 	} else {
-		unlink(fs);
 		ast_log(LOG_DEBUG, "Locked path '%s'\n", path);
 		return AST_LOCK_SUCCESS;
 	}
@@ -947,11 +946,21 @@
 int ast_unlock_path(const char *path)
 {
 	char *s;
-	if (!(s = alloca(strlen(path) + 10)))
+	int res;
+
+	if (!(s = alloca(strlen(path) + 10))) {
+		ast_log(LOG_WARNING, "Out of memory!\n");
 		return -1;
+	}
+
 	snprintf(s, strlen(path) + 9, "%s/%s", path, ".lock");
-	ast_log(LOG_DEBUG, "Unlocked path '%s'\n", path);
-	return unlink(s);
+
+	if ((res = unlink(s)))
+		ast_log(LOG_ERROR, "Could not unlock path '%s': %s\n", path, strerror(errno));
+	else
+		ast_log(LOG_DEBUG, "Unlocked path '%s'\n", path);
+
+	return res;
 }
 
 int ast_record_review(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, const char *path) 
@@ -1056,6 +1065,7 @@
 #define RES_RESTART ((1 << 19) | RES_REPEAT)
 
 static int ast_ivr_menu_run_internal(struct ast_channel *chan, struct ast_ivr_menu *menu, void *cbdata);
+
 static int ivr_dispatch(struct ast_channel *chan, struct ast_ivr_option *option, char *exten, void *cbdata)
 {
 	int res;
@@ -1127,7 +1137,7 @@
 static int option_exists(struct ast_ivr_menu *menu, char *option)
 {
 	int x;
-	for (x=0;menu->options[x].option;x++)
+	for (x = 0; menu->options[x].option; x++)
 		if (!strcasecmp(menu->options[x].option, option))
 			return x;
 	return -1;
@@ -1136,7 +1146,7 @@
 static int option_matchmore(struct ast_ivr_menu *menu, char *option)
 {
 	int x;
-	for (x=0;menu->options[x].option;x++)
+	for (x = 0; menu->options[x].option; x++)
 		if ((!strncasecmp(menu->options[x].option, option, strlen(option))) && 
 				(menu->options[x].option[strlen(option)]))
 			return x;
@@ -1147,7 +1157,7 @@
 {
 	int res=0;
 	int ms;
-	while(option_matchmore(menu, exten)) {
+	while (option_matchmore(menu, exten)) {
 		ms = chan->pbx ? chan->pbx->dtimeout : 5000;
 		if (strlen(exten) >= maxexten - 1) 
 			break;
@@ -1202,7 +1212,7 @@
 						else if (option_exists(menu, "s") > -1)
 							strcpy(exten, "s");
 					}
-					pos=0;
+					pos = 0;
 					continue;
 				} else if (res && strchr(AST_DIGIT_ANY, res)) {
 					ast_log(LOG_DEBUG, "Got start of extension, %c\n", res);
@@ -1242,26 +1252,23 @@
 
 int ast_ivr_menu_run(struct ast_channel *chan, struct ast_ivr_menu *menu, void *cbdata)
 {
-	int res;
-	res = ast_ivr_menu_run_internal(chan, menu, cbdata);
+	int res = ast_ivr_menu_run_internal(chan, menu, cbdata);
 	/* Hide internal coding */
-	if (res > 0)
-		res = 0;
-	return res;
+	return res > 0 ? 0 : res;
 }
 	
 char *ast_read_textfile(const char *filename)
 {
 	int fd;
-	char *output=NULL;
+	char *output = NULL;
 	struct stat filesize;
-	int count=0;
+	int count = 0;
 	int res;
-	if(stat(filename,&filesize)== -1){
-		ast_log(LOG_WARNING,"Error can't stat %s\n", filename);
+	if (stat(filename, &filesize) == -1) {
+		ast_log(LOG_WARNING, "Error can't stat %s\n", filename);
 		return NULL;
 	}
-	count=filesize.st_size + 1;
+	count = filesize.st_size + 1;
 	fd = open(filename, O_RDONLY);
 	if (fd < 0) {
 		ast_log(LOG_WARNING, "Cannot open file '%s' for reading: %s\n", filename, strerror(errno));
@@ -1272,7 +1279,7 @@
 		if (res == count - 1) {
 			output[res] = '\0';
 		} else {
-			ast_log(LOG_WARNING, "Short read of %s (%d of %d): %s\n", filename, res, count -  1, strerror(errno));
+			ast_log(LOG_WARNING, "Short read of %s (%d of %d): %s\n", filename, res, count - 1, strerror(errno));
 			free(output);
 			output = NULL;
 		}
@@ -1318,3 +1325,4 @@
 
 	return res;
 }
+

Modified: team/group/new_loader_completion/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/Makefile?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/Makefile (original)
+++ team/group/new_loader_completion/apps/Makefile Sat Jul 15 16:40:35 2006
@@ -16,13 +16,19 @@
 
 SELECTED_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
 
-MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE) $(MENUSELECT_DEPENDS_EXTENDED_ODBC_STORAGE)
+ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
+MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
+endif
+ifneq ($(findstring EXTENDED_ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
+MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_EXTENDED_ODBC_STORAGE)
+endif
+ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
+MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
+endif
 
 all: _all
 
-$(foreach mod,$(SELECTED_MODS),$(mod).o): CFLAGS+=-DAST_MODULE=\"$(@:%.o=%)\"
-
-include ../Makefile.rules
+include $(ASTTOPDIR)/Makefile.moddir_rules
 
 ifeq (SunOS,$(shell uname))
 app_chanspy.so: app_chanspy.o

Modified: team/group/new_loader_completion/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_dial.c?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_dial.c (original)
+++ team/group/new_loader_completion/apps/app_dial.c Sat Jul 15 16:40:35 2006
@@ -727,10 +727,13 @@
 				if (ast_write(outgoing->chan, f))
 					ast_log(LOG_WARNING, "Unable to forward voice\n");
 			}
-			if (single && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_VIDUPDATE)) {
+			if (single && (f->frametype == AST_FRAME_CONTROL) && 
+				((f->subclass == AST_CONTROL_HOLD) || 
+				 (f->subclass == AST_CONTROL_UNHOLD) || 
+				 (f->subclass == AST_CONTROL_VIDUPDATE))) {
 				if (option_verbose > 2)
-					ast_verbose(VERBOSE_PREFIX_3 "%s requested a video update, passing it to %s\n", in->name,outgoing->chan->name);
-				ast_indicate(outgoing->chan, AST_CONTROL_VIDUPDATE);
+					ast_verbose(VERBOSE_PREFIX_3 "%s requested special control %d, passing it to %s\n", in->name, f->subclass, outgoing->chan->name);
+				ast_indicate_data(outgoing->chan, f->subclass, f->data, f->datalen);
 			}
 			ast_frfree(f);
 		}

Modified: team/group/new_loader_completion/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_dumpchan.c?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_dumpchan.c (original)
+++ team/group/new_loader_completion/apps/app_dumpchan.c Sat Jul 15 16:40:35 2006
@@ -85,6 +85,7 @@
 			 "CallerID=           %s\n"
 			 "CallerIDName=       %s\n"
 			 "DNIDDigits=         %s\n"
+			 "RDNIS=              %s\n" 
 			 "State=              %s (%d)\n"
 			 "Rings=              %d\n"
 			 "NativeFormat=       %s\n"
@@ -106,9 +107,10 @@
 			 c->name,
 			 c->tech->type,
 			 c->uniqueid,
-			 (c->cid.cid_num ? c->cid.cid_num : "(N/A)"),
-			 (c->cid.cid_name ? c->cid.cid_name : "(N/A)"),
-			 (c->cid.cid_dnid ? c->cid.cid_dnid : "(N/A)" ),
+			 S_OR(c->cid.cid_num, "(N/A)"),
+			 S_OR(c->cid.cid_name, "(N/A)"),
+			 S_OR(c->cid.cid_dnid, "(N/A)"),
+			 S_OR(c->cid.cid_rdnis, "(N/A)"),
 			 ast_state2str(c->_state),
 			 c->_state,
 			 c->rings,

Modified: team/group/new_loader_completion/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_flash.c?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_flash.c (original)
+++ team/group/new_loader_completion/apps/app_flash.c Sat Jul 15 16:40:35 2006
@@ -38,7 +38,7 @@
 #include <string.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <zaptel.h>
+#include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"

Modified: team/group/new_loader_completion/apps/app_ivrdemo.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_ivrdemo.c?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_ivrdemo.c (original)
+++ team/group/new_loader_completion/apps/app_ivrdemo.c Sat Jul 15 16:40:35 2006
@@ -129,14 +129,4 @@
 	return ast_register_application(app, skel_exec, tdesc, synopsis);
 }
 
-static const char *description(void)
-{
-	return tdesc;
-}
-
-static const char *key(void)
-{
-	return ASTERISK_GPL_KEY;
-}
-
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "IVR Demo Application");

Modified: team/group/new_loader_completion/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_meetme.c?rev=37679&r1=37678&r2=37679&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_meetme.c (original)
+++ team/group/new_loader_completion/apps/app_meetme.c Sat Jul 15 16:40:35 2006
@@ -39,7 +39,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <zaptel.h>
+#include <zaptel/zaptel.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
@@ -58,6 +58,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/translate.h"
 #include "asterisk/ulaw.h"
+#include "asterisk/astobj.h"
 #include "asterisk/devicestate.h"
 
 #include "enter.h"
@@ -142,11 +143,17 @@
 	/*! If set, won't speak the extra prompt when the first person 
 	 *  enters the conference */
 	CONFFLAG_NOONLYPERSON = (1 << 22),
-	CONFFLAG_INTROUSERNOREVIEW = (1 << 23),
 	/*! If set, user will be asked to record name on entry of conference 
 	 *  without review */
-	CONFFLAG_STARTMUTED = (1 << 24)
+	CONFFLAG_INTROUSERNOREVIEW = (1 << 23),
 	/*! If set, the user will be initially self-muted */
+	CONFFLAG_STARTMUTED = (1 << 24),
+	/*! If set, the user is a shared line appearance station */
+	CONFFLAG_SLA_STATION = (1 << 25),
+	/*! If set, the user is a shared line appearance trunk */
+	CONFFLAG_SLA_TRUNK = (1 << 26),
+	/*! If set, the user has put us on hold */
+	CONFFLAG_HOLD = (1 << 27)
 };
 
 AST_APP_OPTIONS(meetme_opts, {
@@ -177,13 +184,20 @@
 	AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ),
 });
 
+AST_APP_OPTIONS(sla_opts, {
+	/* Just a placeholder for now */
+});
 static const char *app = "MeetMe";
 static const char *app2 = "MeetMeCount";
 static const char *app3 = "MeetMeAdmin";
+static const char *appslas = "SLAS";
+static const char *appslat = "SLAT";
 
 static const char *synopsis = "MeetMe conference bridge";
 static const char *synopsis2 = "MeetMe participant count";
 static const char *synopsis3 = "MeetMe conference Administration";
+static const char *synopslas = "Shared Line Appearance - Station";
+static const char *synopslat = "Shared Line Appearance - Trunk";
 
 static const char *descrip =
 "  MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe\n"
@@ -261,6 +275,22 @@
 "      'V' -- Raise entire conference listening volume\n"
 "";
 
+static const char *descripslas =
+"  SLAS(sla[,options]): Run Shared Line Appearance for station\n"
+"Runs the share line appearance for a station calling in.  If there are no\n"
+"other participants in the conference, the trunk is called and is dumped into\n"
+"the bridge.\n";
+
+static const char *descripslat =
+"  SLAT(sla[,options]): Run Shared Line Appearance for trunk\n"
+"Runs the share line appearance for a trunk calling in.  If there are no\n"
+"other participants in the conference, all member stations are invited into\n"
+"the bridge.\n";
+
+#define CONFIG_FILE_NAME "meetme.conf"
+#define CONFIG_FILE_NAME_SLA "sla.conf"
+
+/*! \brief The MeetMe Conference object */
 struct ast_conference {
 	ast_mutex_t playlock;                   /*!< Conference specific lock (players) */
 	ast_mutex_t listenlock;                 /*!< Conference specific lock (listeners) */
@@ -304,13 +334,44 @@
 	int talking;                            /*!< Is user talking */
 	int zapchannel;                         /*!< Is a Zaptel channel */
 	char usrvalue[50];                      /*!< Custom User Value */
-	char namerecloc[PATH_MAX];		/*!< Name Recorded file Location */
+	char namerecloc[PATH_MAX];				/*!< Name Recorded file Location */
+	int control;							/*! Queue Control for transmission */
+	int dtmf;								/*! Queue DTMF for transmission */
 	time_t jointime;                        /*!< Time the user joined the conference */
 	struct volume talk;
 	struct volume listen;
 	AST_LIST_ENTRY(ast_conf_user) list;
 };
 
+/*! SLA station - one device in an SLA configuration */
+struct ast_sla_station {
+	ASTOBJ_COMPONENTS(struct ast_sla_station);
+	char *dest;
+	char tech[0];
+};
+
+struct ast_sla_station_box {
+	ASTOBJ_CONTAINER_COMPONENTS(struct ast_sla_station);
+};
+
+/*! SLA - Shared Line Apperance object. These consist of one trunk (outbound line)
+	and stations that receive incoming calls and place outbound calls over the trunk 
+*/
+struct ast_sla {
+	ASTOBJ_COMPONENTS (struct ast_sla);
+	struct ast_sla_station_box stations;	/*!< Stations connected to this SLA */
+	char confname[80];	/*!< Name for this SLA bridge */
+	char trunkdest[256];	/*!< Device (channel) identifier for the trunk line */
+	char trunktech[20];	/*!< Technology used for the trunk (channel driver) */
+};
+
+struct ast_sla_box {
+	ASTOBJ_CONTAINER_COMPONENTS(struct ast_sla);
+} slas;
+
+static int audio_buffers;			/*!< The number of audio buffers to be allocated on pseudo channels
+						   when in a conference
+						*/
 /*! The number of audio buffers to be allocated on pseudo channels
  *  when in a conference */
 static int audio_buffers;
@@ -499,6 +560,18 @@
 
 	if (!res) 
 		ast_autoservice_stop(chan);
+}
+
+static void station_destroy(struct ast_sla_station *station)
+{
+	free(station);
+}
+
+static void sla_destroy(struct ast_sla *sla)
+{
+	ASTOBJ_CONTAINER_DESTROYALL(&sla->stations, station_destroy);
+	ASTOBJ_CONTAINER_DESTROY(&sla->stations);
+	free(sla);
 }
 
 static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
@@ -582,7 +655,56 @@
 	return cnf;
 }
 
-static int conf_cmd(int fd, int argc, char **argv) {
+static int confs_show(int fd, int argc, char **argv)
+{
+	ast_cli(fd, "Deprecated! Please use 'meetme' instead.\n");
+
+	return RESULT_SUCCESS;
+}
+
+/*! \brief CLI command for showing SLAs */
+static int sla_show(int fd, int argc, char *argv[]) 
+{
+	struct ast_sla *sla;
+	if (argc != 2)
+		return RESULT_SHOWUSAGE;
+
+	ast_cli(fd, "Shared line appearances:\n");
+	ASTOBJ_CONTAINER_TRAVERSE(&slas, 1, {
+		ASTOBJ_RDLOCK(iterator);
+		ast_cli(fd, "SLA %s\n", iterator->name);

[... 40748 lines stripped ...]


More information about the asterisk-commits mailing list