[svn-commits] mnicholson: trunk r332023 - in /trunk: ./ channels/ configs/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Aug 16 09:41:27 CDT 2011


Author: mnicholson
Date: Tue Aug 16 09:41:23 2011
New Revision: 332023

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=332023
Log:
Merged revisions 332022 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332022 | mnicholson | 2011-08-16 09:40:37 -0500 (Tue, 16 Aug 2011) | 16 lines
  
  In 10 and trunk this option is disabled by default.
  
  Merged revisions 332021 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332021 | mnicholson | 2011-08-16 09:20:43 -0500 (Tue, 16 Aug 2011) | 7 lines
    
    Added the 'storesipcause' option to sip.conf to allow the user to disable the
    setting of HASH(SIP_CAUSE,<chan name>) on the channel.
    
    Having chan_sip set HASH(SIP_CAUSE,<chan name>) on the channel carries a
    significant performance penalty because of the usage of the MASTER_CHANNEL()
    dialplan function.
  ........
................

Modified:
    trunk/   (props changed)
    trunk/CHANGES
    trunk/channels/chan_sip.c
    trunk/configs/sip.conf.sample

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=332023&r1=332022&r2=332023
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Aug 16 09:41:23 2011
@@ -190,6 +190,9 @@
 SIP Changes
 -----------
  * Add T38 support for REJECTED state where T.38 Negotiation is explicitly rejected.
+ * Setting of HASH(SIP_CAUSE,<slave-channel-name>) on channels is now disabled
+   by default. It can be enabled using the 'storesipcause' option. This feature
+   has a significant performance penalty.
 
 Queue changes
 -------------
@@ -256,7 +259,9 @@
    and enables symmetric RTP support.
  * Slave SIP channels now set HASH(SIP_CAUSE,<slave-channel-name>) on each
    response.  This permits the master channel to know how each channel dialled
-   in a multi-channel setup resolved in an individual way.
+   in a multi-channel setup resolved in an individual way. This carries a
+   performance penalty and can be disabled in sip.conf using the
+   'storesipcause' option.
  * Added 'externtcpport' and 'externtlsport' options to allow custom port
    configuration for the externip and externhost options when tcp or tls is used.
  * Added support for message body (stored in content variable) to SIP NOTIFY message

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=332023&r1=332022&r2=332023
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Aug 16 09:41:23 2011
@@ -746,6 +746,8 @@
 static int global_min_se;                     /*!< Lowest threshold for session refresh interval  */
 static int global_max_se;                     /*!< Highest threshold for session refresh interval */
 
+static int global_store_sip_cause;    /*!< Whether the MASTER_CHANNEL(HASH(SIP_CAUSE,[chan_name])) var should be set */
+
 static int global_dynamic_exclude_static = 0; /*!< Exclude static peers from contact registrations */
 /*@}*/
 
@@ -17979,6 +17981,7 @@
 		ast_cli(a->fd, "  SIP realtime:           Enabled\n" );
 	ast_cli(a->fd, "  Qualify Freq :          %d ms\n", global_qualifyfreq);
 	ast_cli(a->fd, "  Q.850 Reason header:    %s\n", AST_CLI_YESNO(ast_test_flag(&global_flags[1], SIP_PAGE2_Q850_REASON)));
+	ast_cli(a->fd, "  Store SIP_CAUSE:        %s\n", AST_CLI_YESNO(global_store_sip_cause));
 	ast_cli(a->fd, "\nNetwork QoS Settings:\n");
 	ast_cli(a->fd, "---------------------------\n");
 	ast_cli(a->fd, "  IP ToS SIP:             %s\n", ast_tos2str(global_tos_sip));
@@ -25072,7 +25075,7 @@
 
 			handle_response(p, respid, e + len, req, seqno);
 
-			if (p->owner) {
+			if (global_store_sip_cause && p->owner) {
 				struct ast_channel *owner = p->owner;
 
 				snprintf(causevar, sizeof(causevar), "MASTER_CHANNEL(HASH(SIP_CAUSE,%s))", owner->name);
@@ -28108,6 +28111,7 @@
 	global_shrinkcallerid = 1;
 	authlimit = DEFAULT_AUTHLIMIT;
 	authtimeout = DEFAULT_AUTHTIMEOUT;
+	global_store_sip_cause = FALSE;
 
 	sip_cfg.matchexternaddrlocally = DEFAULT_MATCHEXTERNADDRLOCALLY;
 
@@ -28585,6 +28589,8 @@
 			} else {
 				global_st_refresher = i;
 			}
+		} else if (!strcasecmp(v->name, "storesipcause")) {
+			global_store_sip_cause = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "qualifygap")) {
 			if (sscanf(v->value, "%30d", &global_qualify_gap) != 1) {
 				ast_log(LOG_WARNING, "Invalid qualifygap '%s' at line %d of %s\n", v->value, v->lineno, config);

Modified: trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=332023&r1=332022&r2=332023
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Tue Aug 16 09:41:23 2011
@@ -1016,6 +1016,16 @@
                               ; but occasionally has spikes.
 
 ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
+
+;----------------------------- SIP_CAUSE reporting ---------------------------------
+; storesipcause = no          ; This option causes chan_sip to set the
+			      ; HASH(SIP_CAUSE,<channel name>) channel variable
+			      ; to the value of the last sip response.
+			      ; WARNING: enabling this option carries a
+			      ; significant performance burden. It should only
+			      ; be used in low call volume situations. This
+                              ; option defaults to "no".
+
 ;-----------------------------------------------------------------------------------
 
 [authentication]




More information about the svn-commits mailing list