[asterisk-commits] murf: branch group/CDRfix5 r85155 - in /team/group/CDRfix5: ./ apps/ channels...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 9 12:58:43 CDT 2007


Author: murf
Date: Tue Oct  9 12:58:43 2007
New Revision: 85155

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85155
Log:
Merged revisions 85094,85097-85098,85140 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r85094 | file | 2007-10-09 08:31:27 -0600 (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 09:10:14 -0600 (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 09:12:59 -0600 (Tue, 09 Oct 2007) | 2 lines

Note jitterbuffer support for chan_local in CHANGES

................
r85140 | tilghman | 2007-10-09 10:04:41 -0600 (Tue, 09 Oct 2007) | 2 lines

Remove redundant includes (patch by snuffy) (Closes issue #10922)

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

Modified:
    team/group/CDRfix5/   (props changed)
    team/group/CDRfix5/CHANGES
    team/group/CDRfix5/apps/app_adsiprog.c
    team/group/CDRfix5/apps/app_dial.c
    team/group/CDRfix5/apps/app_festival.c
    team/group/CDRfix5/apps/app_minivm.c
    team/group/CDRfix5/apps/app_zapras.c
    team/group/CDRfix5/channels/chan_jingle.c
    team/group/CDRfix5/channels/chan_local.c
    team/group/CDRfix5/channels/chan_misdn.c
    team/group/CDRfix5/channels/chan_sip.c
    team/group/CDRfix5/doc/tex/localchannel.tex
    team/group/CDRfix5/utils/astman.c
    team/group/CDRfix5/utils/check_expr.c

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

Propchange: team/group/CDRfix5/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Oct  9 12:58:43 2007
@@ -1,1 +1,1 @@
-/trunk:1-85066
+/trunk:1-85154

Modified: team/group/CDRfix5/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/CHANGES?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/CHANGES (original)
+++ team/group/CDRfix5/CHANGES Tue Oct  9 12:58:43 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,6 +289,12 @@
      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.
 
 CDR changes
 -----------

Modified: team/group/CDRfix5/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/apps/app_adsiprog.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/apps/app_adsiprog.c (original)
+++ team/group/CDRfix5/apps/app_adsiprog.c Tue Oct  9 12:58:43 2007
@@ -38,7 +38,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#include <stdlib.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <errno.h>

Modified: team/group/CDRfix5/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/apps/app_dial.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/apps/app_dial.c (original)
+++ team/group/CDRfix5/apps/app_dial.c Tue Oct  9 12:58:43 2007
@@ -33,7 +33,6 @@
 #include <errno.h>
 #include <unistd.h>
 #include <string.h>
-#include <stdlib.h>
 #include <stdio.h>
 #include <sys/time.h>
 #include <sys/signal.h>

Modified: team/group/CDRfix5/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/apps/app_festival.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/apps/app_festival.c (original)
+++ team/group/CDRfix5/apps/app_festival.c Tue Oct  9 12:58:43 2007
@@ -36,15 +36,12 @@
 #include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <stdio.h>
 #include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
 #include <fcntl.h>
 #include <ctype.h>
 

Modified: team/group/CDRfix5/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/apps/app_minivm.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/apps/app_minivm.c (original)
+++ team/group/CDRfix5/apps/app_minivm.c Tue Oct  9 12:58:43 2007
@@ -145,7 +145,6 @@
 #include <errno.h>
 #include <unistd.h>
 #include <string.h>
-#include <stdlib.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <sys/time.h>

Modified: team/group/CDRfix5/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/apps/app_zapras.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/apps/app_zapras.c (original)
+++ team/group/CDRfix5/apps/app_zapras.c Tue Oct  9 12:58:43 2007
@@ -44,7 +44,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#include <stdlib.h>
 #include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>

Modified: team/group/CDRfix5/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/channels/chan_jingle.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/channels/chan_jingle.c (original)
+++ team/group/CDRfix5/channels/chan_jingle.c Tue Oct  9 12:58:43 2007
@@ -43,7 +43,6 @@
 #include <unistd.h>
 #include <sys/socket.h>
 #include <errno.h>
-#include <stdlib.h>
 #include <fcntl.h>
 #include <netdb.h>
 #include <netinet/in.h>

Modified: team/group/CDRfix5/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/channels/chan_local.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/channels/chan_local.c (original)
+++ team/group/CDRfix5/channels/chan_local.c Tue Oct  9 12:58:43 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/CDRfix5/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/channels/chan_misdn.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/channels/chan_misdn.c (original)
+++ team/group/CDRfix5/channels/chan_misdn.c Tue Oct  9 12:58:43 2007
@@ -302,7 +302,7 @@
 #define MISDN_ASTERISK_TECH_PVT(ast) ast->tech_pvt
 #define MISDN_ASTERISK_PVT(ast) 1
 
-#include <asterisk/strings.h>
+#include "asterisk/strings.h"
 
 /* #define MISDN_DEBUG 1 */
 

Modified: team/group/CDRfix5/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/channels/chan_sip.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/channels/chan_sip.c (original)
+++ team/group/CDRfix5/channels/chan_sip.c Tue Oct  9 12:58:43 2007
@@ -18672,7 +18672,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 (chan->_state != AST_STATE_UP) {	/* We are in early state */
 			if (p->do_history)
 				append_history(p, "ExtInv", "Initial invite sent with remote bridge proposal.");

Modified: team/group/CDRfix5/doc/tex/localchannel.tex
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/doc/tex/localchannel.tex?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/doc/tex/localchannel.tex (original)
+++ team/group/CDRfix5/doc/tex/localchannel.tex Tue Oct  9 12:58:43 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/CDRfix5/utils/astman.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/utils/astman.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/utils/astman.c (original)
+++ team/group/CDRfix5/utils/astman.c Tue Oct  9 12:58:43 2007
@@ -32,7 +32,6 @@
 #include <sys/select.h>
 #include <fcntl.h>
 #include <string.h>
-#include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>

Modified: team/group/CDRfix5/utils/check_expr.c
URL: http://svn.digium.com/view/asterisk/team/group/CDRfix5/utils/check_expr.c?view=diff&rev=85155&r1=85154&r2=85155
==============================================================================
--- team/group/CDRfix5/utils/check_expr.c (original)
+++ team/group/CDRfix5/utils/check_expr.c Tue Oct  9 12:58:43 2007
@@ -31,8 +31,8 @@
 	char x; /* basically empty! */
 };
 
-#include <../include/asterisk/compat.h>
-#include <../include/asterisk/ast_expr.h>
+#include "../include/asterisk/compat.h"
+#include "../include/asterisk/ast_expr.h"
 
 #define AST_API_MODULE 1
 #include "asterisk/inline_api.h"




More information about the asterisk-commits mailing list