[asterisk-commits] may: branch may/ooh323_ipv6 r306757 - in /team/may/ooh323_ipv6: ./ channels/ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 7 17:59:52 CST 2011


Author: may
Date: Mon Feb  7 17:59:46 2011
New Revision: 306757

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=306757
Log:
up to trunk

Modified:
    team/may/ooh323_ipv6/   (props changed)
    team/may/ooh323_ipv6/CHANGES
    team/may/ooh323_ipv6/channels/chan_dahdi.c
    team/may/ooh323_ipv6/channels/chan_sip.c
    team/may/ooh323_ipv6/channels/sig_pri.c
    team/may/ooh323_ipv6/channels/sig_pri.h
    team/may/ooh323_ipv6/configs/chan_dahdi.conf.sample
    team/may/ooh323_ipv6/funcs/func_frame_trace.c
    team/may/ooh323_ipv6/include/asterisk/frame.h
    team/may/ooh323_ipv6/main/ccss.c
    team/may/ooh323_ipv6/main/channel.c
    team/may/ooh323_ipv6/main/features.c

Propchange: team/may/ooh323_ipv6/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Feb  7 17:59:46 2011
@@ -1,1 +1,1 @@
-/trunk:1-306555
+/team/may/ooh323_ipv6:1-306756

Modified: team/may/ooh323_ipv6/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/CHANGES?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/CHANGES (original)
+++ team/may/ooh323_ipv6/CHANGES Mon Feb  7 17:59:46 2011
@@ -52,6 +52,7 @@
  * Added display_send and display_receive options to control how the display ie
    is handled.  To send display text from the dialplan use the SendText()
    application when the option is enabled.
+ * Added mcid_send option to allow sending a MCID request on a span.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------

Modified: team/may/ooh323_ipv6/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/channels/chan_dahdi.c?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/channels/chan_dahdi.c (original)
+++ team/may/ooh323_ipv6/channels/chan_dahdi.c Mon Feb  7 17:59:46 2011
@@ -12353,6 +12353,9 @@
 						pris[span].pri.display_flags_send = conf->pri.pri.display_flags_send;
 						pris[span].pri.display_flags_receive = conf->pri.pri.display_flags_receive;
 #endif	/* defined(HAVE_PRI_DISPLAY_TEXT) */
+#if defined(HAVE_PRI_MCID)
+						pris[span].pri.mcid_send = conf->pri.pri.mcid_send;
+#endif	/* defined(HAVE_PRI_MCID) */
 
 						for (x = 0; x < PRI_MAX_TIMERS; x++) {
 							pris[span].pri.pritimers[x] = conf->pri.pri.pritimers[x];
@@ -17307,6 +17310,10 @@
 			} else if (!strcasecmp(v->name, "display_receive")) {
 				confp->pri.pri.display_flags_receive = dahdi_display_text_option(v->value);
 #endif	/* defined(HAVE_PRI_DISPLAY_TEXT) */
+#if defined(HAVE_PRI_MCID)
+			} else if (!strcasecmp(v->name, "mcid_send")) {
+				confp->pri.pri.mcid_send = ast_true(v->value);
+#endif	/* defined(HAVE_PRI_MCID) */
 #endif /* HAVE_PRI */
 #if defined(HAVE_SS7)
 			} else if (!strcasecmp(v->name, "ss7type")) {

Modified: team/may/ooh323_ipv6/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/channels/chan_sip.c?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/channels/chan_sip.c (original)
+++ team/may/ooh323_ipv6/channels/chan_sip.c Mon Feb  7 17:59:46 2011
@@ -14959,6 +14959,14 @@
 			ast_copy_string(referdata->replaces_callid_fromtag, ptr, sizeof(referdata->replaces_callid_fromtag));
 		}
 
+		if (!strcmp(referdata->replaces_callid, transferer->callid) &&
+			(!sip_cfg.pedanticsipchecking ||
+			(!strcmp(referdata->replaces_callid_fromtag, transferer->tag) &&
+			!strcmp(referdata->replaces_callid_totag, transferer->theirtag)))) {
+				ast_log(LOG_WARNING, "Got an attempt to replace own Call-ID on %s\n", transferer->callid);
+				return -4;
+		}
+
 		if (!sip_cfg.pedanticsipchecking) {
 			ast_debug(2, "Attended transfer: Will use Replace-Call-ID : %s (No check of from/to tags)\n", referdata->replaces_callid );
 		} else {

Modified: team/may/ooh323_ipv6/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/channels/sig_pri.c?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/channels/sig_pri.c (original)
+++ team/may/ooh323_ipv6/channels/sig_pri.c Mon Feb  7 17:59:46 2011
@@ -1917,7 +1917,12 @@
 	}
 
 	if (owner) {
-		/* The owner channel is present. */
+		/*
+		 * The owner channel is present.
+		 * Pass the event to the peer as well.
+		 */
+		ast_queue_control(owner, AST_CONTROL_MCID);
+
 		ast_str_append(&msg, 0, "Channel: %s\r\n", owner->name);
 		ast_str_append(&msg, 0, "UniqueID: %s\r\n", owner->uniqueid);
 
@@ -7687,6 +7692,15 @@
 		}
 #endif	/* defined(HAVE_PRI_AOC_EVENTS) */
 		break;
+#if defined(HAVE_PRI_MCID)
+	case AST_CONTROL_MCID:
+		if (p->pri && p->pri->pri && p->pri->mcid_send) {
+			pri_grab(p, p->pri);
+			pri_mcid_req_send(p->pri->pri, p->call);
+			pri_rel(p->pri);
+		}
+		break;
+#endif	/* defined(HAVE_PRI_MCID) */
 	}
 
 	return res;

Modified: team/may/ooh323_ipv6/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/channels/sig_pri.h?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/channels/sig_pri.h (original)
+++ team/may/ooh323_ipv6/channels/sig_pri.h Mon Feb  7 17:59:46 2011
@@ -402,6 +402,10 @@
 	 * appended to the initial_user_tag[].
 	 */
 	unsigned int append_msn_to_user_tag:1;
+#if defined(HAVE_PRI_CALL_WAITING)
+	/*! \brief TRUE if allow sending MCID request on this span. */
+	unsigned int mcid_send:1;
+#endif	/* defined(HAVE_PRI_CALL_WAITING) */
 	int dialplan;							/*!< Dialing plan */
 	int localdialplan;						/*!< Local dialing plan */
 	int cpndialplan;						/*!< Connected party dialing plan */

Modified: team/may/ooh323_ipv6/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/configs/chan_dahdi.conf.sample?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/configs/chan_dahdi.conf.sample (original)
+++ team/may/ooh323_ipv6/configs/chan_dahdi.conf.sample Mon Feb  7 17:59:46 2011
@@ -206,6 +206,11 @@
 ;
 ;overlapdial=yes
 ;
+; Allow sending an ISDN MCID request on this span.
+; Default disabled
+;
+;mcid_send=yes
+
 ; Allow inband audio (progress) when a call is DISCONNECTed by the far end of a PRI
 ;
 ;inbanddisconnect=yes

Modified: team/may/ooh323_ipv6/funcs/func_frame_trace.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/funcs/func_frame_trace.c?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/funcs/func_frame_trace.c (original)
+++ team/may/ooh323_ipv6/funcs/func_frame_trace.c Mon Feb  7 17:59:46 2011
@@ -308,6 +308,9 @@
 		case AST_CONTROL_AOC:
 			ast_verbose("SubClass: AOC\n");
 			break;
+		case AST_CONTROL_MCID:
+			ast_verbose("SubClass: MCID\n");
+			break;
 		}
 		if (frame->subclass.integer == -1) {
 			ast_verbose("SubClass: %d\n", frame->subclass.integer);

Modified: team/may/ooh323_ipv6/include/asterisk/frame.h
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/include/asterisk/frame.h?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/include/asterisk/frame.h (original)
+++ team/may/ooh323_ipv6/include/asterisk/frame.h Mon Feb  7 17:59:46 2011
@@ -263,6 +263,7 @@
 	AST_CONTROL_READ_ACTION = 27, /*!< Tell ast_read to take a specific action */
 	AST_CONTROL_AOC = 28,           /*!< Advice of Charge with encoded generic AOC payload */
 	AST_CONTROL_END_OF_Q = 29,		/*!< Indicate that this position was the end of the channel queue for a softhangup. */
+	AST_CONTROL_MCID = 30,			/*!< Indicate that the caller is being malicious. */
 };
 
 enum ast_frame_read_action {

Modified: team/may/ooh323_ipv6/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/main/ccss.c?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/main/ccss.c (original)
+++ team/may/ooh323_ipv6/main/ccss.c Mon Feb  7 17:59:46 2011
@@ -2505,6 +2505,18 @@
 		return NULL;
 	}
 	ast_format_cap_destroy(tmp_cap);
+	
+	/* We have a channel. It's time now to set up the datastore of recalled CC interfaces.
+	 * This will be a common task for all recall functions. If it were possible, I'd have
+	 * the core do it automatically, but alas I cannot. Instead, I will provide a public
+	 * function to do so.
+	 */
+	ast_setup_cc_recall_datastore(chan, agent->core_id);
+	ast_cc_agent_set_interfaces_chanvar(chan);
+
+	ast_copy_string(chan->exten, generic_pvt->exten, sizeof(chan->exten));
+	ast_copy_string(chan->context, generic_pvt->context, sizeof(chan->context));
+	chan->priority = 1;
 
 	if (!ast_strlen_zero(callback_macro)) {
 		ast_log_dynamic_level(cc_logger_level, "Core %d: There's a callback macro configured for agent %s\n",
@@ -2515,17 +2527,6 @@
 			return NULL;
 		}
 	}
-	/* We have a channel. It's time now to set up the datastore of recalled CC interfaces.
-	 * This will be a common task for all recall functions. If it were possible, I'd have
-	 * the core do it automatically, but alas I cannot. Instead, I will provide a public
-	 * function to do so.
-	 */
-	ast_setup_cc_recall_datastore(chan, agent->core_id);
-	ast_cc_agent_set_interfaces_chanvar(chan);
-
-	ast_copy_string(chan->exten, generic_pvt->exten, sizeof(chan->exten));
-	ast_copy_string(chan->context, generic_pvt->context, sizeof(chan->context));
-	chan->priority = 1;
 	ast_cc_agent_recalling(agent->core_id, "Generic agent %s is recalling", agent->device_name);
 	ast_pbx_start(chan);
 	return NULL;

Modified: team/may/ooh323_ipv6/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/main/channel.c?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/main/channel.c (original)
+++ team/may/ooh323_ipv6/main/channel.c Mon Feb  7 17:59:46 2011
@@ -4229,6 +4229,7 @@
 	case AST_CONTROL_READ_ACTION:
 	case AST_CONTROL_AOC:
 	case AST_CONTROL_END_OF_Q:
+	case AST_CONTROL_MCID:
 		break;
 
 	case AST_CONTROL_CONGESTION:
@@ -4412,6 +4413,7 @@
 	case AST_CONTROL_READ_ACTION:
 	case AST_CONTROL_AOC:
 	case AST_CONTROL_END_OF_Q:
+	case AST_CONTROL_MCID:
 		/* Nothing left to do for these. */
 		res = 0;
 		break;
@@ -7013,6 +7015,7 @@
 
 			switch (f->subclass.integer) {
 			case AST_CONTROL_AOC:
+			case AST_CONTROL_MCID:
 				ast_indicate_data(other, f->subclass.integer, f->data.ptr, f->datalen);
 				break;
 			case AST_CONTROL_REDIRECTING:

Modified: team/may/ooh323_ipv6/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/main/features.c?view=diff&rev=306757&r1=306756&r2=306757
==============================================================================
--- team/may/ooh323_ipv6/main/features.c (original)
+++ team/may/ooh323_ipv6/main/features.c Mon Feb  7 17:59:46 2011
@@ -3662,6 +3662,7 @@
 			switch (f->subclass.integer) {
 			case AST_CONTROL_RINGING:
 			case AST_CONTROL_FLASH:
+			case AST_CONTROL_MCID:
 			case -1:
 				ast_indicate(other, f->subclass.integer);
 				break;
@@ -5586,7 +5587,8 @@
 		   change while we're here, but that isn't a problem. */
 		(c != chan) &&
 		(chan->pickupgroup & c->callgroup) &&
-		((chan->_state == AST_STATE_RINGING) || (chan->_state == AST_STATE_RING));
+		((chan->_state == AST_STATE_RINGING) || (chan->_state == AST_STATE_RING)) &&
+		!c->masq;
 
 	return i ? CMP_MATCH | CMP_STOP : 0;
 }




More information about the asterisk-commits mailing list