[asterisk-commits] irroot: branch irroot/patches r336934 - /team/irroot/patches/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 20 06:23:10 CDT 2011


Author: irroot
Date: Tue Sep 20 06:23:09 2011
New Revision: 336934

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=336934
Log:
Expose storesipcause patch for Dovid on irc

Added:
    team/irroot/patches/storesipcause-1.8.patch   (with props)

Added: team/irroot/patches/storesipcause-1.8.patch
URL: http://svnview.digium.com/svn/asterisk/team/irroot/patches/storesipcause-1.8.patch?view=auto&rev=336934
==============================================================================
--- team/irroot/patches/storesipcause-1.8.patch (added)
+++ team/irroot/patches/storesipcause-1.8.patch Tue Sep 20 06:23:09 2011
@@ -1,0 +1,96 @@
+Index: channels/chan_sip.c
+===================================================================
+--- channels/chan_sip.c	(revision 331955)
++++ channels/chan_sip.c	(revision 332026)
+@@ -745,6 +745,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 */
+ /*@}*/
+ 
+@@ -17495,6 +17497,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));
+@@ -24422,7 +24425,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);
+@@ -27402,6 +27405,7 @@
+ 	global_shrinkcallerid = 1;
+ 	authlimit = DEFAULT_AUTHLIMIT;
+ 	authtimeout = DEFAULT_AUTHTIMEOUT;
++	global_store_sip_cause = DEFAULT_STORE_SIP_CAUSE;
+ 
+ 	sip_cfg.matchexternaddrlocally = DEFAULT_MATCHEXTERNADDRLOCALLY;
+ 
+@@ -27871,6 +27875,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);
+Index: channels/sip/include/sip.h
+===================================================================
+--- channels/sip/include/sip.h	(revision 331955)
++++ channels/sip/include/sip.h	(revision 332026)
+@@ -221,6 +221,7 @@
+ #define DEFAULT_SDPOWNER   "root"          /*!< Default SDP username field in (o=) header unless re-defined in sip.conf */
+ #define DEFAULT_ENGINE     "asterisk"      /*!< Default RTP engine to use for sessions */
+ #define DEFAULT_CAPABILITY (AST_FORMAT_ULAW | AST_FORMAT_TESTLAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_H263);
++#define DEFAULT_STORE_SIP_CAUSE TRUE      /*!< Store HASH(SIP_CAUSE,<channel name>) for channels by default */
+ #endif
+ /*@}*/
+ 
+Index: CHANGES
+===================================================================
+--- CHANGES	(revision 331955)
++++ CHANGES	(revision 332026)
+@@ -43,7 +43,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
+Index: configs/sip.conf.sample
+===================================================================
+--- configs/sip.conf.sample	(revision 331955)
++++ configs/sip.conf.sample	(revision 332026)
+@@ -1005,6 +1005,17 @@
+                               ; but occasionally has spikes.
+ 
+ ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
++
++;----------------------------- SIP_CAUSE reporting ---------------------------------
++; storesipcause = yes         ; 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. For
++			      ; historical reasons, this option defaults to
++			      ; "yes".
++
+ ;-----------------------------------------------------------------------------------
+ 
+ [authentication]

Propchange: team/irroot/patches/storesipcause-1.8.patch
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/irroot/patches/storesipcause-1.8.patch
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/irroot/patches/storesipcause-1.8.patch
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list