[svn-commits] mmichelson: branch jrothenberger/asterisk-urgent r110265 - in /team/jrothenbe...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Mar 20 11:01:42 CDT 2008


Author: mmichelson
Date: Thu Mar 20 11:01:41 2008
New Revision: 110265

URL: http://svn.digium.com/view/asterisk?view=rev&rev=110265
Log:
Resolve, reset, and...

Add support for urgent messages when using ODBC storage voicemail


Added:
    team/jrothenberger/asterisk-urgent/build_tools/cflags-devmode.xml
      - copied unchanged from r110132, trunk/build_tools/cflags-devmode.xml
    team/jrothenberger/asterisk-urgent/configs/dbsep.conf.sample
      - copied unchanged from r110132, trunk/configs/dbsep.conf.sample
    team/jrothenberger/asterisk-urgent/contrib/scripts/dbsep.cgi
      - copied unchanged from r110132, trunk/contrib/scripts/dbsep.cgi
    team/jrothenberger/asterisk-urgent/funcs/func_config.c
      - copied unchanged from r110132, trunk/funcs/func_config.c
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/
      - copied from r110132, trunk/pbx/ael/ael-test/ael-ntest23/
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/extensions.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/extensions.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/qq.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/qq.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t1/
      - copied from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t1/
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t1/a.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t1/a.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t1/b.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t1/b.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t1/c.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t1/c.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t2/
      - copied from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t2/
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t2/d.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t2/d.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t2/e.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t2/e.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t2/f.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t2/f.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t3/
      - copied from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t3/
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t3/g.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t3/g.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t3/h.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t3/h.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t3/i.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t3/i.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ael-ntest23/t3/j.ael
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ael-ntest23/t3/j.ael
    team/jrothenberger/asterisk-urgent/pbx/ael/ael-test/ref.ael-ntest23
      - copied unchanged from r110132, trunk/pbx/ael/ael-test/ref.ael-ntest23
Removed:
    team/jrothenberger/asterisk-urgent/main/minimime/
Modified:
    team/jrothenberger/asterisk-urgent/   (props changed)
    team/jrothenberger/asterisk-urgent/CHANGES
    team/jrothenberger/asterisk-urgent/Makefile
    team/jrothenberger/asterisk-urgent/Makefile.rules
    team/jrothenberger/asterisk-urgent/acinclude.m4
    team/jrothenberger/asterisk-urgent/apps/app_chanspy.c
    team/jrothenberger/asterisk-urgent/apps/app_dial.c
    team/jrothenberger/asterisk-urgent/apps/app_dumpchan.c
    team/jrothenberger/asterisk-urgent/apps/app_externalivr.c
    team/jrothenberger/asterisk-urgent/apps/app_festival.c
    team/jrothenberger/asterisk-urgent/apps/app_followme.c
    team/jrothenberger/asterisk-urgent/apps/app_meetme.c
    team/jrothenberger/asterisk-urgent/apps/app_minivm.c
    team/jrothenberger/asterisk-urgent/apps/app_mixmonitor.c
    team/jrothenberger/asterisk-urgent/apps/app_page.c
    team/jrothenberger/asterisk-urgent/apps/app_queue.c
    team/jrothenberger/asterisk-urgent/apps/app_rpt.c
    team/jrothenberger/asterisk-urgent/apps/app_sms.c
    team/jrothenberger/asterisk-urgent/apps/app_speech_utils.c
    team/jrothenberger/asterisk-urgent/apps/app_voicemail.c
    team/jrothenberger/asterisk-urgent/apps/app_zapras.c
    team/jrothenberger/asterisk-urgent/build_tools/cflags.xml
    team/jrothenberger/asterisk-urgent/build_tools/make_buildopts_h
    team/jrothenberger/asterisk-urgent/build_tools/menuselect-deps.in
    team/jrothenberger/asterisk-urgent/cdr/cdr_odbc.c
    team/jrothenberger/asterisk-urgent/cdr/cdr_pgsql.c
    team/jrothenberger/asterisk-urgent/cdr/cdr_sqlite3_custom.c
    team/jrothenberger/asterisk-urgent/channels/Makefile
    team/jrothenberger/asterisk-urgent/channels/chan_agent.c
    team/jrothenberger/asterisk-urgent/channels/chan_gtalk.c
    team/jrothenberger/asterisk-urgent/channels/chan_iax2.c
    team/jrothenberger/asterisk-urgent/channels/chan_jingle.c
    team/jrothenberger/asterisk-urgent/channels/chan_mgcp.c
    team/jrothenberger/asterisk-urgent/channels/chan_misdn.c
    team/jrothenberger/asterisk-urgent/channels/chan_oss.c
    team/jrothenberger/asterisk-urgent/channels/chan_sip.c
    team/jrothenberger/asterisk-urgent/channels/chan_skinny.c
    team/jrothenberger/asterisk-urgent/channels/chan_usbradio.c
    team/jrothenberger/asterisk-urgent/channels/chan_vpb.cc
    team/jrothenberger/asterisk-urgent/channels/chan_zap.c
    team/jrothenberger/asterisk-urgent/channels/misdn/isdn_lib.c
    team/jrothenberger/asterisk-urgent/channels/misdn/isdn_lib.h
    team/jrothenberger/asterisk-urgent/codecs/Makefile
    team/jrothenberger/asterisk-urgent/codecs/log2comp.h
    team/jrothenberger/asterisk-urgent/configs/queues.conf.sample
    team/jrothenberger/asterisk-urgent/configs/res_ldap.conf.sample
    team/jrothenberger/asterisk-urgent/configs/sip.conf.sample
    team/jrothenberger/asterisk-urgent/configs/sip_notify.conf.sample
    team/jrothenberger/asterisk-urgent/configs/zapata.conf.sample
    team/jrothenberger/asterisk-urgent/configure
    team/jrothenberger/asterisk-urgent/configure.ac
    team/jrothenberger/asterisk-urgent/contrib/init.d/rc.suse.asterisk
    team/jrothenberger/asterisk-urgent/contrib/scripts/iax-friends.sql
    team/jrothenberger/asterisk-urgent/contrib/scripts/sip-friends.sql
    team/jrothenberger/asterisk-urgent/doc/externalivr.txt
    team/jrothenberger/asterisk-urgent/doc/smdi.txt
    team/jrothenberger/asterisk-urgent/doc/voicemail_odbc_postgresql.txt
    team/jrothenberger/asterisk-urgent/funcs/func_enum.c
    team/jrothenberger/asterisk-urgent/funcs/func_odbc.c
    team/jrothenberger/asterisk-urgent/funcs/func_strings.c
    team/jrothenberger/asterisk-urgent/include/asterisk/_private.h
    team/jrothenberger/asterisk-urgent/include/asterisk/astmm.h
    team/jrothenberger/asterisk-urgent/include/asterisk/astobj.h
    team/jrothenberger/asterisk-urgent/include/asterisk/audiohook.h
    team/jrothenberger/asterisk-urgent/include/asterisk/autoconfig.h.in
    team/jrothenberger/asterisk-urgent/include/asterisk/cdr.h
    team/jrothenberger/asterisk-urgent/include/asterisk/channel.h
    team/jrothenberger/asterisk-urgent/include/asterisk/config.h
    team/jrothenberger/asterisk-urgent/include/asterisk/dnsmgr.h
    team/jrothenberger/asterisk-urgent/include/asterisk/dsp.h
    team/jrothenberger/asterisk-urgent/include/asterisk/extconf.h
    team/jrothenberger/asterisk-urgent/include/asterisk/http.h
    team/jrothenberger/asterisk-urgent/include/asterisk/pbx.h
    team/jrothenberger/asterisk-urgent/include/asterisk/pval.h
    team/jrothenberger/asterisk-urgent/include/asterisk/sched.h
    team/jrothenberger/asterisk-urgent/include/asterisk/slinfactory.h
    team/jrothenberger/asterisk-urgent/include/asterisk/strings.h
    team/jrothenberger/asterisk-urgent/include/asterisk/tcptls.h
    team/jrothenberger/asterisk-urgent/include/asterisk/utils.h
    team/jrothenberger/asterisk-urgent/include/jitterbuf.h
    team/jrothenberger/asterisk-urgent/main/Makefile
    team/jrothenberger/asterisk-urgent/main/asterisk.c
    team/jrothenberger/asterisk-urgent/main/audiohook.c
    team/jrothenberger/asterisk-urgent/main/cdr.c
    team/jrothenberger/asterisk-urgent/main/channel.c
    team/jrothenberger/asterisk-urgent/main/cli.c
    team/jrothenberger/asterisk-urgent/main/config.c
    team/jrothenberger/asterisk-urgent/main/dial.c
    team/jrothenberger/asterisk-urgent/main/dsp.c
    team/jrothenberger/asterisk-urgent/main/editline/Makefile.in
    team/jrothenberger/asterisk-urgent/main/editline/readline.c
    team/jrothenberger/asterisk-urgent/main/features.c
    team/jrothenberger/asterisk-urgent/main/frame.c
    team/jrothenberger/asterisk-urgent/main/http.c
    team/jrothenberger/asterisk-urgent/main/jitterbuf.c
    team/jrothenberger/asterisk-urgent/main/loader.c
    team/jrothenberger/asterisk-urgent/main/logger.c
    team/jrothenberger/asterisk-urgent/main/manager.c
    team/jrothenberger/asterisk-urgent/main/pbx.c
    team/jrothenberger/asterisk-urgent/main/rtp.c
    team/jrothenberger/asterisk-urgent/main/slinfactory.c
    team/jrothenberger/asterisk-urgent/main/tcptls.c
    team/jrothenberger/asterisk-urgent/main/translate.c
    team/jrothenberger/asterisk-urgent/main/udptl.c
    team/jrothenberger/asterisk-urgent/main/utils.c
    team/jrothenberger/asterisk-urgent/makeopts.in
    team/jrothenberger/asterisk-urgent/pbx/pbx_ael.c
    team/jrothenberger/asterisk-urgent/pbx/pbx_config.c
    team/jrothenberger/asterisk-urgent/res/Makefile
    team/jrothenberger/asterisk-urgent/res/ael/ael.flex
    team/jrothenberger/asterisk-urgent/res/ael/ael.tab.c
    team/jrothenberger/asterisk-urgent/res/ael/ael.tab.h
    team/jrothenberger/asterisk-urgent/res/ael/ael.y
    team/jrothenberger/asterisk-urgent/res/ael/ael_lex.c
    team/jrothenberger/asterisk-urgent/res/ael/pval.c
    team/jrothenberger/asterisk-urgent/res/res_agi.c
    team/jrothenberger/asterisk-urgent/res/res_config_curl.c
    team/jrothenberger/asterisk-urgent/res/res_config_ldap.c
    team/jrothenberger/asterisk-urgent/res/res_config_odbc.c
    team/jrothenberger/asterisk-urgent/res/res_config_pgsql.c
    team/jrothenberger/asterisk-urgent/res/res_config_sqlite.c
    team/jrothenberger/asterisk-urgent/res/res_indications.c
    team/jrothenberger/asterisk-urgent/res/res_musiconhold.c
    team/jrothenberger/asterisk-urgent/res/res_phoneprov.c
    team/jrothenberger/asterisk-urgent/res/res_realtime.c
    team/jrothenberger/asterisk-urgent/utils/Makefile
    team/jrothenberger/asterisk-urgent/utils/ael_main.c
    team/jrothenberger/asterisk-urgent/utils/astman.c
    team/jrothenberger/asterisk-urgent/utils/check_expr.c
    team/jrothenberger/asterisk-urgent/utils/conf2ael.c
    team/jrothenberger/asterisk-urgent/utils/extconf.c
    team/jrothenberger/asterisk-urgent/utils/frame.c

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/jrothenberger/asterisk-urgent/
            ('svnmerge-blocked' removed)

Propchange: team/jrothenberger/asterisk-urgent/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 20 11:01:41 2008
@@ -1,1 +1,1 @@
-/trunk:1-106521
+/trunk:1-110160

Modified: team/jrothenberger/asterisk-urgent/CHANGES
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/CHANGES?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/CHANGES (original)
+++ team/jrothenberger/asterisk-urgent/CHANGES Thu Mar 20 11:01:41 2008
@@ -2,7 +2,21 @@
 --- Functionality changes from Asterisk 1.6.0 to Asterisk 1.6.1  -------------
 ------------------------------------------------------------------------------
 
-
+Dialplan Functions
+------------------
+ * Added a new dialplan function, AST_CONFIG(), which allows you to access
+   variables from an Asterisk configuration file.
+
+Zaptel channel driver (chan_zap) Changes
+----------------------------------------
+ * Channels can now be configured using named sections in zapata.conf, just
+   like other channel drivers, including the use of templates.
+
+PBX Changes
+-----------
+ * It is now possible to specify a pattern match as a hint. Once a phone subscribes
+   to something that matches the pattern a hint will be created using the contents
+   and variables evaluated.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0  -------------
@@ -159,6 +173,9 @@
      SIP session.
   * Added TCP and TLS support for SIP.  See doc/siptls.txt and configs/sip.conf.sample for
      more information on how it is used.
+  * Added a new configuration option "authfailureevents" that enables manager events when
+    a peer can't authenticate properly. 
+  * Added DNS manager support to registrations not referencing a peer entry.
 
 IAX2 changes
 ------------
@@ -329,6 +346,9 @@
   * Added a new parameter for member definition, called state_interface. This may be
     used so that a member may be called via one interface but have a different interface's
     device state reported.
+  * New configuration option: randomperiodicannounce. If a list of periodic announcements is
+    specified by the periodic-announce option, then one will be chosen randomly when it is time
+	to play a periodic announcment
 
 MeetMe Changes
 --------------
@@ -391,6 +411,8 @@
      or NOCHANNEL if the given channel was not found.
   * The silencethreshold setting that was previously configurable in multiple
      applications is now settable globally via dsp.conf.
+  * Added ability to communicate over a TCP socket instead of forking a child process for the 
+    ExternalIVR application.
 
 Music On Hold Changes
 ---------------------

Modified: team/jrothenberger/asterisk-urgent/Makefile
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/Makefile?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/Makefile (original)
+++ team/jrothenberger/asterisk-urgent/Makefile Thu Mar 20 11:01:41 2008
@@ -229,7 +229,7 @@
 ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h
 
 ifeq ($(AST_DEVMODE),yes)
-  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT)
+  ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -Wmissing-format-attribute -Wformat-security #-Wformat=2
 endif
 
 ifneq ($(findstring BSD,$(OSARCH)),)
@@ -350,7 +350,7 @@
 	@echo "****"
 	@exit 1
 
-menuselect.makeopts: menuselect/menuselect menuselect-tree
+menuselect.makeopts: menuselect/menuselect menuselect-tree makeopts
 	menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
 
 $(MOD_SUBDIRS_EMBED_LDSCRIPT):
@@ -445,7 +445,7 @@
 	@$(MAKE) -C sounds dist-clean
 	rm -f menuselect.makeopts makeopts menuselect-tree menuselect.makedeps
 	rm -f makeopts.embed_rules
-	rm -f config.log config.status
+	rm -f config.log config.status config.cache
 	rm -rf autom4te.cache
 	rm -f include/asterisk/autoconfig.h
 	rm -f include/asterisk/buildopts.h
@@ -847,7 +847,7 @@
 menuselect/makeopts:
 	$(MAKE_MENUSELECT) makeopts
 
-menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml configure
+menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml configure
 	@echo "Generating input for menuselect ..."
 	@echo "<?xml version=\"1.0\"?>" > $@
 	@echo >> $@
@@ -855,6 +855,9 @@
 	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} SUBDIR=$${dir} moduleinfo >> $@; done
 	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} SUBDIR=$${dir} makeopts >> $@; done
 	@cat build_tools/cflags.xml >> $@
+	@if [ "${AST_DEVMODE}" = "yes" ]; then \
+		cat build_tools/cflags-devmode.xml >> $@; \
+	fi
 	@cat build_tools/embed_modules.xml >> $@
 	@cat sounds/sounds.xml >> $@
 	@echo "</menu>" >> $@

Modified: team/jrothenberger/asterisk-urgent/Makefile.rules
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/Makefile.rules?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/Makefile.rules (original)
+++ team/jrothenberger/asterisk-urgent/Makefile.rules Thu Mar 20 11:01:41 2008
@@ -61,7 +61,7 @@
 
 %.oo: %.cc
 	$(ECHO_PREFIX) echo "   [CXX] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS)) $(MAKE_DEPS)
+	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(AST_DECLARATION_AFTER_STATEMENT),$(ASTCFLAGS)) $(MAKE_DEPS)
 
 %.c: %.y
 	$(ECHO_PREFIX) echo "   [BISON] $< -> $@"

Modified: team/jrothenberger/asterisk-urgent/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/acinclude.m4?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/acinclude.m4 (original)
+++ team/jrothenberger/asterisk-urgent/acinclude.m4 Thu Mar 20 11:01:41 2008
@@ -92,7 +92,7 @@
 # AST_C_DEFINE_CHECK([package], [macro name], [header file], [version])
 AC_DEFUN([AST_C_DEFINE_CHECK],
 [
-    if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
+    if test "x${PBX_$1}" != "x1"; then
 	AC_MSG_CHECKING([for $2 in $3])
 	saved_cppflags="${CPPFLAGS}"
 	if test "x${$1_DIR}" != "x"; then
@@ -114,10 +114,11 @@
 		AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
 		AC_DEFINE([HAVE_$1_VERSION], $4, [Define $1 headers version])
 	    ],
-	    [       AC_MSG_RESULT(no) ] 
+	    [   AC_MSG_RESULT(no) ] 
 	)
 	CPPFLAGS="${saved_cppflags}"
     fi
+    AC_SUBST(PBX_$1)
 ])
 
 
@@ -230,7 +231,10 @@
 		fi
 		CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
 
-		AC_COMPILE_IFELSE(
+		saved_ldflags="${LDFLAGS}"
+		LDFLAGS="${$1_LIB}"
+
+		AC_LINK_IFELSE(
 		    [ AC_LANG_PROGRAM( [ $5 ],
 				       [ $6; ]
 				       )],
@@ -240,6 +244,7 @@
 		    []
 		)
 		CPPFLAGS="${saved_cppflags}"
+		LDFLAGS="${saved_ldflags}"
 	    else
 		PBX_$1=1
 		AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])

Modified: team/jrothenberger/asterisk-urgent/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_chanspy.c?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_chanspy.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_chanspy.c Thu Mar 20 11:01:41 2008
@@ -2,7 +2,7 @@
  * Asterisk -- An open source telephony toolkit.
  *
  * Copyright (C) 2005 Anthony Minessale II (anthmct at yahoo.com)
- * Copyright (C) 2005 - 2006, Digium, Inc.
+ * Copyright (C) 2005 - 2008, Digium, Inc.
  *
  * A license has been granted to Digium (via disclaimer) for the use of
  * this code.
@@ -23,6 +23,8 @@
  * \brief ChanSpy: Listen in on any channel.
  *
  * \author Anthony Minessale II <anthmct at yahoo.com>
+ * \author Joshua Colp <jcolp at digium.com>
+ * \author Russell Bryant <russell at digium.com>
  *
  * \ingroup applications
  */
@@ -273,8 +275,10 @@
 
 	/* We now hold the channel lock on spyee */
 
-	if (ast_check_hangup(chan) || ast_check_hangup(spyee))
+	if (ast_check_hangup(chan) || ast_check_hangup(spyee)) {
+		ast_channel_unlock(spyee);
 		return 0;
+	}
 
 	name = ast_strdupa(spyee->name);
 	ast_verb(2, "Spying on channel %s\n", name);
@@ -425,9 +429,19 @@
 	ast_mutex_unlock(&chanspy_ds->lock);
 }
 
+static void chanspy_ds_chan_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
+{
+	struct chanspy_ds *chanspy_ds = data;
+	
+	ast_mutex_lock(&chanspy_ds->lock);
+	chanspy_ds->chan = new_chan;
+	ast_mutex_unlock(&chanspy_ds->lock);
+}
+
 static const struct ast_datastore_info chanspy_ds_info = {
 	.type = "chanspy",
 	.destroy = chanspy_ds_destroy,
+	.chan_fixup = chanspy_ds_chan_fixup,
 };
 
 static struct chanspy_ds *chanspy_ds_free(struct chanspy_ds *chanspy_ds)
@@ -464,16 +478,15 @@
 
 	ast_mutex_lock(&chanspy_ds->lock);
 
-	chanspy_ds->chan = chan;
-
 	if (!(datastore = ast_channel_datastore_alloc(&chanspy_ds_info, NULL))) {
+		ast_mutex_unlock(&chanspy_ds->lock);
 		chanspy_ds = chanspy_ds_free(chanspy_ds);
 		ast_channel_unlock(chan);
 		return NULL;
 	}
-
+	
+	chanspy_ds->chan = chan;
 	datastore->data = chanspy_ds;
-
 	ast_channel_datastore_add(chan, datastore);
 
 	return chanspy_ds;
@@ -682,7 +695,7 @@
 				continue;
 
 			strcpy(peer_name, "spy-");
-			strncat(peer_name, peer->name, AST_NAME_STRLEN);
+			strncat(peer_name, peer->name, AST_NAME_STRLEN - 4 - 1);
 			ptr = strchr(peer_name, '/');
 			*ptr++ = '\0';
 
@@ -700,8 +713,10 @@
 					res = ast_streamfile(chan, peer_name, chan->language);
 					if (!res)
 						res = ast_waitstream(chan, "");
-					if (res)
+					if (res) {
+						chanspy_ds_free(peer_chanspy_ds);
 						break;
+					}
 				} else
 					res = ast_say_character_str(chan, peer_name, "", chan->language);
 				if ((num = atoi(ptr)))
@@ -717,6 +732,7 @@
 				goto exit;
 			} else if (res == -2) {
 				res = 0;
+				chanspy_ds_free(peer_chanspy_ds);
 				goto exit;
 			} else if (res > 1 && spec) {
 				struct ast_channel *next;

Modified: team/jrothenberger/asterisk-urgent/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_dial.c?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_dial.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_dial.c Thu Mar 20 11:01:41 2008
@@ -751,19 +751,21 @@
 					ast_debug(1, "Dunno what to do with control type %d\n", f->subclass);
 				}
 			} else if (single) {
-				/* XXX are we sure the logic is correct ? or we should just switch on f->frametype ? */
-				if (f->frametype == AST_FRAME_VOICE && !ast_test_flag64(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
-					if (ast_write(in, f))
-						ast_log(LOG_WARNING, "Unable to forward voice frame\n");
-				} else if (f->frametype == AST_FRAME_IMAGE && !ast_test_flag64(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
-					if (ast_write(in, f))
-						ast_log(LOG_WARNING, "Unable to forward image\n");
-				} else if (f->frametype == AST_FRAME_TEXT && !ast_test_flag64(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
-					if (ast_write(in, f))
-						ast_log(LOG_WARNING, "Unable to send text\n");
-				} else if (f->frametype == AST_FRAME_HTML && !ast_test_flag64(outgoing, DIAL_NOFORWARDHTML)) {
-					if (ast_channel_sendhtml(in, f->subclass, f->data, f->datalen) == -1)
-						ast_log(LOG_WARNING, "Unable to send URL\n");
+				switch (f->frametype) {
+					case AST_FRAME_VOICE:
+					case AST_FRAME_IMAGE:
+					case AST_FRAME_TEXT:
+						if (ast_write(in, f)) {
+							ast_log(LOG_WARNING, "Unable to write frame\n");
+						}
+						break;
+					case AST_FRAME_HTML:
+						if (!ast_test_flag64(outgoing, DIAL_NOFORWARDHTML) && ast_channel_sendhtml(in, f->subclass, f->data, f->datalen) == -1) {
+							ast_log(LOG_WARNING, "Unable to send URL\n");
+						}
+						break;
+					default:
+						break;
 				}
 			}
 			ast_frfree(f);
@@ -835,23 +837,6 @@
 			ast_verb(3, "Nobody picked up in %d ms\n", orig);
 		if (!*to || ast_check_hangup(in))
 			ast_cdr_noanswer(in->cdr);
-	}
-	if (peer && !ast_cdr_log_unanswered()) {
-		/* suppress the CDR's that didn't win */
-		struct chanlist *o;
-		for (o = outgoing; o; o = o->next) {
-			struct ast_channel *c = o->chan;
-			if (c && c != peer && c->cdr)
-				ast_set_flag(c->cdr, AST_CDR_FLAG_POST_DISABLED);
-		}
-	} else if (!peer && !ast_cdr_log_unanswered()) {
-			/* suppress the CDR's that didn't win */
-		struct chanlist *o;
-		for (o = outgoing; o; o = o->next) {
-			struct ast_channel *c = o->chan;
-			if (c && c->cdr)
-				ast_set_flag(c->cdr, AST_CDR_FLAG_POST_DISABLED);
-		}
 	}
 
 #ifdef HAVE_EPOLL
@@ -2096,9 +2081,7 @@
 	int res;
 	struct ast_context *con;
 
-	con = ast_context_find("app_dial_gosub_virtual_context");
-	if (!con)
-		con = ast_context_create(NULL, "app_dial_gosub_virtual_context", "app_dial");
+	con = ast_context_find_or_create(NULL, NULL, "app_dial_gosub_virtual_context", "app_dial");
 	if (!con)
 		ast_log(LOG_ERROR, "Dial virtual context 'app_dial_gosub_virtual_context' does not exist and unable to create\n");
 	else

Modified: team/jrothenberger/asterisk-urgent/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_dumpchan.c?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_dumpchan.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_dumpchan.c Thu Mar 20 11:01:41 2008
@@ -141,8 +141,8 @@
 
 	pbx_builtin_serialize_variables(chan, &vars);
 	serialize_showchan(chan, info, sizeof(info));
-	if (level > 0)
-		ast_verb(level, "\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, vars->str, line);
+	if (option_verbose >= level)
+		ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n", chan->name, line, info, vars->str, line);
 
 	return 0;
 }

Modified: team/jrothenberger/asterisk-urgent/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_externalivr.c?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_externalivr.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_externalivr.c Thu Mar 20 11:01:41 2008
@@ -45,19 +45,20 @@
 #include "asterisk/linkedlists.h"
 #include "asterisk/app.h"
 #include "asterisk/utils.h"
+#include "asterisk/tcptls.h"
 
 static const char *app = "ExternalIVR";
 
 static const char *synopsis = "Interfaces with an external IVR application";
 
 static const char *descrip =
-"  ExternalIVR(command[,arg[,arg...]]): Forks a process to run the supplied command,\n"
-"and starts a generator on the channel. The generator's play list is\n"
-"controlled by the external application, which can add and clear entries\n"
-"via simple commands issued over its stdout. The external application\n"
-"will receive all DTMF events received on the channel, and notification\n"
-"if the channel is hung up. The application will not be forcibly terminated\n"
-"when the channel is hung up.\n"
+"  ExternalIVR(command|ivr://ivrhost[,arg[,arg...]]): Either forks a process\n"
+"to run given command or makes a socket to connect to given host and starts\n"
+"a generator on the channel. The generator's play list is controlled by the\n"
+"external application, which can add and clear entries via simple commands\n"
+"issued over its stdout. The external application will receive all DTMF events\n"
+"received on the channel, and notification if the channel is hung up. The\n"
+"application will not be forcibly terminated when the channel is hung up.\n"
 "See doc/externalivr.txt for a protocol specification.\n";
 
 /* XXX the parser in gcc 2.95 gets confused if you don't put a space between 'name' and the comma */
@@ -88,6 +89,8 @@
 static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u, 
               int eivr_events_fd, int eivr_commands_fd, int eivr_errors_fd, 
               const char *args);
+
+int eivr_connect_socket(struct ast_channel *chan, const char *host, int port);
 
 static void send_eivr_event(FILE *handle, const char event, const char *data,
 	const struct ast_channel *chan)
@@ -305,6 +308,12 @@
 	int gen_active = 0;
 	int pid;
 	char *buf, *pipe_delim_argbuf, *pdargbuf_ptr;
+
+	char hostname[1024];
+	char *port_str = NULL;
+	int port = 0;
+	struct ast_tcptls_session_instance *ser = NULL;
+
 	struct ivr_localuser foo = {
 		.playlist = AST_LIST_HEAD_INIT_VALUE,
 		.finishlist = AST_LIST_HEAD_INIT_VALUE,
@@ -333,90 +342,137 @@
 	pipe_delim_argbuf = ast_strdupa(data);
 	while((pdargbuf_ptr = strchr(pipe_delim_argbuf, ',')) != NULL)
 		pdargbuf_ptr[0] = '|';
+
+	if(!strncmp(args.cmd[0], "ivr://", 6)) {
+		struct server_args ivr_desc = {
+			.accept_fd = -1,
+			.name = "IVR",
+		};
+		struct ast_hostent hp;
+
+		/*communicate through socket to server*/
+		if (chan->_state != AST_STATE_UP) {
+			ast_answer(chan);
+		}
+		if (ast_activate_generator(chan, &gen, u) < 0) {
+			ast_chan_log(LOG_WARNING, chan, "Failed to activate generator\n");
+			goto exit;
+		} else {
+			gen_active = 1;
+		}
+
+		ast_chan_log(LOG_DEBUG, chan, "Parsing hostname:port for socket connect from \"%s\"\n", args.cmd[0]);           
+		strncpy(hostname, args.cmd[0] + 6, sizeof(hostname));
+		if((port_str = strchr(hostname, ':')) != NULL) {
+			port_str[0] = 0;
+			port_str += 1;
+			port = atoi(port_str);
+		}
+		if(!port)
+			port = 2949;  /*default port, if one is not provided*/
+
+		ast_gethostbyname(hostname, &hp);
+		ivr_desc.sin.sin_family = AF_INET;
+		ivr_desc.sin.sin_port = htons(port);
+		memmove(&ivr_desc.sin.sin_addr.s_addr, hp.hp.h_addr, hp.hp.h_length);
+		ser = ast_tcptls_client_start(&ivr_desc);
+
+		if (!ser) {
+			goto exit;
+		} 
+		res = eivr_comm(chan, u, ser->fd, ser->fd, 0, pipe_delim_argbuf);
+	} else {
 	
-	if (pipe(child_stdin)) {
-		ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child input: %s\n", strerror(errno));
-		goto exit;
-	}
-	if (pipe(child_stdout)) {
-		ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child output: %s\n", strerror(errno));
-		goto exit;
-	}
-	if (pipe(child_stderr)) {
-		ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child errors: %s\n", strerror(errno));
-		goto exit;
-	}
-	if (chan->_state != AST_STATE_UP) {
-		ast_answer(chan);
-	}
-	if (ast_activate_generator(chan, &gen, u) < 0) {
-		ast_chan_log(LOG_WARNING, chan, "Failed to activate generator\n");
-		goto exit;
-	} else
-		gen_active = 1;
-
-	pid = fork();
-	if (pid < 0) {
-		ast_log(LOG_WARNING, "Failed to fork(): %s\n", strerror(errno));
-		goto exit;
-	}
-
-	if (!pid) {
-		/* child process */
-		int i;
-
-		signal(SIGPIPE, SIG_DFL);
-		pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
-
-		if (ast_opt_high_priority)
-			ast_set_priority(0);
-
-		dup2(child_stdin[0], STDIN_FILENO);
-		dup2(child_stdout[1], STDOUT_FILENO);
-		dup2(child_stderr[1], STDERR_FILENO);
-		for (i = STDERR_FILENO + 1; i < 1024; i++)
-			close(i);
-		execv(args.cmd[0], args.cmd);
-		fprintf(stderr, "Failed to execute '%s': %s\n", args.cmd[0], strerror(errno));
-		_exit(1);
-	} else {
-		/* parent process */
-
+		if (pipe(child_stdin)) {
+			ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child input: %s\n", strerror(errno));
+			goto exit;
+		}
+		if (pipe(child_stdout)) {
+			ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child output: %s\n", strerror(errno));
+			goto exit;
+		}
+		if (pipe(child_stderr)) {
+			ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child errors: %s\n", strerror(errno));
+			goto exit;
+		}
+		if (chan->_state != AST_STATE_UP) {
+			ast_answer(chan);
+		}
+		if (ast_activate_generator(chan, &gen, u) < 0) {
+			ast_chan_log(LOG_WARNING, chan, "Failed to activate generator\n");
+			goto exit;
+		} else {
+			gen_active = 1;
+		}
+	
+		pid = fork();
+		if (pid < 0) {
+			ast_log(LOG_WARNING, "Failed to fork(): %s\n", strerror(errno));
+			goto exit;
+		}
+	
+		if (!pid) {
+			/* child process */
+			int i;
+	
+			signal(SIGPIPE, SIG_DFL);
+			pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
+	
+			if (ast_opt_high_priority)
+				ast_set_priority(0);
+	
+			dup2(child_stdin[0], STDIN_FILENO);
+			dup2(child_stdout[1], STDOUT_FILENO);
+			dup2(child_stderr[1], STDERR_FILENO);
+			for (i = STDERR_FILENO + 1; i < 1024; i++)
+				close(i);
+			execv(args.cmd[0], args.cmd);
+			fprintf(stderr, "Failed to execute '%s': %s\n", args.cmd[0], strerror(errno));
+			_exit(1);
+		} else {
+			/* parent process */
+	
+			close(child_stdin[0]);
+			child_stdin[0] = 0;
+			close(child_stdout[1]);
+			child_stdout[1] = 0;
+			close(child_stderr[1]);
+			child_stderr[1] = 0;
+			res = eivr_comm(chan, u, child_stdin[1], child_stdout[0], child_stderr[0], pipe_delim_argbuf);
+		}
+	}
+
+	exit:
+	if (gen_active)
+		ast_deactivate_generator(chan);
+
+	if (child_stdin[0])
 		close(child_stdin[0]);
-		child_stdin[0] = 0;
+
+	if (child_stdin[1])
+		close(child_stdin[1]);
+
+	if (child_stdout[0])
+		close(child_stdout[0]);
+
+	if (child_stdout[1])
 		close(child_stdout[1]);
-		child_stdout[1] = 0;
+
+	if (child_stderr[0])
+		close(child_stderr[0]);
+
+	if (child_stderr[1])
 		close(child_stderr[1]);
-		child_stderr[1] = 0;
-		res = eivr_comm(chan, u, child_stdin[1], child_stdout[0], child_stderr[0], pipe_delim_argbuf);
-
-		exit:
-		if (gen_active)
-			ast_deactivate_generator(chan);
-
-		if (child_stdin[0])
-			close(child_stdin[0]);
-
-		if (child_stdin[1])
-			close(child_stdin[1]);
-
-		if (child_stdout[0])
-			close(child_stdout[0]);
-
-		if (child_stdout[1])
-			close(child_stdout[1]);
-
-		if (child_stderr[0])
-			close(child_stderr[0]);
-
-		if (child_stderr[1])
-			close(child_stderr[1]);
-
-		while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list)))
-			ast_free(entry);
-
-		return res;
-	}
+
+	if (ser) {
+		fclose(ser->f);
+		ast_tcptls_session_instance_destroy(ser);
+	}
+
+	while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list)))
+		ast_free(entry);
+
+	return res;
 }
 
 static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u, 
@@ -436,21 +492,21 @@
  	FILE *eivr_commands = NULL;
  	FILE *eivr_errors = NULL;
  	FILE *eivr_events = NULL;
- 
- 	if (!(eivr_events = fdopen(eivr_events_fd, "w"))) {
- 		ast_chan_log(LOG_WARNING, chan, "Could not open stream to send events\n");
- 		goto exit;
- 	}
- 	if (!(eivr_commands = fdopen(eivr_commands_fd, "r"))) {
- 		ast_chan_log(LOG_WARNING, chan, "Could not open stream to receive commands\n");
- 		goto exit;
- 	}
- 	if(eivr_errors_fd) {  /*if opening a socket connection, error stream will not be used*/
+
+	if (!(eivr_events = fdopen(eivr_events_fd, "w"))) {
+		ast_chan_log(LOG_WARNING, chan, "Could not open stream to send events\n");
+		goto exit;
+	}
+	if (!(eivr_commands = fdopen(eivr_commands_fd, "r"))) {
+		ast_chan_log(LOG_WARNING, chan, "Could not open stream to receive commands\n");
+		goto exit;
+	}
+	if(eivr_errors_fd) {  /* if opening a socket connection, error stream will not be used */
  		if (!(eivr_errors = fdopen(eivr_errors_fd, "r"))) {
  			ast_chan_log(LOG_WARNING, chan, "Could not open stream to receive errors\n");
  			goto exit;
  		}
- 	}
+	}
  
  	setvbuf(eivr_events, NULL, _IONBF, 0);
  	setvbuf(eivr_commands, NULL, _IONBF, 0);
@@ -633,18 +689,18 @@
  
 exit:
  
- 	if (eivr_events)
+	if (eivr_events)
  		fclose(eivr_events);
  
- 	if (eivr_commands)
+	if (eivr_commands)
 		fclose(eivr_commands);
 
- 	if (eivr_errors)
- 		fclose(eivr_errors);
+	if (eivr_errors)
+		fclose(eivr_errors);
   
   	return res;
  
-  }
+}
 
 static int unload_module(void)
 {

Modified: team/jrothenberger/asterisk-urgent/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_festival.c?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_festival.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_festival.c Thu Mar 20 11:01:41 2008
@@ -327,11 +327,21 @@
 	if (!(cachedir = ast_variable_retrieve(cfg, "general", "cachedir"))) {
 		cachedir = "/tmp/";
 	}
+
+	data = ast_strdupa(vdata);
+	AST_STANDARD_APP_ARGS(args, data);
+
 	if (!(festivalcommand = ast_variable_retrieve(cfg, "general", "festivalcommand"))) {
-		festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
+		const char *startcmd = "(tts_textasterisk \"";
+		const char *endcmd = "\" 'file)(quit)\n";
+
+		strln = strlen(startcmd) + strlen(args.text) + strlen(endcmd) + 1;
+		newfestivalcommand = alloca(strln);
+		snprintf(newfestivalcommand, strln, "%s%s%s", startcmd, args.text, endcmd);
+		festivalcommand = newfestivalcommand;
 	} else { /* This else parses the festivalcommand that we're sent from the config file for \n's, etc */
 		int i, j;
-		newfestivalcommand = alloca(strlen(festivalcommand) + 1);
+		newfestivalcommand = alloca(strlen(festivalcommand) + strlen(args.text) + 1);
 
 		for (i = 0, j = 0; i < strlen(festivalcommand); i++) {
 			if (festivalcommand[i] == '\\' && festivalcommand[i + 1] == 'n') {
@@ -340,6 +350,10 @@
 			} else if (festivalcommand[i] == '\\') {
 				newfestivalcommand[j++] = festivalcommand[i + 1];
 				i++;
+			} else if (festivalcommand[i] == '%' && festivalcommand[i + 1] == 's') {
+				sprintf(&newfestivalcommand[j], "%s", args.text); /* we know it is big enough */
+				j += strlen(args.text);
+				i++;
 			} else
 				newfestivalcommand[j++] = festivalcommand[i];
 		}
@@ -347,9 +361,6 @@
 		festivalcommand = newfestivalcommand;
 	}
 	
-	data = ast_strdupa(vdata);
-	AST_STANDARD_APP_ARGS(args, data);
-
 	if (args.interrupt && !strcasecmp(args.interrupt, "any"))
 		args.interrupt = AST_DIGIT_ANY;
 
@@ -440,7 +451,8 @@
 	} else {
 		ast_debug(1, "Passing text to festival...\n");
 		fs = fdopen(dup(fd), "wb");
-		fprintf(fs, festivalcommand, args.text);
+
+		fprintf(fs, "%s", festivalcommand);
 		fflush(fs);
 		fclose(fs);
 	}

Modified: team/jrothenberger/asterisk-urgent/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_followme.c?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_followme.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_followme.c Thu Mar 20 11:01:41 2008
@@ -779,9 +779,9 @@
 			}
 
 			if (!strcmp(tpargs->context, ""))
-				sprintf(dialarg, "%s", number);
+				snprintf(dialarg, sizeof(dialarg), "%s", number);
 			else
-				sprintf(dialarg, "%s@%s", number, tpargs->context);
+				snprintf(dialarg, sizeof(dialarg), "%s@%s", number, tpargs->context);
 
 			tmpuser = ast_calloc(1, sizeof(*tmpuser));
 			if (!tmpuser) {

Modified: team/jrothenberger/asterisk-urgent/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_meetme.c?view=diff&rev=110265&r1=110264&r2=110265
==============================================================================

[... 14726 lines stripped ...]



More information about the svn-commits mailing list