[svn-commits] mattf: branch mattf/asterisk-ss7 r41594 - in /team/mattf/asterisk-ss7: ./ agi...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Aug 31 10:11:13 MST 2006


Author: mattf
Date: Thu Aug 31 12:11:12 2006
New Revision: 41594

URL: http://svn.digium.com/view/asterisk?rev=41594&view=rev
Log:
Massive update in order to figure out what the heck happened with the build 
tools.

Added:
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ael-test14/
      - copied from r41574, trunk/pbx/ael/ael-test/ael-test14/
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ael-test14/extensions.ael   (props changed)
      - copied unchanged from r41574, trunk/pbx/ael/ael-test/ael-test14/extensions.ael
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ael-test15/
      - copied from r41574, trunk/pbx/ael/ael-test/ael-test15/
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ael-test15/extensions.ael   (props changed)
      - copied unchanged from r41574, trunk/pbx/ael/ael-test/ael-test15/extensions.ael
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2   (props changed)
      - copied unchanged from r41574, trunk/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ref.ael-test14   (props changed)
      - copied unchanged from r41574, trunk/pbx/ael/ael-test/ref.ael-test14
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ref.ael-test15   (props changed)
      - copied unchanged from r41574, trunk/pbx/ael/ael-test/ref.ael-test15
Modified:
    team/mattf/asterisk-ss7/   (props changed)
    team/mattf/asterisk-ss7/.cleancount
    team/mattf/asterisk-ss7/Makefile
    team/mattf/asterisk-ss7/Makefile.moddir_rules
    team/mattf/asterisk-ss7/UPGRADE.txt
    team/mattf/asterisk-ss7/acinclude.m4
    team/mattf/asterisk-ss7/agi/Makefile
    team/mattf/asterisk-ss7/apps/Makefile
    team/mattf/asterisk-ss7/apps/app_echo.c
    team/mattf/asterisk-ss7/apps/app_macro.c
    team/mattf/asterisk-ss7/apps/app_milliwatt.c
    team/mattf/asterisk-ss7/apps/app_mixmonitor.c
    team/mattf/asterisk-ss7/apps/app_sms.c
    team/mattf/asterisk-ss7/apps/app_speech_utils.c
    team/mattf/asterisk-ss7/bootstrap.sh
    team/mattf/asterisk-ss7/build_tools/make_buildopts_h
    team/mattf/asterisk-ss7/build_tools/mkpkgconfig
    team/mattf/asterisk-ss7/cdr/Makefile
    team/mattf/asterisk-ss7/channels/Makefile
    team/mattf/asterisk-ss7/channels/chan_agent.c
    team/mattf/asterisk-ss7/channels/chan_alsa.c
    team/mattf/asterisk-ss7/channels/chan_features.c
    team/mattf/asterisk-ss7/channels/chan_h323.c
    team/mattf/asterisk-ss7/channels/chan_iax2.c
    team/mattf/asterisk-ss7/channels/chan_jingle.c
    team/mattf/asterisk-ss7/channels/chan_local.c
    team/mattf/asterisk-ss7/channels/chan_mgcp.c
    team/mattf/asterisk-ss7/channels/chan_misdn.c
    team/mattf/asterisk-ss7/channels/chan_oss.c
    team/mattf/asterisk-ss7/channels/chan_phone.c
    team/mattf/asterisk-ss7/channels/chan_sip.c
    team/mattf/asterisk-ss7/channels/chan_skinny.c
    team/mattf/asterisk-ss7/channels/chan_vpb.cc
    team/mattf/asterisk-ss7/channels/chan_zap.c
    team/mattf/asterisk-ss7/channels/iax2-parser.c
    team/mattf/asterisk-ss7/channels/iax2-parser.h
    team/mattf/asterisk-ss7/codecs/Makefile
    team/mattf/asterisk-ss7/codecs/codec_zap.c
    team/mattf/asterisk-ss7/codecs/gsm/Makefile
    team/mattf/asterisk-ss7/configs/extensions.ael.sample
    team/mattf/asterisk-ss7/configs/extensions.conf.sample
    team/mattf/asterisk-ss7/configs/features.conf.sample
    team/mattf/asterisk-ss7/configs/modules.conf.sample
    team/mattf/asterisk-ss7/configs/sip.conf.sample
    team/mattf/asterisk-ss7/configs/zapata.conf.sample
    team/mattf/asterisk-ss7/configure.ac
    team/mattf/asterisk-ss7/doc/channelvariables.txt
    team/mattf/asterisk-ss7/doc/queues-with-callback-members.txt
    team/mattf/asterisk-ss7/doc/speechrec.txt
    team/mattf/asterisk-ss7/formats/Makefile
    team/mattf/asterisk-ss7/funcs/Makefile
    team/mattf/asterisk-ss7/funcs/func_strings.c
    team/mattf/asterisk-ss7/include/asterisk/autoconfig.h.in
    team/mattf/asterisk-ss7/include/asterisk/channel.h
    team/mattf/asterisk-ss7/include/asterisk/chanspy.h
    team/mattf/asterisk-ss7/include/asterisk/features.h
    team/mattf/asterisk-ss7/include/asterisk/frame.h
    team/mattf/asterisk-ss7/include/asterisk/linkedlists.h
    team/mattf/asterisk-ss7/include/asterisk/paths.h
    team/mattf/asterisk-ss7/include/asterisk/rtp.h
    team/mattf/asterisk-ss7/include/asterisk/slinfactory.h
    team/mattf/asterisk-ss7/main/Makefile
    team/mattf/asterisk-ss7/main/abstract_jb.c
    team/mattf/asterisk-ss7/main/app.c
    team/mattf/asterisk-ss7/main/asterisk.c
    team/mattf/asterisk-ss7/main/cdr.c
    team/mattf/asterisk-ss7/main/channel.c
    team/mattf/asterisk-ss7/main/dsp.c
    team/mattf/asterisk-ss7/main/file.c
    team/mattf/asterisk-ss7/main/frame.c
    team/mattf/asterisk-ss7/main/loader.c
    team/mattf/asterisk-ss7/main/pbx.c
    team/mattf/asterisk-ss7/main/rtp.c
    team/mattf/asterisk-ss7/main/slinfactory.c
    team/mattf/asterisk-ss7/main/translate.c
    team/mattf/asterisk-ss7/main/udptl.c
    team/mattf/asterisk-ss7/main/utils.c
    team/mattf/asterisk-ss7/makeopts.in
    team/mattf/asterisk-ss7/pbx/Makefile
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ael-test3/extensions.ael
    team/mattf/asterisk-ss7/pbx/ael/ael-test/ref.ael-test3
    team/mattf/asterisk-ss7/pbx/ael/ael.flex
    team/mattf/asterisk-ss7/pbx/ael/ael_lex.c
    team/mattf/asterisk-ss7/pbx/pbx_ael.c
    team/mattf/asterisk-ss7/pbx/pbx_config.c
    team/mattf/asterisk-ss7/res/Makefile
    team/mattf/asterisk-ss7/res/res_agi.c
    team/mattf/asterisk-ss7/res/res_features.c
    team/mattf/asterisk-ss7/res/res_musiconhold.c
    team/mattf/asterisk-ss7/sounds/Makefile
    team/mattf/asterisk-ss7/utils/Makefile
    team/mattf/asterisk-ss7/utils/ael_main.c
    team/mattf/asterisk-ss7/utils/smsq.c

Propchange: team/mattf/asterisk-ss7/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/mattf/asterisk-ss7/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/mattf/asterisk-ss7/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Aug 31 12:11:12 2006
@@ -1,1 +1,1 @@
-/trunk:1-40946
+/trunk:1-41593

Modified: team/mattf/asterisk-ss7/.cleancount
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/.cleancount?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/.cleancount (original)
+++ team/mattf/asterisk-ss7/.cleancount Thu Aug 31 12:11:12 2006
@@ -1,1 +1,1 @@
-22
+23

Modified: team/mattf/asterisk-ss7/Makefile
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/Makefile?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/Makefile (original)
+++ team/mattf/asterisk-ss7/Makefile Thu Aug 31 12:11:12 2006
@@ -163,7 +163,8 @@
 endif
 
 ifeq ($(OSARCH),FreeBSD)
-  BSDVERSION=$(shell $(MAKE) -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
+  # -V is understood by BSD Make, not by GNU make.
+  BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
   ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
   AST_LIBS+=$(shell if test  $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi)
 endif
@@ -331,7 +332,7 @@
 	rm -f build_tools/menuselect-deps
 
 datafiles: all
-	if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+	if [ x`$(ID) -un` = xroot ]; then CFLAGS="$(ASTCFLAGS)" sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
 # Should static HTTP be installed during make samples or even with its own target ala
 # webvoicemail?  There are portions here that *could* be customized but might also be
 # improved a lot.  I'll put it here for now.
@@ -646,7 +647,7 @@
 	- at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
 
 menuselect/menuselect: makeopts menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
-	@CFLAGS="-include $(ASTTOPDIR)/include/asterisk/autoconfig.h -I$(ASTTOPDIR)/include" PARENTSRC="$(ASTTOPDIR)" $(MAKE) -C menuselect CC="$(HOST_CC)"
+	@unset CC LD AR RANLIB && $(MAKE) -C menuselect CONFIGURE_SILENT="--silent"
 
 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
 	@echo "Generating input for menuselect ..."

Modified: team/mattf/asterisk-ss7/Makefile.moddir_rules
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/Makefile.moddir_rules?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/Makefile.moddir_rules (original)
+++ team/mattf/asterisk-ss7/Makefile.moddir_rules Thu Aug 31 12:11:12 2006
@@ -13,6 +13,10 @@
 
 ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
   CFLAGS+=-include $(ASTTOPDIR)/include/asterisk/astmm.h
+endif
+
+ifeq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
+  CFLAGS+=${GC_CFLAGS}
 endif
 
 ifneq ($(findstring STATIC_BUILD,$(MENUSELECT_CFLAGS)),)
@@ -91,9 +95,7 @@
 
 uninstall::
 
-ifneq ($(wildcard .depend),)
- include .depend
-endif
+-include .depend
 
 depend: .depend
 

Modified: team/mattf/asterisk-ss7/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/UPGRADE.txt?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/UPGRADE.txt (original)
+++ team/mattf/asterisk-ss7/UPGRADE.txt Thu Aug 31 12:11:12 2006
@@ -96,6 +96,11 @@
   not set, it uses the transferee variable. If not set in any channel, it will 
   attempt to use the last non macro context. If not possible, it will default
   to the current context.
+
+* The autofallthrough setting introduced in Asterisk 1.2 now defaults to 'yes';
+  if your dialplan relies on the ability to 'run off the end' of an extension
+  and wait for a new extension without using WaitExten() to accomplish that,
+  you will need set autofallthrough to 'no' in your extensions.conf file.
  
 Command Line Interface:
 
@@ -298,6 +303,20 @@
   option in sip.conf is removed to osp.conf as authpolicy. allowguest option
   in sip.conf cannot be set as osp anymore. 
 
+* The Asterisk RTP stack has been changed in regards to RFC2833 reception
+  and transmission. Packets will now be sent with proper duration instead of all
+  at once. If you are receiving calls from a pre-1.4 Asterisk installation you
+  will want to turn on the rfc2833compensate option. Without this option your
+  DTMF reception may act poorly.
+
+* The $SIPUSERAGENT dialplan variable is deprecated and will be removed
+  in coming versions of Asterisk. Please use the dialplan function
+  SIPCHANINFO(useragent) instead.
+
+* The ALERT_INFO dialplan variable is deprecated and will be removed
+  in coming versions of Asterisk. Please use the dialplan application
+  sipaddheader() to add the "Alert-Info" header to the outbound invite.
+
 The Zap channel:
 
 * Support for MFC/R2 has been removed, as it has not been functional for some
@@ -379,3 +398,13 @@
   server puts a phone on a different server on hold, the remote server will be
   responsible for playing the hold music to its local phone that was put on
   hold instead of the far end server across the network playing the music.
+
+CDR Records:
+
+* The behavior of the "clid" field of the CDR has always been that it will
+  contain the callerid ANI if it is set, or the callerid number if ANI was not
+  set.  When using the "callerid" option for various channel drivers, some
+  would set ANI and some would not.  This has been cleared up so that all
+  channel drivers set ANI.  If you would like to change the callerid number
+  on the channel from the dialplan and have that change also show up in the 
+  CDR, then you *must* set CALLERID(ANI) as well as CALLERID(num).

Modified: team/mattf/asterisk-ss7/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/acinclude.m4?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/acinclude.m4 (original)
+++ team/mattf/asterisk-ss7/acinclude.m4 Thu Aug 31 12:11:12 2006
@@ -2,7 +2,7 @@
 
 AC_DEFUN([AST_GCC_ATTRIBUTE],
 [
-AC_MSG_CHECKING(checking for compiler 'attribute $1' support)
+AC_MSG_CHECKING(for compiler 'attribute $1' support)
 AC_COMPILE_IFELSE(
 	AC_LANG_PROGRAM([static int __attribute__(($1)) test(void) {}],
 			[]),

Modified: team/mattf/asterisk-ss7/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/agi/Makefile?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/agi/Makefile (original)
+++ team/mattf/asterisk-ss7/agi/Makefile Thu Aug 31 12:11:12 2006
@@ -40,9 +40,7 @@
 clean: clean-depend
 	rm -f *.so *.o look eagi-test eagi-sphinx-test
 
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+-include .depend
 
 depend: .depend
 

Modified: team/mattf/asterisk-ss7/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/apps/Makefile?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/apps/Makefile (original)
+++ team/mattf/asterisk-ss7/apps/Makefile Thu Aug 31 12:11:12 2006
@@ -9,10 +9,7 @@
 # the GNU General Public License
 #
 
-ifneq ($(wildcard $(ASTTOPDIR)/menuselect.makeopts),)
-  include ../menuselect.makeopts
-  include ../menuselect.makedeps
-endif
+-include ../menuselect.makeopts ../menuselect.makedeps
 
 C_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.c,%,$(wildcard app_*.c)))
 CC_MODS:=$(filter-out $(MENUSELECT_APPS),$(patsubst %.cc,%,$(wildcard app_*.cc)))

Modified: team/mattf/asterisk-ss7/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/apps/app_echo.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/apps/app_echo.c (original)
+++ team/mattf/asterisk-ss7/apps/app_echo.c Thu Aug 31 12:11:12 2006
@@ -71,19 +71,13 @@
 		f->delivery.tv_usec = 0;
 		switch (f->frametype) {
 		case AST_FRAME_DTMF:
-		case AST_FRAME_DTMF_END:
 			if (f->subclass == '#') {
 				res = 0;
 				ast_frfree(f);
 				goto end;
 			}
 			/* fall through */
-		case AST_FRAME_DTMF_BEGIN:
-		case AST_FRAME_VOICE:
-		case AST_FRAME_VIDEO:
-		case AST_FRAME_TEXT:
-		case AST_FRAME_HTML:
-		case AST_FRAME_IMAGE:
+		default:
 			if (ast_write(chan, f)) {
 				ast_frfree(f);
 				goto end;

Modified: team/mattf/asterisk-ss7/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/apps/app_macro.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/apps/app_macro.c (original)
+++ team/mattf/asterisk-ss7/apps/app_macro.c Thu Aug 31 12:11:12 2006
@@ -257,7 +257,7 @@
 			break;
 		}
 		/* don't stop executing extensions when we're in "h" */
-		if (chan->_softhangup && strcasecmp(chan->macroexten,"h")) {
+		if (chan->_softhangup && strcasecmp(oldexten,"h") && strcasecmp(chan->macroexten,"h")) {
 			ast_log(LOG_DEBUG, "Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n",
 				chan->exten, chan->macroexten, chan->priority);
 			goto out;

Modified: team/mattf/asterisk-ss7/apps/app_milliwatt.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/apps/app_milliwatt.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/apps/app_milliwatt.c (original)
+++ team/mattf/asterisk-ss7/apps/app_milliwatt.c Thu Aug 31 12:11:12 2006
@@ -66,10 +66,16 @@
 
 static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
 {
-	struct ast_frame wf;
 	unsigned char buf[AST_FRIENDLY_OFFSET + 640];
 	const int maxsamples = sizeof (buf) / sizeof (buf[0]);
 	int i, *indexp = (int *) data;
+	struct ast_frame wf = {
+		.frametype = AST_FRAME_VOICE,
+		.subclass = AST_FORMAT_ULAW,
+		.offset = AST_FRIENDLY_OFFSET,
+		.data = buf + AST_FRIENDLY_OFFSET,
+		.src = __FUNCTION__,
+	};
 
 	/* Instead of len, use samples, because channel.c generator_force
 	* generate(chan, tmp, 0, 160) ignores len. In any case, len is
@@ -82,17 +88,8 @@
 		samples = maxsamples;
 	}
 	len = samples * sizeof (buf[0]);
-	wf.frametype = AST_FRAME_VOICE;
-	wf.subclass = AST_FORMAT_ULAW;
-	wf.offset = AST_FRIENDLY_OFFSET;
-	wf.mallocd = 0;
-	wf.data = buf + AST_FRIENDLY_OFFSET;
 	wf.datalen = len;
 	wf.samples = samples;
-	wf.src = "app_milliwatt";
-	wf.delivery.tv_sec = 0;
-	wf.delivery.tv_usec = 0;
-	wf.prev = wf.next = NULL;
 	/* create a buffer containing the digital milliwatt pattern */
 	for(i = 0; i < len; i++)
 	{

Modified: team/mattf/asterisk-ss7/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/apps/app_mixmonitor.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/apps/app_mixmonitor.c (original)
+++ team/mattf/asterisk-ss7/apps/app_mixmonitor.c Thu Aug 31 12:11:12 2006
@@ -191,7 +191,7 @@
 			   of frames if a queue flush was necessary, so process them
 			*/
 			for (; f; f = next) {
-				next = f->next;
+				next = AST_LIST_NEXT(f, frame_list);
 				if (write)
 					ast_writestream(mixmonitor->fs, f);
 				ast_frfree(f);

Modified: team/mattf/asterisk-ss7/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/apps/app_sms.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/apps/app_sms.c (original)
+++ team/mattf/asterisk-ss7/apps/app_sms.c Thu Aug 31 12:11:12 2006
@@ -691,6 +691,7 @@
 		while (fgets (line, sizeof (line), s))
 		{								 /* process line in file */
 			char *p;
+			void *pp = &p;
 			for (p = line; *p && *p != '\n' && *p != '\r'; p++);
 			*p = 0;					 /* strip eoln */
 			p = line;
@@ -710,7 +711,7 @@
 				{						 /* parse message (UTF-8) */
 					unsigned char o = 0;
 					while (*p && o < SMSLEN)
-						h->ud[o++] = utf8decode((unsigned char **) &p);
+						h->ud[o++] = utf8decode(pp);
 					h->udl = o;
 					if (*p)
 						ast_log (LOG_WARNING, "UD too long in %s\n", fn);

Modified: team/mattf/asterisk-ss7/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/apps/app_speech_utils.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/apps/app_speech_utils.c (original)
+++ team/mattf/asterisk-ss7/apps/app_speech_utils.c Thu Aug 31 12:11:12 2006
@@ -64,8 +64,7 @@
 "Once they stop talking the processing sound is played to indicate the speech recognition engine is working.\n"
 "Once results are available the application returns and results (score and text) are available using dialplan functions.\n"
 "The first text and score are ${SPEECH_TEXT(0)} AND ${SPEECH_SCORE(0)} while the second are ${SPEECH_TEXT(1)} and ${SPEECH_SCORE(1)}.\n"
-"This may change in the future, however, to use a dialplan function instead of dialplan variables. Note it is possible to have more then one result.\n"
-	"The first argument is the sound file and the second is the timeout. Note the timeout will only start once the sound file has stopped playing.\n";
+"The first argument is the sound file and the second is the timeout. Note the timeout will only start once the sound file has stopped playing.\n";
 
 static char *speechdeactivategrammar_descrip =
 "SpeechDeactivateGrammar(Grammar Name)\n"

Modified: team/mattf/asterisk-ss7/bootstrap.sh
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/bootstrap.sh?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/bootstrap.sh (original)
+++ team/mattf/asterisk-ss7/bootstrap.sh Thu Aug 31 12:11:12 2006
@@ -12,17 +12,17 @@
 uname -s | grep -q FreeBSD
 if [ $? = 0 ]
 then
-	check_for_app autoconf259
-	check_for_app autoheader259
+	check_for_app autoconf260
+	check_for_app autoheader260
 	check_for_app automake19
 	check_for_app aclocal19
 	echo "Generating the configure script ..."
 	aclocal19 2>/dev/null
-	autoconf259
-	autoheader259
+	autoconf260
+	autoheader260
 	automake19 --add-missing --copy 2>/dev/null
 else
-	AUTOCONF_VERSION=2.59
+	AUTOCONF_VERSION=2.60
 	AUTOMAKE_VERSION=1.9
 	export AUTOCONF_VERSION
 	export AUTOMAKE_VERSION

Modified: team/mattf/asterisk-ss7/build_tools/make_buildopts_h
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/build_tools/make_buildopts_h?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/build_tools/make_buildopts_h (original)
+++ team/mattf/asterisk-ss7/build_tools/make_buildopts_h Thu Aug 31 12:11:12 2006
@@ -7,7 +7,7 @@
  */
 
 END
-TMP=`grep MENUSELECT_CFLAGS menuselect.makeopts | sed s/MENUSELECT_CFLAGS\=//g | sed s/-D//g`
+TMP=`grep MENUSELECT_CFLAGS menuselect.makeopts | sed 's/MENUSELECT_CFLAGS\=//g' | sed 's/-D//g'`
 for x in ${TMP}; do
      echo "#define ${x} 1"
 done

Modified: team/mattf/asterisk-ss7/build_tools/mkpkgconfig
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/build_tools/mkpkgconfig?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/build_tools/mkpkgconfig (original)
+++ team/mattf/asterisk-ss7/build_tools/mkpkgconfig Thu Aug 31 12:11:12 2006
@@ -13,13 +13,20 @@
   exit
 fi
 
+#Solaris (and some others) don't have sed -r.  perl -p is equivalent
+if [[ `echo "xxx" | sed -r 's/x/y/g' 2>/dev/null | grep -c "yyy"` != 0 ]]; then
+    EXTREGEX="sed -r -e"
+else
+    EXTREGEX="perl -pe"
+fi
+
 ## Clean out CFLAGS for the spec file.
 
-LOCAL_CFLAGS=`echo $CFLAGS | sed -e 's/\s*-pipe\s*//g' | sed -e 's/-[Wmp]\S*\s*//g' | \
-  sed -r -e 's/-I(include|\.\.\/include) //g' | \
-  sed -e 's/-DINSTALL_PREFIX=\S* //g' | \
-  sed -r -e 's/-DASTERISK_VERSION=\S* //g' | \
-  sed -r -e 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
+LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/\s*-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
+  ${EXTREGEX} 's/-I(include|\.\.\/include) //g' | \
+  ${EXTREGEX} 's/-DINSTALL_PREFIX=\S* //g' | \
+  ${EXTREGEX} 's/-DASTERISK_VERSION=\S* //g' | \
+  ${EXTREGEX} 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
 
 
 cat <<EOF > $PPATH/asterisk.pc

Modified: team/mattf/asterisk-ss7/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/cdr/Makefile?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/cdr/Makefile (original)
+++ team/mattf/asterisk-ss7/cdr/Makefile Thu Aug 31 12:11:12 2006
@@ -9,10 +9,7 @@
 # the GNU General Public License
 #
 
-ifneq ($(wildcard $(ASTTOPDIR)/menuselect.makeopts),)
-  include ../menuselect.makeopts
-  include ../menuselect.makedeps
-endif
+-include ../menuselect.makeopts ../menuselect.makedeps
 
 C_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.c,%,$(wildcard cdr_*.c)))
 CC_MODS:=$(filter-out $(MENUSELECT_CDR),$(patsubst %.cc,%,$(wildcard cdr_*.cc)))

Modified: team/mattf/asterisk-ss7/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/Makefile?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/Makefile (original)
+++ team/mattf/asterisk-ss7/channels/Makefile Thu Aug 31 12:11:12 2006
@@ -9,10 +9,7 @@
 # the GNU General Public License
 #
 
-ifneq ($(wildcard $(ASTTOPDIR)/menuselect.makeopts),)
-  include ../menuselect.makeopts
-  include ../menuselect.makedeps
-endif
+-include ../menuselect.makeopts ../menuselect.makedeps
 
 C_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.c,%,$(wildcard chan_*.c)))
 CC_MODS:=$(filter-out $(MENUSELECT_CHANNELS),$(patsubst %.cc,%,$(wildcard chan_*.cc)))
@@ -66,9 +63,7 @@
 	rm -f busy.h ringtone.h gentone
 	$(MAKE) -C misdn clean
 
-ifneq ($(wildcard $(PWD)/Makefile.ast),)
-  include $(PWD)/Makefile.ast
-endif
+-include $(PWD)/Makefile.ast
 
 $(eval $(call ast_make_final_host,gentone,gentone.c))
 gentone: LIBS+=-lm

Modified: team/mattf/asterisk-ss7/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/chan_agent.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_agent.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_agent.c Thu Aug 31 12:11:12 2006
@@ -238,7 +238,8 @@
 static struct ast_channel *agent_request(const char *type, int format, void *data, int *cause);
 static int agent_devicestate(void *data);
 static void agent_logoff_maintenance(struct agent_pvt *p, char *loginchan, long logintime, const char *uniqueid, char *logcommand);
-static int agent_digit(struct ast_channel *ast, char digit);
+static int agent_digit_begin(struct ast_channel *ast, char digit);
+static int agent_digit_end(struct ast_channel *ast, char digit);
 static int agent_call(struct ast_channel *ast, char *dest, int timeout);
 static int agent_hangup(struct ast_channel *ast);
 static int agent_answer(struct ast_channel *ast);
@@ -258,7 +259,8 @@
 	.capabilities = -1,
 	.requester = agent_request,
 	.devicestate = agent_devicestate,
-	.send_digit = agent_digit,
+	.send_digit_begin = agent_digit_begin,
+	.send_digit_end = agent_digit_end,
 	.call = agent_call,
 	.hangup = agent_hangup,
 	.answer = agent_answer,
@@ -491,7 +493,8 @@
  				}
  			}
  			break;
- 		case AST_FRAME_DTMF:
+		case AST_FRAME_DTMF_BEGIN:
+ 		case AST_FRAME_DTMF_END:
  			if (!p->acknowledged && (f->subclass == '#')) {
  				if (option_verbose > 2)
  					ast_verbose(VERBOSE_PREFIX_3 "%s acknowledged\n", p->chan->name);
@@ -511,7 +514,9 @@
  				ast_frfree(f);
  				f = &ast_null_frame;
  			}
- 			break;
+		default:
+			/* pass everything else on through */
+			break;
   		}
   	}
 
@@ -603,15 +608,22 @@
 	return res;
 }
 
-static int agent_digit(struct ast_channel *ast, char digit)
+static int agent_digit_begin(struct ast_channel *ast, char digit)
 {
 	struct agent_pvt *p = ast->tech_pvt;
 	int res = -1;
 	ast_mutex_lock(&p->lock);
-	if (p->chan)
-		res = p->chan->tech->send_digit(p->chan, digit);
-	else
-		res = 0;
+	ast_senddigit_begin(p->chan, digit);
+	ast_mutex_unlock(&p->lock);
+	return res;
+}
+
+static int agent_digit_end(struct ast_channel *ast, char digit)
+{
+	struct agent_pvt *p = ast->tech_pvt;
+	int res = -1;
+	ast_mutex_lock(&p->lock);
+	ast_senddigit_end(p->chan, digit);
 	ast_mutex_unlock(&p->lock);
 	return res;
 }

Modified: team/mattf/asterisk-ss7/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/chan_alsa.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_alsa.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_alsa.c Thu Aug 31 12:11:12 2006
@@ -203,7 +203,7 @@
 	.description = tdesc,
 	.capabilities = AST_FORMAT_SLINEAR,
 	.requester = alsa_request,
-	.send_digit = alsa_digit,
+	.send_digit_end = alsa_digit,
 	.send_text = alsa_text,
 	.hangup = alsa_hangup,
 	.answer = alsa_answer,

Modified: team/mattf/asterisk-ss7/channels/chan_features.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/chan_features.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_features.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_features.c Thu Aug 31 12:11:12 2006
@@ -95,7 +95,8 @@
 #define SUB_THREEWAY	2			/* Three-way call */
 
 static struct ast_channel *features_request(const char *type, int format, void *data, int *cause);
-static int features_digit(struct ast_channel *ast, char digit);
+static int features_digit_begin(struct ast_channel *ast, char digit);
+static int features_digit_end(struct ast_channel *ast, char digit);
 static int features_call(struct ast_channel *ast, char *dest, int timeout);
 static int features_hangup(struct ast_channel *ast);
 static int features_answer(struct ast_channel *ast);
@@ -109,7 +110,8 @@
 	.description = tdesc,
 	.capabilities = -1,
 	.requester = features_request,
-	.send_digit = features_digit,
+	.send_digit_begin = features_digit_begin,
+	.send_digit_end = features_digit_end,
 	.call = features_call,
 	.hangup = features_hangup,
 	.answer = features_answer,
@@ -300,7 +302,7 @@
 	return res;
 }
 
-static int features_digit(struct ast_channel *ast, char digit)
+static int features_digit_begin(struct ast_channel *ast, char digit)
 {
 	struct feature_pvt *p = ast->tech_pvt;
 	int res = -1;
@@ -310,7 +312,23 @@
 	ast_mutex_lock(&p->lock);
 	x = indexof(p, ast, 0);
 	if (!x && p->subchan)
-		res = ast_senddigit(p->subchan, digit);
+		res = ast_senddigit_begin(p->subchan, digit);
+	ast_mutex_unlock(&p->lock);
+
+	return res;
+}
+
+static int features_digit_end(struct ast_channel *ast, char digit)
+{
+	struct feature_pvt *p = ast->tech_pvt;
+	int res = -1;
+	int x;
+
+	/* Queue up a frame representing the indication as a control frame */
+	ast_mutex_lock(&p->lock);
+	x = indexof(p, ast, 0);
+	if (!x && p->subchan)
+		res = ast_senddigit_end(p->subchan, digit);
 	ast_mutex_unlock(&p->lock);
 	return res;
 }

Modified: team/mattf/asterisk-ss7/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/chan_h323.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_h323.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_h323.c Thu Aug 31 12:11:12 2006
@@ -220,7 +220,8 @@
 static int h323_do_reload(void);
 
 static struct ast_channel *oh323_request(const char *type, int format, void *data, int *cause);
-static int oh323_digit(struct ast_channel *c, char digit);
+static int oh323_digit_begin(struct ast_channel *c, char digit);
+static int oh323_digit_end(struct ast_channel *c, char digit);
 static int oh323_call(struct ast_channel *c, char *dest, int timeout);
 static int oh323_hangup(struct ast_channel *c);
 static int oh323_answer(struct ast_channel *c);
@@ -235,7 +236,8 @@
 	.capabilities = ((AST_FORMAT_MAX_AUDIO << 1) - 1),
 	.properties = AST_CHAN_TP_WANTSJITTER | AST_CHAN_TP_CREATESJITTER,
 	.requester = oh323_request,
-	.send_digit = oh323_digit,
+	.send_digit_begin = oh323_digit_begin,
+	.send_digit_end = oh323_digit_end,
 	.call = oh323_call,
 	.hangup = oh323_hangup,
 	.answer = oh323_answer,
@@ -381,11 +383,17 @@
 	ast_mutex_unlock(&iflock);
 }
 
+static int oh323_digit_begin(struct ast_channel *chan, char digit)
+{
+	/* XXX Implement me, plz, kthx */
+	return 0;
+}
+
 /**
  * Send (play) the specified digit to the channel.
  * 
  */
-static int oh323_digit(struct ast_channel *c, char digit)
+static int oh323_digit_end(struct ast_channel *c, char digit)
 {
 	struct oh323_pvt *pvt = (struct oh323_pvt *) c->tech_pvt;
 	char *token;

Modified: team/mattf/asterisk-ss7/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/mattf/asterisk-ss7/channels/chan_iax2.c?rev=41594&r1=41593&r2=41594&view=diff
==============================================================================
--- team/mattf/asterisk-ss7/channels/chan_iax2.c (original)
+++ team/mattf/asterisk-ss7/channels/chan_iax2.c Thu Aug 31 12:11:12 2006
@@ -621,11 +621,11 @@
 };
 
 static struct ast_iax2_queue {
-	struct iax_frame *head;
-	struct iax_frame *tail;
+	AST_LIST_HEAD(, iax_frame) queue;
 	int count;
-	ast_mutex_t lock;
-} iaxq;
+} iaxq = {
+	.queue = AST_LIST_HEAD_INIT_VALUE
+};
 
 static AST_LIST_HEAD_STATIC(users, iax2_user);
 
@@ -776,7 +776,8 @@
 static int iax2_answer(struct ast_channel *c);
 static int iax2_call(struct ast_channel *c, char *dest, int timeout);
 static int iax2_devicestate(void *data);
-static int iax2_digit(struct ast_channel *c, char digit);
+static int iax2_digit_begin(struct ast_channel *c, char digit);
+static int iax2_digit_end(struct ast_channel *c, char digit);
 static int iax2_do_register(struct iax2_registry *reg);
 static int iax2_fixup(struct ast_channel *oldchannel, struct ast_channel *newchan);
 static int iax2_hangup(struct ast_channel *c);
@@ -809,7 +810,8 @@
 	.properties = AST_CHAN_TP_WANTSJITTER,
 	.requester = iax2_request,
 	.devicestate = iax2_devicestate,
-	.send_digit = iax2_digit,
+	.send_digit_begin = iax2_digit_begin,
+	.send_digit_end = iax2_digit_end,
 	.send_text = iax2_sendtext,
 	.send_image = iax2_sendimage,
 	.send_html = iax2_sendhtml,
@@ -1071,11 +1073,12 @@
 
 static struct iax_frame *iaxfrdup2(struct iax_frame *fr)
 {
-	/* Malloc() a copy of a frame */
 	struct iax_frame *new = iax_frame_new(DIRECTION_INGRESS, fr->af.datalen);
 	if (new) {
-		memcpy(new, fr, sizeof(struct iax_frame));	
+		size_t mallocd_datalen = new->mallocd_datalen;
+		memcpy(new, fr, sizeof(*new));
 		iax_frame_wrap(new, &fr->af);
+		new->mallocd_datalen = mallocd_datalen;
 		new->data = NULL;
 		new->datalen = 0;
 		new->direction = DIRECTION_INGRESS;
@@ -1754,7 +1757,7 @@
 			ast_queue_hangup(owner);
 		}
 
-		for (cur = iaxq.head; cur ; cur = cur->next) {
+		AST_LIST_TRAVERSE(&iaxq.queue, cur, list) {
 			/* Cancel any pending transmissions */
 			if (cur->callno == pvt->callno) 
 				cur->retries = -1;
@@ -1875,17 +1878,10 @@
 	/* Do not try again */
 	if (freeme) {
 		/* Don't attempt delivery, just remove it from the queue */
-		ast_mutex_lock(&iaxq.lock);
-		if (f->prev) 
-			f->prev->next = f->next;
-		else
-			iaxq.head = f->next;
-		if (f->next)
-			f->next->prev = f->prev;
-		else
-			iaxq.tail = f->prev;
+		AST_LIST_LOCK(&iaxq.queue);
+		AST_LIST_REMOVE(&iaxq.queue, f, list);
 		iaxq.count--;
-		ast_mutex_unlock(&iaxq.lock);
+		AST_LIST_UNLOCK(&iaxq.queue);
 		f->retrans = -1;
 		/* Free the IAX frame */
 		iax2_frame_free(f);
@@ -2082,7 +2078,7 @@
 	int cnt = 0, dead=0, final=0;
 	if (argc != 3)
 		return RESULT_SHOWUSAGE;
-	for (cur = iaxq.head; cur ; cur = cur->next) {
+	AST_LIST_TRAVERSE(&iaxq.queue, cur, list) {
 		if (cur->retries < 0)
 			dead++;
 		if (cur->final)
@@ -2092,7 +2088,8 @@
 	ast_cli(fd, "    IAX Statistics\n");
 	ast_cli(fd, "---------------------\n");
 	ast_cli(fd, "Outstanding frames: %d (%d ingress, %d egress)\n", iax_get_frames(), iax_get_iframes(), iax_get_oframes());
-	ast_cli(fd, "Packets in transmit queue: %d dead, %d final, %d total\n", dead, final, cnt);
+	ast_cli(fd, "Packets in transmit queue: %d dead, %d final, %d total\n\n", dead, final, cnt);
+	
 	return RESULT_SUCCESS;
 }
 
@@ -2369,24 +2366,13 @@
 static int iax2_transmit(struct iax_frame *fr)
 {
 	/* Lock the queue and place this packet at the end */
-	fr->next = NULL;
-	fr->prev = NULL;
 	/* By setting this to 0, the network thread will send it for us, and
 	   queue retransmission if necessary */
 	fr->sentyet = 0;
-	ast_mutex_lock(&iaxq.lock);
-	if (!iaxq.head) {
-		/* Empty queue */
-		iaxq.head = fr;
-		iaxq.tail = fr;
-	} else {
-		/* Double link */
-		iaxq.tail->next = fr;
-		fr->prev = iaxq.tail;
-		iaxq.tail = fr;
-	}
+	AST_LIST_LOCK(&iaxq.queue);
+	AST_LIST_INSERT_TAIL(&iaxq.queue, fr, list);
 	iaxq.count++;
-	ast_mutex_unlock(&iaxq.lock);
+	AST_LIST_UNLOCK(&iaxq.queue);
 	/* Wake up the network and scheduler thread */
 	pthread_kill(netthreadid, SIGURG);
 	signal_condition(&sched_lock, &sched_cond);
@@ -2395,9 +2381,14 @@
 
 
 
-static int iax2_digit(struct ast_channel *c, char digit)
-{
-	return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF, digit, 0, NULL, 0, -1);
+static int iax2_digit_begin(struct ast_channel *c, char digit)
+{
+	return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF_BEGIN, digit, 0, NULL, 0, -1);
+}
+
+static int iax2_digit_end(struct ast_channel *c, char digit)
+{
+	return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF_END, digit, 0, NULL, 0, -1);
 }
 
 static int iax2_sendtext(struct ast_channel *c, const char *text)
@@ -4743,19 +4734,21 @@
 		/* Keep this check last */
 		if (!ast_strlen_zero(user->dbsecret)) {
 			char *family, *key=NULL;
+			char buf[80];
 			family = ast_strdupa(user->dbsecret);
 			key = strchr(family, '/');
 			if (key) {
 				*key = '\0';
 				key++;
 			}
-			if (!key || ast_db_get(family, key, (char*)iaxs[callno]->secret, sizeof(iaxs[callno]->secret))) {
+			if (!key || ast_db_get(family, key, buf, sizeof(buf))) {
 				ast_log(LOG_WARNING, "Unable to retrieve database password for family/key '%s'!\n", user->dbsecret);
 				if (ast_test_flag(user, IAX_TEMPONLY)) {
 					destroy_user(user);
 					user = NULL;
 				}
-			}
+			} else
+				ast_string_field_set(iaxs[callno], secret, buf);
 		} else
 			ast_string_field_set(iaxs[callno], secret, user->secret);
 		res = 0;
@@ -4801,6 +4794,7 @@
 	struct iax2_user *user = NULL;
 	struct iax_ie_data ied;
 	int res = -1, authreq_restrict = 0;
+	char challenge[10];
 
 	memset(&ied, 0, sizeof(ied));
 
@@ -4829,7 +4823,8 @@
 
 	iax_ie_append_short(&ied, IAX_IE_AUTHMETHODS, p->authmethods);
 	if (p->authmethods & (IAX_AUTH_MD5 | IAX_AUTH_RSA)) {
-		ast_string_field_build(p,challenge, "%d", (int)ast_random());
+		snprintf(challenge, sizeof(challenge), "%d", (int)ast_random());
+		ast_string_field_set(p, challenge, challenge);
 		/* snprintf(p->challenge, sizeof(p->challenge), "%d", (int)ast_random()); */
 		iax_ie_append_str(&ied, IAX_IE_CHALLENGE, p->challenge);
 	}
@@ -5328,15 +5323,15 @@
 	pvt->lastsent = 0;
 	pvt->nextpred = 0;
 	pvt->pingtime = DEFAULT_RETRY_TIME;
-	ast_mutex_lock(&iaxq.lock);
-	for (cur = iaxq.head; cur ; cur = cur->next) {
+	AST_LIST_LOCK(&iaxq.queue);
+	AST_LIST_TRAVERSE(&iaxq.queue, cur, list) {
 		/* We must cancel any packets that would have been transmitted
 		   because now we're talking to someone new.  It's okay, they
 		   were transmitted to someone that didn't care anyway. */
 		if (callno == cur->callno) 
 			cur->retries = -1;
 	}
-	ast_mutex_unlock(&iaxq.lock);
+	AST_LIST_UNLOCK(&iaxq.queue);
 	return 0; 
 }
 
@@ -5658,6 +5653,7 @@
 {
 	struct iax_ie_data ied;
 	struct iax2_peer *p;
+	char challenge[10];
 	/* SLD: third call to find_peer in registration */
 	p = find_peer(name, 1);
 	if (p) {
@@ -5665,7 +5661,8 @@
 		iax_ie_append_short(&ied, IAX_IE_AUTHMETHODS, p->authmethods);
 		if (p->authmethods & (IAX_AUTH_RSA | IAX_AUTH_MD5)) {
 			/* Build the challenge */
-			ast_string_field_build(iaxs[callno], challenge, "%d", (int)ast_random());
+			snprintf(challenge, sizeof(challenge), "%d", (int)ast_random());
+			ast_string_field_set(iaxs[callno], challenge, challenge);
 			/* snprintf(iaxs[callno]->challenge, sizeof(iaxs[callno]->challenge), "%d", (int)ast_random()); */
 			iax_ie_append_str(&ied, IAX_IE_CHALLENGE, iaxs[callno]->challenge);
 		}
@@ -5833,17 +5830,16 @@
 static void vnak_retransmit(int callno, int last)

[... 7295 lines stripped ...]


More information about the svn-commits mailing list