[asterisk-commits] simon.perreault: branch group/v6 r85131 - in /team/group/v6/trunk: ./ apps/ b...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 9 10:26:01 CDT 2007


Author: simon.perreault
Date: Tue Oct  9 10:26:00 2007
New Revision: 85131

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85131
Log:
Merged revisions 84405,84432,84440,84475,84512,84545,84580,84582,84613,84638,84671,84691,84693,84726,84743,84784,84819,84852,84891-84892,84918,84939,84958,84991,85024-85025,85058,85094,85097-85098 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r84405 | tilghman | 2007-10-02 14:12:49 -0400 (Tue, 02 Oct 2007) | 2 lines

Add MSet for people who prefer the old, deprecated syntax of Set (Closes issue #10549)

................
r84432 | qwell | 2007-10-02 14:59:39 -0400 (Tue, 02 Oct 2007) | 13 lines

Merged revisions 84410 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10821)
........
r84410 | qwell | 2007-10-02 13:52:55 -0500 (Tue, 02 Oct 2007) | 4 lines

Finish up on transferee channel before return on failure.

Issue 10821, patch by Ivan

........

................
r84440 | qwell | 2007-10-02 15:02:33 -0400 (Tue, 02 Oct 2007) | 8 lines

Blocked revisions 84437 via svnmerge

........
r84437 | qwell | 2007-10-02 14:01:59 -0500 (Tue, 02 Oct 2007) | 1 line

Fix some odd formatting I missed..
........

................
r84475 | russell | 2007-10-02 16:07:15 -0400 (Tue, 02 Oct 2007) | 13 lines

Merged revisions 84474 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84474 | russell | 2007-10-02 15:06:07 -0500 (Tue, 02 Oct 2007) | 5 lines

* Don't build the menuselect-tree for the tarball, as it requires running the
  configure script first
* Change the Makefile to note that menuselect-tree depends on the configure
  script.

........

................
r84512 | murf | 2007-10-03 10:39:05 -0400 (Wed, 03 Oct 2007) | 9 lines

Merged revisions 84511 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84511 | murf | 2007-10-03 08:23:00 -0600 (Wed, 03 Oct 2007) | 1 line

closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue.
........

................
r84545 | murf | 2007-10-03 14:23:30 -0400 (Wed, 03 Oct 2007) | 1 line

blocked 84544 from trunk; it only applies to 1.4; 10870 -- the CUT in AEL
................
r84580 | tilghman | 2007-10-03 18:14:09 -0400 (Wed, 03 Oct 2007) | 2 lines

Create a universal exception handling extension, "e" (closes issue #9785)

................
r84582 | tilghman | 2007-10-03 19:05:47 -0400 (Wed, 03 Oct 2007) | 10 lines

Merged revisions 84581 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84581 | tilghman | 2007-10-03 17:59:17 -0500 (Wed, 03 Oct 2007) | 2 lines

When an RFC 2833 event is sent that we don't recognize, ignore it, don't queue a NULL digit (closes issue #10877)

........

................
r84613 | file | 2007-10-03 22:01:43 -0400 (Wed, 03 Oct 2007) | 2 lines

Don't register the exception function with module information. Since it is in the core there is none and it will explode.

................
r84638 | file | 2007-10-04 10:54:30 -0400 (Thu, 04 Oct 2007) | 12 lines

Merged revisions 84637 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84637 | file | 2007-10-04 11:51:57 -0300 (Thu, 04 Oct 2007) | 4 lines

Create a duplicate of the channel's member name as the tab completion stuff will free it.
(closes issue #10884)
Reported by: adamg

........

................
r84671 | tilghman | 2007-10-04 12:56:00 -0400 (Thu, 04 Oct 2007) | 2 lines

Update to current coding standards, also changing the argument delimiter to ',' (Closes issue #10876)

................
r84691 | kpfleming | 2007-10-04 17:38:22 -0400 (Thu, 04 Oct 2007) | 10 lines

Merged revisions 84690 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84690 | kpfleming | 2007-10-04 16:36:56 -0500 (Thu, 04 Oct 2007) | 2 lines

callers of sig2str already add the word 'signalling' in the appropriate place, so don't duplicate it

........

................
r84693 | mmichelson | 2007-10-04 18:00:10 -0400 (Thu, 04 Oct 2007) | 13 lines

Merged revisions 84692 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84692 | mmichelson | 2007-10-04 16:57:03 -0500 (Thu, 04 Oct 2007) | 5 lines

Don't allocate space for queue members unless it's needed. You end up deleting dynamic members on a reload. Not good.

closes issue (#10879, reported by dazza76, patched by me)


........

................
r84726 | mmichelson | 2007-10-04 18:58:26 -0400 (Thu, 04 Oct 2007) | 8 lines

A two-in-one patch from the bugtracker

1) Fix some bad logic in the counting of statistics for QueueSummary manager event. Variables were not being
   reset for each additional queue, so cumulative totals were reported on each successive queue.

2) Add a longest hold time stat to QueueSummary manager event.


................
r84743 | russell | 2007-10-04 21:40:20 -0400 (Thu, 04 Oct 2007) | 11 lines

Merged revisions 84742 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84742 | russell | 2007-10-04 20:39:07 -0500 (Thu, 04 Oct 2007) | 3 lines

Fix a copy/paste error in the description of UpdateConfig that was pointed
out by JerJer on #asterisk-dev

........

................
r84784 | russell | 2007-10-05 12:49:16 -0400 (Fri, 05 Oct 2007) | 12 lines

Merged revisions 84783 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84783 | russell | 2007-10-05 11:44:21 -0500 (Fri, 05 Oct 2007) | 4 lines

Do deadlock avoidance in a couple more places.  You can't lock two channels
at the same time without doing extra work to make sure it succeeds.
(closes issue #10895, patch by me)

........

................
r84819 | file | 2007-10-05 14:57:26 -0400 (Fri, 05 Oct 2007) | 12 lines

Merged revisions 84818 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84818 | file | 2007-10-05 15:55:36 -0300 (Fri, 05 Oct 2007) | 4 lines

Update the remembered RTP peer information when putting an endpoint on hold or taking it off hold so that the RTP stack does not initiate a needless reinvite.
(closes issue #10868)
Reported by: mavince

........

................
r84852 | tilghman | 2007-10-05 15:48:10 -0400 (Fri, 05 Oct 2007) | 10 lines

Merged revisions 84851 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84851 | tilghman | 2007-10-05 14:42:21 -0500 (Fri, 05 Oct 2007) | 2 lines

Log exactly why we can't open the database, if we fail (closes issue #10887)

........

................
r84891 | phsultan | 2007-10-07 11:54:48 -0400 (Sun, 07 Oct 2007) | 13 lines

Merged revisions 84890 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84890 | phsultan | 2007-10-07 17:52:44 +0200 (Sun, 07 Oct 2007) | 5 lines

Prevent Asterisk from crashing when receiving a presence packet
without resource from a buddy that is known to have a resource list.

Revert a change I previously made, where Asterisk could point to a
freed memory location.
........

................
r84892 | phsultan | 2007-10-07 11:56:22 -0400 (Sun, 07 Oct 2007) | 1 line

Fix indentation
................
r84918 | phsultan | 2007-10-07 12:18:49 -0400 (Sun, 07 Oct 2007) | 13 lines

Merged revisions 84902 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84902 | phsultan | 2007-10-07 18:15:39 +0200 (Sun, 07 Oct 2007) | 5 lines

Presence packets from a client who's connected with our Jabber ID are
valid, therefore, those clients must be considered as buddies. The resource
string helps us make the distinction between clients.

Closes issue #10707, reported by yusufmotiwala.
........

................
r84939 | phsultan | 2007-10-07 12:28:25 -0400 (Sun, 07 Oct 2007) | 3 lines

Make the status and priority configurable.

Closes issue #10785, patch by Luke-Jr, thanks!
................
r84958 | russell | 2007-10-07 23:29:38 -0400 (Sun, 07 Oct 2007) | 14 lines

Merged revisions 84957 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84957 | russell | 2007-10-07 22:28:34 -0500 (Sun, 07 Oct 2007) | 6 lines

Enable file dependency tracking for _all_ builds, and not just for builds with
dev-mode enabled.  I have seen enough problems caused by this that I don't think
it's worth keeping.  I want to continue to encourage anybody that is interested
to continue to run Asterisk from svn.  Furthermore, I do not want their systems
to break when we change a structure definition in a header file.  :)

........

................
r84991 | file | 2007-10-08 11:05:05 -0400 (Mon, 08 Oct 2007) | 12 lines

Merged revisions 84990 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84990 | file | 2007-10-08 12:03:07 -0300 (Mon, 08 Oct 2007) | 4 lines

Don't keep trying to native bridge if either of the channels are involved in a masquerade operation to be done.
(closes issue #10696)
Reported by: tbelder

........

................
r85024 | file | 2007-10-08 11:39:23 -0400 (Mon, 08 Oct 2007) | 12 lines

Merged revisions 85023 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85023 | file | 2007-10-08 12:37:46 -0300 (Mon, 08 Oct 2007) | 4 lines

Update codec information as well as address when doing hold reinvites.
(issue #10868)
Reported by: mavince

........

................
r85025 | file | 2007-10-08 12:12:21 -0400 (Mon, 08 Oct 2007) | 6 lines

Fix up tree so that it compiles when MTX Profiling is enabled.
(closes issue #10898)
Reported by: snuffy
Patches:
      10898-mtx_prof.diff uploaded by qwell (license 4)

................
r85058 | file | 2007-10-08 16:09:02 -0400 (Mon, 08 Oct 2007) | 12 lines

Merged revisions 85057 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85057 | file | 2007-10-08 17:06:33 -0300 (Mon, 08 Oct 2007) | 4 lines

Only update codec information if the channel has a technology private structure.
(issue #10915)
Reported by: ramonpeek

........

................
r85094 | file | 2007-10-09 10:31:27 -0400 (Tue, 09 Oct 2007) | 12 lines

Merged revisions 85093 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r85093 | file | 2007-10-09 11:30:16 -0300 (Tue, 09 Oct 2007) | 4 lines

Don't perform a reinvite if a transfer is in progress.
(issue #10915)
Reported by: ramonpeek

........

................
r85097 | russell | 2007-10-09 11:10:14 -0400 (Tue, 09 Oct 2007) | 8 lines

Add jitterbuffer support for chan_local.  To enable it, you use the 'j' option
in the Dial command.  The 'j' option _must_ be used in conjunction with the 'n'
option.

This feature will allow you to use the existing jitterbuffer implementation to
put a jitterbuffer on incoming SIP calls connecting to Asterisk applications by
putting a local channel in the middle.

................
r85098 | russell | 2007-10-09 11:12:59 -0400 (Tue, 09 Oct 2007) | 2 lines

Note jitterbuffer support for chan_local in CHANGES

................

Modified:
    team/group/v6/trunk/   (props changed)
    team/group/v6/trunk/CHANGES
    team/group/v6/trunk/Makefile
    team/group/v6/trunk/Makefile.rules
    team/group/v6/trunk/apps/app_queue.c
    team/group/v6/trunk/build_tools/prep_tarball
    team/group/v6/trunk/channels/chan_local.c
    team/group/v6/trunk/channels/chan_sip.c
    team/group/v6/trunk/channels/chan_zap.c
    team/group/v6/trunk/configs/jabber.conf.sample
    team/group/v6/trunk/doc/tex/extensions.tex
    team/group/v6/trunk/doc/tex/localchannel.tex
    team/group/v6/trunk/include/asterisk/jabber.h
    team/group/v6/trunk/include/asterisk/pbx.h
    team/group/v6/trunk/main/ast_expr2.c
    team/group/v6/trunk/main/channel.c
    team/group/v6/trunk/main/db.c
    team/group/v6/trunk/main/manager.c
    team/group/v6/trunk/main/pbx.c
    team/group/v6/trunk/main/rtp.c
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-ntest10
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-test1
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-test18
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-test19
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-test3
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-test5
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-test8
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-vtest13
    team/group/v6/trunk/pbx/ael/ael-test/ref.ael-vtest17
    team/group/v6/trunk/res/ael/pval.c
    team/group/v6/trunk/res/res_features.c
    team/group/v6/trunk/res/res_jabber.c
    team/group/v6/trunk/res/res_limit.c
    team/group/v6/trunk/utils/check_expr.c
    team/group/v6/trunk/utils/conf2ael.c
    team/group/v6/trunk/utils/hashtest2.c

Propchange: team/group/v6/trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/group/v6/trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/v6/trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Oct  9 10:26:00 2007
@@ -1,1 +1,1 @@
-/trunk:1-84402
+/trunk:1-85108

Modified: team/group/v6/trunk/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/CHANGES?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/CHANGES (original)
+++ team/group/v6/trunk/CHANGES Tue Oct  9 10:26:00 2007
@@ -141,9 +141,9 @@
   * SMDI is now enabled in voicemail using the smdienable option.
   * A "lockmode" option has been added to asterisk.conf to configure the file
      locking method used for voicemail, and potentially other things in the
-	 future.  The default is the old behavior, lockfile.  However, there is a
-	 new method, "flock", that uses a different method for situations where the
-	 lockfile will not work, such as on SMB/CIFS mounts.
+     future.  The default is the old behavior, lockfile.  However, there is a
+     new method, "flock", that uses a different method for situations where the
+     lockfile will not work, such as on SMB/CIFS mounts.
 
 Queue changes
 -------------
@@ -289,3 +289,9 @@
      to just UNKNOWN if the extension exists.
   * When originating a call using AMI or pbx_spool that fails the reason for failure
      will now be available in the failed extension using the REASON dialplan variable.
+  * Added jitterbuffer support for chan_local.  This allows you to use the
+     generic jitterbuffer on incoming calls going to Asterisk applications.
+     For example, this would allow you to use a jitterbuffer for an incoming
+     SIP call to Voicemail by putting a Local channel in the middle.  This
+     feature is enabled by using the 'j' option in the Dial string to the Local
+     channel in conjunction with the existing 'n' option for local channels.

Modified: team/group/v6/trunk/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/Makefile?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/Makefile (original)
+++ team/group/v6/trunk/Makefile Tue Oct  9 10:26:00 2007
@@ -728,7 +728,7 @@
 menuselect/gmenuselect: makeopts menuselect/menuselect.c menuselect/menuselect_gtk.c menuselect/menuselect_stub.c menuselect/menuselect.h menuselect/linkedlists.h makeopts
 	@CC="$(HOST_CC)" CXX="$(CXX)" LD="" AR="" RANLIB="" CFLAGS="" $(MAKE) -C menuselect _gmenuselect 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
+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
 	@echo "Generating input for menuselect ..."
 	@build_tools/prep_moduledeps > $@
 

Modified: team/group/v6/trunk/Makefile.rules
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/Makefile.rules?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/Makefile.rules (original)
+++ team/group/v6/trunk/Makefile.rules Tue Oct  9 10:26:00 2007
@@ -40,11 +40,7 @@
 
 %.o: %.c
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS)
-endif
 
 %.o: %.i
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
@@ -64,19 +60,11 @@
 
 %.o: %.s
 	$(ECHO_PREFIX) echo "   [AS] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS)
-endif
 
 %.oo: %.cc
 	$(ECHO_PREFIX) echo "   [CXX] $< -> $@"
-ifeq ($(AST_DEVMODE),yes)
 	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS)) -MMD -MT $@ -MF .$(subst /,_,$@).d -MP
-else
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(PTHREAD_CFLAGS) $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations,$(ASTCFLAGS))
-endif
 
 %.c: %.y
 	$(ECHO_PREFIX) echo "   [BISON] $< -> $@"

Modified: team/group/v6/trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/apps/app_queue.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/apps/app_queue.c (original)
+++ team/group/v6/trunk/apps/app_queue.c Tue Oct  9 10:26:00 2007
@@ -815,7 +815,8 @@
 	q->monfmt[0] = '\0';
 	q->periodicannouncefrequency = 0;
 	q->sound_callerannounce[0] = '\0';	/* Default, don't announce the caller that he has been answered */
-	q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn);
+	if(!q->members)
+		q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn);
 	q->membercount = 0;
 	q->found = 1;
 	ast_copy_string(q->sound_next, "queue-youarenext", sizeof(q->sound_next));
@@ -4425,6 +4426,7 @@
 	int qmemcount = 0;
 	int qmemavail = 0;
 	int qchancount = 0;
+	int qlongestholdtime = 0;
 	const char *id = astman_get_header(m, "ActionID");
 	const char *queuefilter = astman_get_header(m, "Queue");
 	char idText[256] = "";
@@ -4444,6 +4446,12 @@
 
 		/* List queue properties */
 		if (ast_strlen_zero(queuefilter) || !strcmp(q->name, queuefilter)) {
+			/* Reset the necessary local variables if no queuefilter is set*/
+			qmemcount = 0;
+			qmemavail = 0;
+			qchancount = 0;
+			qlongestholdtime = 0;
+
 			/* List Queue Members */
 			mem_iter = ao2_iterator_init(q->members, 0);
 			while ((mem = ao2_iterator_next(&mem_iter))) {
@@ -4456,6 +4464,9 @@
 				ao2_ref(mem, -1);
 			}
 			for (qe = q->head; qe; qe = qe->next) {
+				if ((now - qe->start) > qlongestholdtime) {
+					qlongestholdtime = now - qe->start;
+				}
 				++qchancount;
 			}
 			astman_append(s, "Event: QueueSummary\r\n"
@@ -4464,9 +4475,10 @@
 				"Available: %d\r\n"
 				"Callers: %d\r\n" 
 				"HoldTime: %d\r\n"
+				"LongestHoldTime: %d\r\n"
 				"%s"
 				"\r\n",
-				q->name, qmemcount, qmemavail, qchancount, q->holdtime, idText);
+				q->name, qmemcount, qmemavail, qchancount, q->holdtime, qlongestholdtime, idText);
 		}
 		ao2_unlock(q);
 		queue_unref(q);
@@ -4824,7 +4836,7 @@
 				tmp = m->membername;
 				ao2_ref(m, -1);
 				queue_unref(q);
-				return tmp;
+				return ast_strdup(tmp);
 			}
 			ao2_ref(m, -1);
 		}

Modified: team/group/v6/trunk/build_tools/prep_tarball
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/build_tools/prep_tarball?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/build_tools/prep_tarball (original)
+++ team/group/v6/trunk/build_tools/prep_tarball Tue Oct  9 10:26:00 2007
@@ -7,8 +7,6 @@
 
 make -C sounds all MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM MENUSELECT_MOH=MOH-FREEPLAY-WAV WGET=wget DOWNLOAD=wget
 
-make menuselect-tree
-
 VERSION=`cat .version`
 sed -i -e "s/ASTERISKVERSION/${VERSION}/" doc/tex/asterisk.tex
 cd doc/tex && rubber --pdf asterisk.tex

Modified: team/group/v6/trunk/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/channels/chan_local.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/channels/chan_local.c (original)
+++ team/group/v6/trunk/channels/chan_local.c Tue Oct  9 10:26:00 2007
@@ -65,6 +65,13 @@
 static const char tdesc[] = "Local Proxy Channel Driver";
 
 #define IS_OUTBOUND(a,b) (a == b->chan ? 1 : 0)
+
+static struct ast_jb_conf g_jb_conf = {
+	.flags = 0,
+	.max_size = -1,
+	.resync_threshold = -1,
+	.impl = "",
+};
 
 static struct ast_channel *local_request(const char *type, int format, void *data, int *cause);
 static int local_digit_begin(struct ast_channel *ast, char digit);
@@ -108,6 +115,7 @@
 	char context[AST_MAX_CONTEXT];		/* Context to call */
 	char exten[AST_MAX_EXTENSION];		/* Extension to call */
 	int reqformat;				/* Requested format */
+	struct ast_jb_conf jb_conf;		/*!< jitterbuffer configuration for this local channel */
 	struct ast_channel *owner;		/* Master Channel */
 	struct ast_channel *chan;		/* Outbound channel */
 	struct ast_module_user *u_owner;	/*! reference to keep the module loaded while in use */
@@ -563,11 +571,21 @@
 	ast_mutex_init(&tmp->lock);
 	ast_copy_string(tmp->exten, data, sizeof(tmp->exten));
 
+	memcpy(&tmp->jb_conf, &g_jb_conf, sizeof(tmp->jb_conf));
+
 	/* Look for options */
 	if ((opts = strchr(tmp->exten, '/'))) {
 		*opts++ = '\0';
 		if (strchr(opts, 'n'))
 			ast_set_flag(tmp, LOCAL_NO_OPTIMIZATION);
+		if (strchr(opts, 'j')) {
+			if (ast_test_flag(tmp, LOCAL_NO_OPTIMIZATION))
+				ast_set_flag(&tmp->jb_conf, AST_JB_ENABLED);
+			else {
+				ast_log(LOG_ERROR, "You must use the 'n' option for chan_local "
+					"to use the 'j' option to enable the jitterbuffer\n");
+			}
+		}
 	}
 
 	/* Look for a context */
@@ -652,6 +670,8 @@
 	tmp->priority = 1;
 	tmp2->priority = 1;
 
+	ast_jb_configure(tmp, &p->jb_conf);
+
 	return tmp;
 }
 

Modified: team/group/v6/trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/channels/chan_sip.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/channels/chan_sip.c (original)
+++ team/group/v6/trunk/channels/chan_sip.c Tue Oct  9 10:26:00 2007
@@ -19006,7 +19006,7 @@
 			changed = 1;
 		}
 	}
-	if (changed && !ast_test_flag(&p->flags[0], SIP_GOTREFER)) {
+	if (changed && !ast_test_flag(&p->flags[0], SIP_GOTREFER) && !ast_test_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER)) {
 		if (rtp)
 			ast_vinetsock_sa_getaddr((struct sockaddr*)&p->redirip, p->redirip_len, iabuf, sizeof(iabuf));
 		else

Modified: team/group/v6/trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/channels/chan_zap.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/channels/chan_zap.c (original)
+++ team/group/v6/trunk/channels/chan_zap.c Tue Oct  9 10:26:00 2007
@@ -1359,25 +1359,25 @@
 	case SIG_FXOKS:
 		return "FXO Kewlstart";
 	case SIG_PRI:
-		return "PRI Signalling";
+		return "ISDN PRI";
 	case SIG_SS7:
-		return "SS7 Signalling";
+		return "SS7";
 	case SIG_SF:
-		return "SF (Tone) Signalling Immediate";
+		return "SF (Tone) Immediate";
 	case SIG_SFWINK:
-		return "SF (Tone) Signalling Wink";
+		return "SF (Tone) Wink";
 	case SIG_SF_FEATD:
-		return "SF (Tone) Signalling with Feature Group D (DTMF)";
+		return "SF (Tone) with Feature Group D (DTMF)";
 	case SIG_SF_FEATDMF:
-		return "SF (Tone) Signalling with Feature Group D (MF)";
+		return "SF (Tone) with Feature Group D (MF)";
 	case SIG_SF_FEATB:
-		return "SF (Tone) Signalling with Feature Group B (MF)";
+		return "SF (Tone) with Feature Group B (MF)";
 	case SIG_GR303FXOKS:
-		return "GR-303 Signalling with FXOKS";
+		return "GR-303 with FXOKS";
 	case SIG_GR303FXSKS:
-		return "GR-303 Signalling with FXSKS";
+		return "GR-303 with FXSKS";
 	case 0:
-		return "Pseudo Signalling";
+		return "Pseudo";
 	default:
 		snprintf(buf, sizeof(buf), "Unknown signalling %d", sig);
 		return buf;
@@ -3475,7 +3475,11 @@
 		return AST_BRIDGE_FAILED_NOWARN;
 
 	ast_channel_lock(c0);
-	ast_channel_lock(c1);
+	while (ast_channel_trylock(c1)) {
+		ast_channel_unlock(c0);
+		usleep(1);
+		ast_channel_lock(c0);
+	}
 
 	p0 = c0->tech_pvt;
 	p1 = c1->tech_pvt;
@@ -3641,8 +3645,13 @@
 
 		/* Here's our main loop...  Start by locking things, looking for private parts, 
 		   and then balking if anything is wrong */
+		
 		ast_channel_lock(c0);
-		ast_channel_lock(c1);
+		while (ast_channel_trylock(c1)) {
+			ast_channel_unlock(c0);
+			usleep(1);
+			ast_channel_lock(c0);
+		}
 
 		p0 = c0->tech_pvt;
 		p1 = c1->tech_pvt;

Modified: team/group/v6/trunk/configs/jabber.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/configs/jabber.conf.sample?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/configs/jabber.conf.sample (original)
+++ team/group/v6/trunk/configs/jabber.conf.sample Tue Oct  9 10:26:00 2007
@@ -9,10 +9,13 @@
 					;;	talk.google.com
 ;username=asterisk at astjab.org/asterisk	;;Username with optional roster.
 ;secret=blah				;;Password
+;priority=1				;;Resource priority
 ;port=5222				;;Port to use defaults to 5222
 ;usetls=yes				;;Use tls or not
 ;usesasl=yes				;;Use sasl or not
 ;buddy=mogorman at astjab.org		;;Manual addition of buddy to list.
+;status=available			;;One of: chat, available, away,
+					;;	xaway, or dnd
 ;statusmessage="I am available"		;;Have custom status message for
 					;;Asterisk.
 ;timeout=100				;;Timeout on the message stack.

Modified: team/group/v6/trunk/doc/tex/extensions.tex
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/doc/tex/extensions.tex?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/doc/tex/extensions.tex (original)
+++ team/group/v6/trunk/doc/tex/extensions.tex Tue Oct  9 10:26:00 2007
@@ -66,6 +66,14 @@
           timeout is reached.  See "show function TIMEOUT" for more
           information on setting timeouts.	
   \end{itemize}
+  \item e
+  \begin{itemize}
+    \item This extension will substitute as a catchall for any of the
+          'i', 't', or 'T' extensions, if any of them do not exist and
+          catching the error in a single routine is desired.  The
+          function EXCEPTION may be used to query the type of exception
+          or the location where it occurred.
+  \end{itemize}
 \end{itemize}
 
 And finally, the extension context "default" is used when either a) an 

Modified: team/group/v6/trunk/doc/tex/localchannel.tex
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/doc/tex/localchannel.tex?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/doc/tex/localchannel.tex (original)
+++ team/group/v6/trunk/doc/tex/localchannel.tex Tue Oct  9 10:26:00 2007
@@ -8,6 +8,8 @@
 \end{verbatim}
 
 Adding "/n" at the end of the string will make the Local channel not do a native transfer (the "n" stands for "n"o release) upon the remote end answering the line. This is an esoteric, but important feature if you expect the Local channel to handle calls exactly like a normal channel. If you do not have the "no release" feature set, then as soon as the destination (inside of the Local channel) answers the line, the variables and dial plan will revert back to that of the original call, and the Local channel will become a zombie and be removed from the active channels list. This is desirable in some circumstances, but can result in unexpected dialplan behavior if you are doing fancy things with variables in your call handling.
+
+There is another option that can be used with local channels, which is the "j" option.  The "j" option must be used with the "n" option to make sure that the local channel does not get optimized out of the call.  This option will enable a jitterbuffer on the local channel.  The jitterbuffer will be used to de-jitter audio that it receives from the channel that called the local channel.  This is especially in the case of putting chan\_local in between an incoming SIP call and Asterisk applications, so that the incoming audio will be de-jittered.
 
 \subsection{Purpose}
 

Modified: team/group/v6/trunk/include/asterisk/jabber.h
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/include/asterisk/jabber.h?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/include/asterisk/jabber.h (original)
+++ team/group/v6/trunk/include/asterisk/jabber.h Tue Oct  9 10:26:00 2007
@@ -155,6 +155,8 @@
 	AST_LIST_HEAD(messages,aji_message) messages;
 	void *jingle;
 	pthread_t thread;
+	int priority;
+	enum ikshowtype status;
 };
 
 struct aji_client_container{

Modified: team/group/v6/trunk/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/include/asterisk/pbx.h?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/include/asterisk/pbx.h (original)
+++ team/group/v6/trunk/include/asterisk/pbx.h Tue Oct  9 10:26:00 2007
@@ -37,6 +37,9 @@
 #define AST_PBX_REPLACE 1
 
 /*! \brief Special return values from applications to the PBX { */
+#define AST_PBX_HANGUP	        -1	/*!< Jump to the 'h' exten */
+#define AST_PBX_OK	        0	/*!< No errors */
+#define AST_PBX_ERROR	        1	/*!< Jump to the 'e' exten */
 #define AST_PBX_KEEPALIVE	10	/*!< Destroy the thread, but don't hang up the channel */
 #define AST_PBX_NO_HANGUP_PEER	11
 /*! } */
@@ -840,6 +843,7 @@
 void pbx_retrieve_variable(struct ast_channel *c, const char *var, char **ret, char *workspace, int workspacelen, struct varshead *headp);
 void pbx_builtin_clear_globals(void);
 int pbx_builtin_setvar(struct ast_channel *chan, void *data);
+int pbx_builtin_raise_exception(struct ast_channel *chan, void *data);
 void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char *cp2,int count);
 void pbx_substitute_variables_varshead(struct varshead *headp, const char *cp1, char *cp2, int count);
 

Modified: team/group/v6/trunk/main/ast_expr2.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/main/ast_expr2.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/main/ast_expr2.c (original)
+++ team/group/v6/trunk/main/ast_expr2.c Tue Oct  9 10:26:00 2007
@@ -144,6 +144,8 @@
 #include <sys/types.h>
 #include <stdio.h>
 #include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #define FP___PRINTF "%.18Lg"
 #define FP___TYPE    long double

Modified: team/group/v6/trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/main/channel.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/main/channel.c (original)
+++ team/group/v6/trunk/main/channel.c Tue Oct  9 10:26:00 2007
@@ -4166,7 +4166,8 @@
 		    !nativefailed && !c0->monitor && !c1->monitor &&
 		    !c0->audiohooks && !c1->audiohooks && 
 		    !ast_test_flag(&(config->features_callee),AST_FEATURE_REDIRECT) &&
-		    !ast_test_flag(&(config->features_caller),AST_FEATURE_REDIRECT) ) {
+		    !ast_test_flag(&(config->features_caller),AST_FEATURE_REDIRECT) &&
+		    !c0->masq && !c0->masqr && !c1->masq && !c1->masqr) {
 			/* Looks like they share a bridge method and nothing else is in the way */
 			ast_set_flag(c0, AST_FLAG_NBRIDGE);
 			ast_set_flag(c1, AST_FLAG_NBRIDGE);

Modified: team/group/v6/trunk/main/db.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/main/db.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/main/db.c (original)
+++ team/group/v6/trunk/main/db.c Tue Oct  9 10:26:00 2007
@@ -63,7 +63,7 @@
 static int dbinit(void) 
 {
 	if (!astdb && !(astdb = dbopen((char *)ast_config_AST_DB, O_CREAT | O_RDWR, AST_FILE_MODE, DB_BTREE, NULL))) {
-		ast_log(LOG_WARNING, "Unable to open Asterisk database\n");
+		ast_log(LOG_WARNING, "Unable to open Asterisk database '%s': %s\n", ast_config_AST_DB, strerror(errno));
 		return -1;
 	}
 	return 0;

Modified: team/group/v6/trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/main/manager.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/main/manager.c (original)
+++ team/group/v6/trunk/main/manager.c Tue Oct  9 10:26:00 2007
@@ -1302,8 +1302,8 @@
 }
 
 static char mandescr_updateconfig[] =
-"Description: A 'UpdateConfig' action will dump the contents of a configuration\n"
-"file by category and contents.\n"
+"Description: A 'UpdateConfig' action will modify, create, or delete\n"
+"configuration elements in Asterisk configuration files.\n"
 "Variables (X's represent 6 digit number beginning with 000000):\n"
 "   SrcFilename:   Configuration filename to read(e.g. foo.conf)\n"
 "   DstFilename:   Configuration filename to write(e.g. foo.conf)\n"

Modified: team/group/v6/trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/v6/trunk/main/pbx.c?view=diff&rev=85131&r1=85130&r2=85131
==============================================================================
--- team/group/v6/trunk/main/pbx.c (original)
+++ team/group/v6/trunk/main/pbx.c Tue Oct  9 10:26:00 2007
@@ -248,6 +248,16 @@
 	.thread = AST_PTHREADT_NULL,
 };
 
+struct pbx_exception {
+	AST_DECLARE_STRING_FIELDS(
+		AST_STRING_FIELD(context);	/*!< Context associated with this exception */
+		AST_STRING_FIELD(exten);	/*!< Exten associated with this exception */
+		AST_STRING_FIELD(type);		/*!< The type of exception */
+	);
+
+	int priority;				/*!< Priority associated with this exception */
+};
+
 static int pbx_builtin_answer(struct ast_channel *, void *);
 static int pbx_builtin_goto(struct ast_channel *, void *);
 static int pbx_builtin_hangup(struct ast_channel *, void *);
@@ -270,7 +280,9 @@
 static int pbx_builtin_saycharacters(struct ast_channel *, void *);
 static int pbx_builtin_sayphonetic(struct ast_channel *, void *);
 int pbx_builtin_setvar(struct ast_channel *, void *);
+static int pbx_builtin_setvar_multiple(struct ast_channel *, void *);
 static int pbx_builtin_importvar(struct ast_channel *, void *);
+static void set_ext_pri(struct ast_channel *c, const char *exten, int pri);
 
 AST_RWLOCK_DEFINE_STATIC(globalslock);
 static struct varshead globals = AST_LIST_HEAD_NOLOCK_INIT_VALUE;
@@ -433,6 +445,13 @@
 	"be provided to the calling channel.\n"
 	},
 
+	{ "RaiseException", pbx_builtin_raise_exception,
+	"Handle an exceptional condition",
+	"  RaiseException(<reason>): This application will jump to the \"e\" extension\n"
+	"in the current context, setting the dialplan function EXCEPTION().  If the \"e\"\n"
+	"extension does not exist, the call will hangup.\n"
+	},
+
 	{ "ResetCDR", pbx_builtin_resetcdr,
 	"Resets the Call Data Record",
 	"  ResetCDR([options]):  This application causes the Call Data Record to be\n"
@@ -478,7 +497,7 @@
 	},
 
 	{ "Set", pbx_builtin_setvar,
-	"Set channel variable(s) or function value(s)",
+	"Set channel variable or function value",
 	"  Set(name=value)\n"
 	"This function can be used to set the value of channel variables or dialplan\n"
 	"functions. When setting variables, if the variable name is prefixed with _,\n"
@@ -486,6 +505,19 @@
 	"channel. If the variable name is prefixed with __, the variable will be\n"
 	"inherited into channels created from the current channel and all children\n"
 	"channels.\n"
+	},
+
+	{ "MSet", pbx_builtin_setvar_multiple,
+	"Set channel variable(s) or function value(s)",
+	"  MSet(name1=value1,name2=value2,...)\n"
+	"This function can be used to set the value of channel variables or dialplan\n"
+	"functions. When setting variables, if the variable name is prefixed with _,\n"
+	"the variable will be inherited into channels created from the current\n"
+	"channel. If the variable name is prefixed with __, the variable will be\n"
+	"inherited into channels created from the current channel and all children\n"
+	"channels.\n\n"
+	"MSet behaves in a similar fashion to the way Set worked in 1.2/1.4 and is thus\n"
+	"prone to doing things that you may not expect.  Avoid its use if possible.\n"
 	},
 
 	{ "SetAMAFlags", pbx_builtin_setamaflags,
@@ -1245,6 +1277,84 @@
 			*ret = substring(*ret, offset, length, workspace, workspacelen);
 	}
 }
+
+static void exception_store_free(void *data)
+{
+	struct pbx_exception *exception = data;
+	ast_string_field_free_pools(exception);
+	ast_free(exception);
+}
+
+static struct ast_datastore_info exception_store_info = {
+	.type = "EXCEPTION",
+	.destroy = exception_store_free,
+};
+
+int pbx_builtin_raise_exception(struct ast_channel *chan, void *vtype)
+{
+	const char *type = vtype;
+	struct ast_datastore *ds = ast_channel_datastore_find(chan, &exception_store_info, NULL);
+	struct pbx_exception *exception = NULL;
+
+	if (!ds) {
+		ds = ast_channel_datastore_alloc(&exception_store_info, NULL);
+		if (!ds)
+			return -1;
+		exception = ast_calloc(1, sizeof(struct pbx_exception));
+		if (!ds->data) {
+			ast_channel_datastore_free(ds);
+			return -1;
+		}
+		if (ast_string_field_init(exception, 128)) {
+			ast_free(exception);
+			ast_channel_datastore_free(ds);
+			return -1;
+		}
+		ds->data = exception;
+		ast_channel_datastore_add(chan, ds);
+	} else
+		exception = ds->data;
+
+	ast_string_field_set(exception, type, type);
+	ast_string_field_set(exception, context, chan->context);
+	ast_string_field_set(exception, exten, chan->exten);
+	exception->priority = chan->priority;
+	set_ext_pri(chan, "e", 1);
+	return 0;
+}
+
+static int acf_exception_read(struct ast_channel *chan, const char *name, char *data, char *buf, size_t buflen)
+{
+	struct ast_datastore *ds = ast_channel_datastore_find(chan, &exception_store_info, NULL);
+	struct pbx_exception *exception = NULL;
+	if (!ds || !ds->data)
+		return -1;
+	exception = ds->data;
+	if (!strcasecmp(data, "TYPE"))
+		ast_copy_string(buf, exception->type, buflen);
+	else if (!strcasecmp(data, "CONTEXT"))
+		ast_copy_string(buf, exception->context, buflen);

[... 1971 lines stripped ...]



More information about the asterisk-commits mailing list