[asterisk-commits] kmoore: trunk r366408 - in /trunk: ./ apps/ channels/ configs/ funcs/ include...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 14 14:44:45 CDT 2012


Author: kmoore
Date: Mon May 14 14:44:27 2012
New Revision: 366408

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366408
Log:
Commit framework for HANGUPCAUSE (replacement for SIP_CAUSE)

This is the starting point for the Asterisk 11: Who Hung Up work and provides
a framework which will allow channel drivers to report the types of hangup
cause information available in SIP_CAUSE without incurring the overhead of the
MASTER_CHANNEL dialplan function. The initial implementation only includes
cause generation for chan_sip and does not include cause code translation
utilities.

This change deprecates SIP_CAUSE and replaces its method of reporting cause
codes with the new framework. This change also deprecates the 'storesipcause'
option in sip.conf.

Review: https://reviewboard.asterisk.org/r/1822/
(Closes issue SWP-4221)

Modified:
    trunk/UPGRADE.txt
    trunk/apps/app_dial.c
    trunk/apps/app_followme.c
    trunk/apps/app_queue.c
    trunk/channels/chan_alsa.c
    trunk/channels/chan_console.c
    trunk/channels/chan_gtalk.c
    trunk/channels/chan_h323.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_jingle.c
    trunk/channels/chan_mgcp.c
    trunk/channels/chan_misdn.c
    trunk/channels/chan_oss.c
    trunk/channels/chan_phone.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_skinny.c
    trunk/channels/chan_unistim.c
    trunk/channels/chan_vpb.cc
    trunk/configs/sip.conf.sample
    trunk/funcs/func_frame_trace.c
    trunk/include/asterisk/frame.h
    trunk/main/channel.c
    trunk/main/dial.c
    trunk/main/features.c
    trunk/main/file.c
    trunk/main/rtp_engine.c

Modified: trunk/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/trunk/UPGRADE.txt?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/UPGRADE.txt (original)
+++ trunk/UPGRADE.txt Mon May 14 14:44:27 2012
@@ -91,6 +91,11 @@
  - A new manager event, "SessionTimeout" has been added and is triggered when
    a call is terminated due to RTP stream inactivity or SIP session timer
    expiration.
+ - SIP_CAUSE is now deprecated.  It has been modified to use the same
+   mechanism as HANGUPCAUSE.  Behavior should not change, but performance
+   should be vastly improved.  The HANGUPCAUSE hash should now be used instead
+   of SIP_CAUSE. Because of this, the storesipcause option in sip.conf is also
+   deprecated.
 
 chan_unistim
  - Due to massive update in chan_unistim phone keys functions and on-screen 

Modified: trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dial.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Mon May 14 14:44:27 2012
@@ -1427,6 +1427,9 @@
 						cc_frame_received = 1;
 					}
 					break;
+				case AST_CONTROL_PVT_CAUSE_CODE:
+					ast_indicate_data(in, AST_CONTROL_PVT_CAUSE_CODE, f->data.ptr, f->datalen);
+					break;
 				case -1:
 					if (single && !caller_entertained) {
 						ast_verb(3, "%s stopped sounds\n", ast_channel_name(c));

Modified: trunk/apps/app_followme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_followme.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/apps/app_followme.c (original)
+++ trunk/apps/app_followme.c Mon May 14 14:44:27 2012
@@ -877,6 +877,9 @@
 						 * the caller.
 						 */
 						break;
+					case AST_CONTROL_PVT_CAUSE_CODE:
+						ast_indicate_data(caller, f->subclass.integer, f->data.ptr, f->datalen);
+						break;
 					case -1:
 						ast_verb(3, "%s stopped sounds\n", ast_channel_name(winner));
 						break;

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Mon May 14 14:44:27 2012
@@ -4050,6 +4050,9 @@
 								}
 							}
 							break;
+						case AST_CONTROL_PVT_CAUSE_CODE:
+							ast_indicate_data(in, AST_CONTROL_PVT_CAUSE_CODE, f->data.ptr, f->datalen);
+							break;
 						default:
 							ast_debug(1, "Dunno what to do with control type %d\n", f->subclass.integer);
 							break;

Modified: trunk/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_alsa.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_alsa.c (original)
+++ trunk/channels/chan_alsa.c Mon May 14 14:44:27 2012
@@ -534,6 +534,7 @@
 	case AST_CONTROL_CONGESTION:
 	case AST_CONTROL_RINGING:
 	case AST_CONTROL_INCOMPLETE:
+	case AST_CONTROL_PVT_CAUSE_CODE:
 	case -1:
 		res = -1;  /* Ask for inband indications */
 		break;

Modified: trunk/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_console.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_console.c (original)
+++ trunk/channels/chan_console.c Mon May 14 14:44:27 2012
@@ -603,6 +603,7 @@
 	case AST_CONTROL_CONGESTION:
 	case AST_CONTROL_RINGING:
 	case AST_CONTROL_INCOMPLETE:
+	case AST_CONTROL_PVT_CAUSE_CODE:
 	case -1:
 		res = -1;  /* Ask for inband indications */
 		break;

Modified: trunk/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_gtalk.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Mon May 14 14:44:27 2012
@@ -1726,6 +1726,8 @@
 		break;
 	default:
 		ast_debug(3, "Don't know how to indicate condition '%d'\n", condition);
+		/* fallthrough */
+	case AST_CONTROL_PVT_CAUSE_CODE:
 		res = -1;
 	}
 

Modified: trunk/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_h323.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_h323.c (original)
+++ trunk/channels/chan_h323.c Mon May 14 14:44:27 2012
@@ -941,6 +941,7 @@
 		res = 0;
 		break;
 	case AST_CONTROL_PROCEEDING:
+	case AST_CONTROL_PVT_CAUSE_CODE:
 	case -1:
 		break;
 	default:

Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Mon May 14 14:44:27 2012
@@ -5668,6 +5668,9 @@
 	case AST_CONTROL_CONNECTED_LINE:
 		if (!ast_test_flag64(pvt, IAX_SENDCONNECTEDLINE))
 			goto done;
+		break;
+	case AST_CONTROL_PVT_CAUSE_CODE:
+		res = -1;
 		break;
 	}
 

Modified: trunk/channels/chan_jingle.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_jingle.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_jingle.c (original)
+++ trunk/channels/chan_jingle.c Mon May 14 14:44:27 2012
@@ -1332,6 +1332,8 @@
 		break;
 	default:
 		ast_log(LOG_NOTICE, "Don't know how to indicate condition '%d'\n", condition);
+		/* fallthrough */
+	case AST_CONTROL_PVT_CAUSE_CODE:
 		res = -1;
 	}
 

Modified: trunk/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Mon May 14 14:44:27 2012
@@ -1483,6 +1483,8 @@
 		break;
 	default:
 		ast_log(LOG_WARNING, "Don't know how to indicate condition %d\n", ind);
+		/* fallthrough */
+	case AST_CONTROL_PVT_CAUSE_CODE:
 		res = -1;
 	}
 	ast_mutex_unlock(&sub->lock);

Modified: trunk/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_misdn.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Mon May 14 14:44:27 2012
@@ -7037,6 +7037,8 @@
 		break;
 	default:
 		chan_misdn_log(1, p->bc->port, " --> * Unknown Indication:%d pid:%d\n", cond, p->bc->pid);
+		/* fallthrough */
+	case AST_CONTROL_PVT_CAUSE_CODE:
 		return -1;
 	}
 

Modified: trunk/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_oss.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_oss.c (original)
+++ trunk/channels/chan_oss.c Mon May 14 14:44:27 2012
@@ -758,6 +758,7 @@
 	case AST_CONTROL_BUSY:
 	case AST_CONTROL_CONGESTION:
 	case AST_CONTROL_RINGING:
+	case AST_CONTROL_PVT_CAUSE_CODE:
 	case -1:
 		res = -1;
 		break;

Modified: trunk/channels/chan_phone.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_phone.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_phone.c (original)
+++ trunk/channels/chan_phone.c Mon May 14 14:44:27 2012
@@ -221,6 +221,8 @@
 		break;
 	case AST_CONTROL_SRCUPDATE:
 		res = 0;
+		break;
+	case AST_CONTROL_PVT_CAUSE_CODE:
 		break;
 	default:
 		ast_log(LOG_WARNING, "Condition %d is not supported on channel %s\n", condition, ast_channel_name(chan));

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon May 14 14:44:27 2012
@@ -7093,6 +7093,7 @@
 		break;
 	case AST_CONTROL_UPDATE_RTP_PEER: /* Absorb this since it is handled by the bridge */
 		break;
+	case AST_CONTROL_PVT_CAUSE_CODE: /* these should be handled by the code in channel.c */
 	case -1:
 		res = -1;
 		break;
@@ -26113,28 +26114,29 @@
 			ast_debug(1, "Ignoring out of order response %u (expecting %u)\n", seqno, p->ocseq);
 			return -1;
 		} else {
-			char causevar[256], causeval[256];
-
 			if ((respid == 200) || ((respid >= 300) && (respid <= 399))) {
 				extract_uri(p, req);
 			}
 
+			if (p->owner) {
+				struct ast_control_pvt_cause_code *cause_code;
+				int data_size = sizeof(*cause_code);
+				/* size of the string making up the cause code is "SIP " + cause length */
+				data_size += 4 + strlen(REQ_OFFSET_TO_STR(req, rlPart2));
+				cause_code = alloca(data_size);
+
+				ast_copy_string(cause_code->chan_name, ast_channel_name(p->owner), AST_CHANNEL_NAME);
+
+				snprintf(cause_code->code, data_size - sizeof(*cause_code) + 1, "SIP %s", REQ_OFFSET_TO_STR(req, rlPart2));
+
+				if (global_store_sip_cause) {
+					cause_code->emulate_sip_cause = 1;
+				}
+
+				ast_queue_control_data(p->owner, AST_CONTROL_PVT_CAUSE_CODE, cause_code, data_size);
+			}
+
 			handle_response(p, respid, e + len, req, seqno);
-
-			if (global_store_sip_cause && p->owner) {
-				struct ast_channel *owner = p->owner;
-
-				snprintf(causevar, sizeof(causevar), "MASTER_CHANNEL(HASH(SIP_CAUSE,%s))", ast_channel_name(owner));
-				snprintf(causeval, sizeof(causeval), "SIP %s", REQ_OFFSET_TO_STR(req, rlPart2));
-
-				ast_channel_ref(owner);
-				sip_pvt_unlock(p);
-				ast_channel_unlock(owner);
-				*nounlock = 1;
-				pbx_builtin_setvar_helper(owner, causevar, causeval);
-				ast_channel_unref(owner);
-				sip_pvt_lock(p);
-			}
 		}
 		return 0;
 	}
@@ -29882,6 +29884,9 @@
 			}
 		} else if (!strcasecmp(v->name, "storesipcause")) {
 			global_store_sip_cause = ast_true(v->value);
+			if (global_store_sip_cause) {
+				ast_log(LOG_WARNING, "Usage of SIP_CAUSE is deprecated.  Please use HANGUPCAUSE instead.\n");
+			}
 		} 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/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Mon May 14 14:44:27 2012
@@ -4828,6 +4828,8 @@
 		break;
 	default:
 		ast_log(LOG_WARNING, "Don't know how to indicate condition %d\n", ind);
+		/* fallthrough */
+	case AST_CONTROL_PVT_CAUSE_CODE:
 		return -1; /* Tell asterisk to provide inband signalling */
 	}
 	return 0;

Modified: trunk/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_unistim.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_unistim.c (original)
+++ trunk/channels/chan_unistim.c Mon May 14 14:44:27 2012
@@ -5224,6 +5224,8 @@
 		break;
 	default:
 		ast_log(LOG_WARNING, "Don't know how to indicate condition %d\n", ind);
+		/* fallthrough */
+	case AST_CONTROL_PVT_CAUSE_CODE:
 		return -1;
 	}
 

Modified: trunk/channels/chan_vpb.cc
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_vpb.cc?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/channels/chan_vpb.cc (original)
+++ trunk/channels/chan_vpb.cc Mon May 14 14:44:27 2012
@@ -1714,6 +1714,9 @@
 	case AST_CONTROL_UNHOLD:
 		ast_moh_stop(ast);
 		break;
+	case AST_CONTROL_PVT_CAUSE_CODE:
+		res = -1;
+		break;
 	default:
 		res = 0;
 		break;

Modified: trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Mon May 14 14:44:27 2012
@@ -1083,15 +1083,6 @@
                               ; 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".
 
 ;-----------------------------------------------------------------------------------
 

Modified: trunk/funcs/func_frame_trace.c
URL: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_frame_trace.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/funcs/func_frame_trace.c (original)
+++ trunk/funcs/func_frame_trace.c Mon May 14 14:44:27 2012
@@ -324,6 +324,9 @@
 		case AST_CONTROL_UPDATE_RTP_PEER:
 			ast_verbose("SubClass: UPDATE_RTP_PEER\n");
 			break;
+		case AST_CONTROL_PVT_CAUSE_CODE:
+			ast_verbose("SubClass: PVT_CAUSE_CODE\n");
+			break;
 		}
 		
 		if (frame->subclass.integer == -1) {

Modified: trunk/include/asterisk/frame.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/frame.h?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/include/asterisk/frame.h (original)
+++ trunk/include/asterisk/frame.h Mon May 14 14:44:27 2012
@@ -266,6 +266,7 @@
 	AST_CONTROL_INCOMPLETE = 30,	/*!< Indication that the extension dialed is incomplete */
 	AST_CONTROL_MCID = 31,			/*!< Indicate that the caller is being malicious. */
 	AST_CONTROL_UPDATE_RTP_PEER = 32, /*!< Interrupt the bridge and have it update the peer */
+	AST_CONTROL_PVT_CAUSE_CODE = 33, /*!< Contains an update to the protocol-specific cause-code stored for branching dials */
 };
 
 enum ast_frame_read_action {
@@ -322,6 +323,12 @@
 enum ast_control_transfer {
 	AST_TRANSFER_SUCCESS = 0, /*!< Transfer request on the channel worked */
 	AST_TRANSFER_FAILED,      /*!< Transfer request on the channel failed */
+};
+
+struct ast_control_pvt_cause_code {
+	char chan_name[AST_CHANNEL_NAME];	/*!< Name of the channel that originated the cause information */
+	unsigned int emulate_sip_cause:1;		/*!< Indicates whether this should be used to emulate SIP_CAUSE support */
+	char code[1];				/*!< Tech-specific cause code information, beginning with the name of the tech */
 };
 
 #define AST_SMOOTHER_FLAG_G729		(1 << 0)

Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Mon May 14 14:44:27 2012
@@ -3444,6 +3444,7 @@
 					ast_frfree(f);
 					ast_clear_flag(ast_channel_flags(c), AST_FLAG_END_DTMF_ONLY);
 					return -1;
+				case AST_CONTROL_PVT_CAUSE_CODE:
 				case AST_CONTROL_RINGING:
 				case AST_CONTROL_ANSWER:
 				case AST_CONTROL_SRCUPDATE:
@@ -4171,6 +4172,7 @@
 	case AST_CONTROL_END_OF_Q:
 	case AST_CONTROL_MCID:
 	case AST_CONTROL_UPDATE_RTP_PEER:
+	case AST_CONTROL_PVT_CAUSE_CODE:
 		break;
 
 	case AST_CONTROL_INCOMPLETE:
@@ -4334,6 +4336,21 @@
 	case AST_CONTROL_CONGESTION:
 		ts = ast_get_indication_tone(ast_channel_zone(chan), "congestion");
 		break;
+	case AST_CONTROL_PVT_CAUSE_CODE:
+	{
+		char causevar[256];
+		const struct ast_control_pvt_cause_code *cause_code = data;
+
+		snprintf(causevar, sizeof(causevar), "HASH(HANGUPCAUSE,%s)", cause_code->chan_name);
+		ast_func_write(chan, causevar, cause_code->code);
+		if (cause_code->emulate_sip_cause) {
+			snprintf(causevar, sizeof(causevar), "HASH(SIP_CAUSE,%s)", cause_code->chan_name);
+			ast_func_write(chan, causevar, cause_code->code);
+		}
+
+		res = 0;
+		break;
+	}
 	case AST_CONTROL_PROGRESS:
 	case AST_CONTROL_PROCEEDING:
 	case AST_CONTROL_VIDUPDATE:
@@ -5481,6 +5498,7 @@
 					break;
 
 				/* Ignore these */
+				case AST_CONTROL_PVT_CAUSE_CODE:
 				case AST_CONTROL_PROGRESS:
 				case AST_CONTROL_PROCEEDING:
 				case AST_CONTROL_HOLD:
@@ -7172,6 +7190,7 @@
 			int bridge_exit = 0;
 
 			switch (f->subclass.integer) {
+			case AST_CONTROL_PVT_CAUSE_CODE:
 			case AST_CONTROL_AOC:
 			case AST_CONTROL_MCID:
 				ast_indicate_data(other, f->subclass.integer, f->data.ptr, f->datalen);

Modified: trunk/main/dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/dial.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/main/dial.c (original)
+++ trunk/main/dial.c Mon May 14 14:44:27 2012
@@ -466,6 +466,9 @@
 			break;
 		case AST_CONTROL_OFFHOOK:
 		case AST_CONTROL_FLASH:
+			break;
+		case AST_CONTROL_PVT_CAUSE_CODE:
+			ast_indicate_data(chan, AST_CONTROL_PVT_CAUSE_CODE, fr->data.ptr, fr->datalen);
 			break;
 		case -1:
 			/* Prod the channel */

Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Mon May 14 14:44:27 2012
@@ -3943,6 +3943,10 @@
 					ast_frfree(f);
 					ready=1;
 					break;
+				} else if (f->subclass.integer == AST_CONTROL_PVT_CAUSE_CODE) {
+					ast_indicate_data(caller, AST_CONTROL_PVT_CAUSE_CODE, f->data.ptr, f->datalen);
+					ast_frfree(f);
+					break;
 				} else if (f->subclass.integer == AST_CONTROL_CONNECTED_LINE) {
 					if (caller_hungup) {
 						struct ast_party_connected_line connected;
@@ -4463,6 +4467,7 @@
 					ast_indicate_data(other, f->subclass.integer, f->data.ptr, f->datalen);
 				}
 				break;
+			case AST_CONTROL_PVT_CAUSE_CODE:
 			case AST_CONTROL_AOC:
 			case AST_CONTROL_HOLD:
 			case AST_CONTROL_UNHOLD:

Modified: trunk/main/file.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/file.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/main/file.c (original)
+++ trunk/main/file.c Mon May 14 14:44:27 2012
@@ -1356,6 +1356,7 @@
 				case AST_CONTROL_REDIRECTING:
 				case AST_CONTROL_AOC:
 				case AST_CONTROL_UPDATE_RTP_PEER:
+				case AST_CONTROL_PVT_CAUSE_CODE:
 				case -1:
 					/* Unimportant */
 					break;

Modified: trunk/main/rtp_engine.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/rtp_engine.c?view=diff&rev=366408&r1=366407&r2=366408
==============================================================================
--- trunk/main/rtp_engine.c (original)
+++ trunk/main/rtp_engine.c Mon May 14 14:44:27 2012
@@ -928,6 +928,9 @@
 					ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
 				}
 				ast_frfree(fr);
+			} else if (fr->subclass.integer == AST_CONTROL_PVT_CAUSE_CODE) {
+				ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
+				ast_frfree(fr);
 			} else {
 				*fo = fr;
 				*rc = who;
@@ -1219,6 +1222,9 @@
 					ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
 				}
 				ast_frfree(fr);
+			} else if (fr->subclass.integer == AST_CONTROL_PVT_CAUSE_CODE) {
+				ast_indicate_data(other, fr->subclass.integer, fr->data.ptr, fr->datalen);
+				ast_frfree(fr);
 			} else {
 				*fo = fr;
 				*rc = who;




More information about the asterisk-commits mailing list