[svn-commits] mmichelson: branch mmichelson/transfer r389260 - in /team/mmichelson/transfer...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon May 20 13:19:46 CDT 2013


Author: mmichelson
Date: Mon May 20 13:19:37 2013
New Revision: 389260

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389260
Log:
Resolve conflict and reset automerge.


Added:
    team/mmichelson/transfer/apps/confbridge/confbridge_manager.c
      - copied unchanged from r389253, team/group/bridge_construction/apps/confbridge/confbridge_manager.c
    team/mmichelson/transfer/res/res_stasis_answer.exports.in
      - copied unchanged from r389253, team/group/bridge_construction/res/res_stasis_answer.exports.in
Removed:
    team/mmichelson/transfer/apps/app_parkandannounce.c
Modified:
    team/mmichelson/transfer/   (props changed)
    team/mmichelson/transfer/CHANGES
    team/mmichelson/transfer/UPGRADE.txt
    team/mmichelson/transfer/addons/chan_ooh323.c
    team/mmichelson/transfer/addons/chan_ooh323.h
    team/mmichelson/transfer/apps/app_bridgewait.c   (props changed)
    team/mmichelson/transfer/apps/app_celgenuserevent.c   (props changed)
    team/mmichelson/transfer/apps/app_confbridge.c
    team/mmichelson/transfer/apps/app_dial.c
    team/mmichelson/transfer/apps/app_morsecode.c   (props changed)
    team/mmichelson/transfer/apps/app_queue.c
    team/mmichelson/transfer/apps/app_setcallerid.c   (props changed)
    team/mmichelson/transfer/apps/app_stasis.c   (props changed)
    team/mmichelson/transfer/apps/app_voicemail.c
    team/mmichelson/transfer/apps/app_waituntil.c   (props changed)
    team/mmichelson/transfer/apps/confbridge/conf_config_parser.c
    team/mmichelson/transfer/apps/confbridge/include/confbridge.h
    team/mmichelson/transfer/bridges/bridge_builtin_interval_features.c   (props changed)
    team/mmichelson/transfer/bridges/bridge_holding.c   (props changed)
    team/mmichelson/transfer/channels/chan_iax2.c
    team/mmichelson/transfer/channels/chan_mgcp.c
    team/mmichelson/transfer/channels/chan_sip.c
    team/mmichelson/transfer/channels/chan_skinny.c
    team/mmichelson/transfer/channels/sip/config_parser.c
    team/mmichelson/transfer/channels/sip/dialplan_functions.c
    team/mmichelson/transfer/channels/sip/include/config_parser.h
    team/mmichelson/transfer/channels/sip/include/sip.h
    team/mmichelson/transfer/channels/sip/security_events.c
    team/mmichelson/transfer/configs/skinny.conf.sample
    team/mmichelson/transfer/funcs/func_presencestate.c
    team/mmichelson/transfer/include/asterisk/acl.h
    team/mmichelson/transfer/include/asterisk/ael_structs.h   (props changed)
    team/mmichelson/transfer/include/asterisk/bridging.h
    team/mmichelson/transfer/include/asterisk/bridging_roles.h   (props changed)
    team/mmichelson/transfer/include/asterisk/cel.h   (props changed)
    team/mmichelson/transfer/include/asterisk/core_unreal.h
    team/mmichelson/transfer/include/asterisk/dial.h
    team/mmichelson/transfer/include/asterisk/event.h   (props changed)
    team/mmichelson/transfer/include/asterisk/event_defs.h   (props changed)
    team/mmichelson/transfer/include/asterisk/frame_defs.h   (props changed)
    team/mmichelson/transfer/include/asterisk/hashtab.h   (props changed)
    team/mmichelson/transfer/include/asterisk/json.h   (contents, props changed)
    team/mmichelson/transfer/include/asterisk/netsock2.h
    team/mmichelson/transfer/include/asterisk/parking.h   (props changed)
    team/mmichelson/transfer/include/asterisk/paths.h   (props changed)
    team/mmichelson/transfer/include/asterisk/pktccops.h   (props changed)
    team/mmichelson/transfer/include/asterisk/res_sip.h
    team/mmichelson/transfer/include/asterisk/res_srtp.h   (props changed)
    team/mmichelson/transfer/include/asterisk/security_events.h
    team/mmichelson/transfer/include/asterisk/security_events_defs.h
    team/mmichelson/transfer/include/asterisk/sha1.h   (props changed)
    team/mmichelson/transfer/include/asterisk/smdi.h   (props changed)
    team/mmichelson/transfer/include/asterisk/stasis.h   (contents, props changed)
    team/mmichelson/transfer/include/asterisk/stasis_app.h   (props changed)
    team/mmichelson/transfer/include/asterisk/stasis_channels.h
    team/mmichelson/transfer/include/asterisk/stasis_http.h   (props changed)
    team/mmichelson/transfer/include/asterisk/stasis_message_router.h   (contents, props changed)
    team/mmichelson/transfer/include/asterisk/stringfields.h   (props changed)
    team/mmichelson/transfer/include/asterisk/udptl.h   (props changed)
    team/mmichelson/transfer/main/app.c
    team/mmichelson/transfer/main/asterisk.c
    team/mmichelson/transfer/main/bridging.c
    team/mmichelson/transfer/main/channel.c
    team/mmichelson/transfer/main/core_local.c
    team/mmichelson/transfer/main/core_unreal.c
    team/mmichelson/transfer/main/devicestate.c
    team/mmichelson/transfer/main/dial.c
    team/mmichelson/transfer/main/endpoints.c
    team/mmichelson/transfer/main/json.c
    team/mmichelson/transfer/main/manager.c
    team/mmichelson/transfer/main/manager_channels.c
    team/mmichelson/transfer/main/named_acl.c
    team/mmichelson/transfer/main/pbx.c
    team/mmichelson/transfer/main/security_events.c
    team/mmichelson/transfer/main/sorcery.c
    team/mmichelson/transfer/main/stasis.c
    team/mmichelson/transfer/main/stasis_cache.c
    team/mmichelson/transfer/main/stasis_channels.c
    team/mmichelson/transfer/main/stasis_endpoints.c
    team/mmichelson/transfer/main/stasis_message_router.c
    team/mmichelson/transfer/res/parking/parking_applications.c   (contents, props changed)
    team/mmichelson/transfer/res/parking/parking_bridge.c   (contents, props changed)
    team/mmichelson/transfer/res/parking/parking_bridge_features.c   (props changed)
    team/mmichelson/transfer/res/parking/parking_controller.c   (props changed)
    team/mmichelson/transfer/res/parking/parking_manager.c   (props changed)
    team/mmichelson/transfer/res/parking/parking_ui.c   (props changed)
    team/mmichelson/transfer/res/parking/res_parking.h   (contents, props changed)
    team/mmichelson/transfer/res/res_chan_stats.c
    team/mmichelson/transfer/res/res_jabber.c
    team/mmichelson/transfer/res/res_parking.c
    team/mmichelson/transfer/res/res_security_log.c
    team/mmichelson/transfer/res/res_sip.c
    team/mmichelson/transfer/res/res_sip/config_transport.c
    team/mmichelson/transfer/res/res_sip_acl.c
    team/mmichelson/transfer/res/res_sip_endpoint_identifier_ip.c
    team/mmichelson/transfer/res/res_sip_nat.c
    team/mmichelson/transfer/res/res_sip_outbound_registration.c
    team/mmichelson/transfer/res/res_stasis.c
    team/mmichelson/transfer/res/stasis/app.c
    team/mmichelson/transfer/res/stasis/app.h
    team/mmichelson/transfer/tests/test_security_events.c

Propchange: team/mmichelson/transfer/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/mmichelson/transfer/
------------------------------------------------------------------------------
--- bridge_construction-integrated (original)
+++ bridge_construction-integrated Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-/trunk:1-388840
+/trunk:1-389224

Propchange: team/mmichelson/transfer/
------------------------------------------------------------------------------
--- transfer-integrated (original)
+++ transfer-integrated Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-/team/group/bridge_construction:1-388894
+/team/group/bridge_construction:1-389255

Modified: team/mmichelson/transfer/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/CHANGES?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/CHANGES (original)
+++ team/mmichelson/transfer/CHANGES Mon May 20 13:19:37 2013
@@ -151,10 +151,11 @@
    methods and the contents of parking lots will be visible though certain bridge
    commands.
 
- * The order of arguments for the new parking application are different from the
-   old one to be more intuitive. Timeout and return context/exten/priority are now
+ * The order of arguments for the new parking applications are different from the
+   old ones to be more intuitive. Timeout and return context/exten/priority are now
    implemented as options. parking_lot_name is now the first parameter. See the
-   application documentation for Park for more in-depth information.
+   application documentation for Park, ParkedCall, and ParkAndAnnounce for more
+   in-depth information as well as syntax.
 
  * Extensions are no longer automatically created in the dialplan to park calls,
    pickup parked calls, etc by default.
@@ -176,6 +177,13 @@
 
  * The AMI command 'ParkedCalls' will now accept a 'ParkingLot' argument which
    can be used to get a list of parked calls only for a specific parking lot.
+
+ * The ParkAndAnnounce application is now provided through res_parking instead
+   of through the separate app_parkandannounce module.
+
+ * ParkAndAnnounce will no longer go to the next position in dialplan on timeout
+   by default. Instead, it will follow the timeout rules of the parking lot. The
+   old behavior can be reproduced by using the 'c' option.
 
 Queue
 -------------------
@@ -213,6 +221,11 @@
    If any resource is available the device state is considered to be not in use.
    If no resources exist or all are unavailable the device state is considered
    to be unavailable.
+
+Security Events Framework
+-------------------------
+ * Security Event timestamps now use ISO 8601 formatted date/time instead of the
+   "seconds-microseconds" format that it was using previously.
 
 Sorcery
 ------------------

Modified: team/mmichelson/transfer/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/UPGRADE.txt?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/UPGRADE.txt (original)
+++ team/mmichelson/transfer/UPGRADE.txt Mon May 20 13:19:37 2013
@@ -89,6 +89,12 @@
    no longer honored.  The feature is activated by which channel
    DYNAMIC_FEATURES includes the feature is on.  Use predial to set different
    values of DYNAMIC_FEATURES on the channels
+
+Parking:
+ - The arguments for the Park, ParkedCall, and ParkAndAnnounce applications have
+   been modified significantly. See the application documents for specific details.
+   Also parking lot configuration is now done in res_parking.conf instead of
+   features.conf
 
 From 10 to 11:
 

Modified: team/mmichelson/transfer/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/addons/chan_ooh323.c?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/addons/chan_ooh323.c (original)
+++ team/mmichelson/transfer/addons/chan_ooh323.c Mon May 20 13:19:37 2013
@@ -489,9 +489,8 @@
 	 	}
 
 		if (ch) {
-			manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate", 
-				"Channel: %s\r\nChanneltype: %s\r\n"
-				"CallRef: %d\r\n", ast_channel_name(ch), "OOH323", i->call_reference);
+			ast_publish_channel_state(ch);
+
 		}
 	} else
 		ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
@@ -2148,8 +2147,7 @@
 
 			ast_queue_control(c, AST_CONTROL_ANSWER);
    			ast_channel_unlock(p->owner);
-			manager_event(EVENT_FLAG_SYSTEM,"ChannelUpdate","Channel: %s\r\nChanneltype: %s\r\n"
-				"CallRef: %d\r\n", ast_channel_name(c), "OOH323", p->call_reference);
+			ast_publish_channel_state(c);
 		}
 		ast_mutex_unlock(&p->lock);
 

Modified: team/mmichelson/transfer/addons/chan_ooh323.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/addons/chan_ooh323.h?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/addons/chan_ooh323.h (original)
+++ team/mmichelson/transfer/addons/chan_ooh323.h Mon May 20 13:19:37 2013
@@ -64,6 +64,7 @@
 #include "asterisk/format.h"
 #include "asterisk/format_cap.h"
 #include "asterisk/udptl.h"
+#include "asterisk/stasis_channels.h"
 
 #include "ootypes.h"
 #include "ooUtils.h"

Propchange: team/mmichelson/transfer/apps/app_bridgewait.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-"Author Date Id Rev URL"
+Author Date Id Revision

Propchange: team/mmichelson/transfer/apps/app_celgenuserevent.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-Author Id Date Revision
+Author Date Id Revision

Modified: team/mmichelson/transfer/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/apps/app_confbridge.c?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/apps/app_confbridge.c (original)
+++ team/mmichelson/transfer/apps/app_confbridge.c Mon May 20 13:19:37 2013
@@ -67,6 +67,9 @@
 #include "asterisk/paths.h"
 #include "asterisk/manager.h"
 #include "asterisk/test.h"
+#include "asterisk/stasis.h"
+#include "asterisk/stasis_bridging.h"
+#include "asterisk/json.h"
 
 /*** DOCUMENTATION
 	<application name="ConfBridge" language="en_US">
@@ -412,183 +415,77 @@
 	return "";
 }
 
-static void send_conf_start_event(const char *conf_name)
-{
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a conference starts.</synopsis>
-			<syntax>
-				<parameter name="Conference">
-					<para>The name of the Confbridge conference.</para>
-				</parameter>
-			</syntax>
-			<see-also>
-				<ref type="managerEvent">ConfbridgeEnd</ref>
-				<ref type="application">ConfBridge</ref>
-			</see-also>
-		</managerEventInstance>
-	***/
-	manager_event(EVENT_FLAG_CALL, "ConfbridgeStart", "Conference: %s\r\n", conf_name);
-}
-
-static void send_conf_end_event(const char *conf_name)
-{
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a conference ends.</synopsis>
-			<syntax>
-				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" />
-			</syntax>
-			<see-also>
-				<ref type="managerEvent">ConfbridgeStart</ref>
-			</see-also>
-		</managerEventInstance>
-	***/
-	manager_event(EVENT_FLAG_CALL, "ConfbridgeEnd", "Conference: %s\r\n", conf_name);
-}
-
-static void send_join_event(struct ast_channel *chan, const char *conf_name)
-{
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a channel joins a Confbridge conference.</synopsis>
-			<syntax>
-				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" />
-			</syntax>
-			<see-also>
-				<ref type="managerEvent">ConfbridgeLeave</ref>
-				<ref type="application">ConfBridge</ref>
-			</see-also>
-		</managerEventInstance>
-	***/
-	ast_manager_event(chan, EVENT_FLAG_CALL, "ConfbridgeJoin",
-		"Channel: %s\r\n"
-		"Uniqueid: %s\r\n"
-		"Conference: %s\r\n"
-		"CallerIDnum: %s\r\n"
-		"CallerIDname: %s\r\n",
-		ast_channel_name(chan),
-		ast_channel_uniqueid(chan),
-		conf_name,
-		S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, "<unknown>"),
-		S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, "<unknown>")
-	);
-}
-
-static void send_leave_event(struct ast_channel *chan, const char *conf_name)
-{
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a channel leaves a Confbridge conference.</synopsis>
-			<syntax>
-				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" />
-			</syntax>
-			<see-also>
-				<ref type="managerEvent">ConfbridgeJoin</ref>
-			</see-also>
-		</managerEventInstance>
-	***/
-	ast_manager_event(chan, EVENT_FLAG_CALL, "ConfbridgeLeave",
-		"Channel: %s\r\n"
-		"Uniqueid: %s\r\n"
-		"Conference: %s\r\n"
-		"CallerIDnum: %s\r\n"
-		"CallerIDname: %s\r\n",
-		ast_channel_name(chan),
-		ast_channel_uniqueid(chan),
-		conf_name,
-		S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, "<unknown>"),
-		S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, "<unknown>")
-	);
-}
-
-static void send_start_record_event(const char *conf_name)
-{
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a conference recording starts.</synopsis>
-			<syntax>
-				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" />
-			</syntax>
-			<see-also>
-				<ref type="managerEvent">ConfbridgeStopRecord</ref>
-				<ref type="application">ConfBridge</ref>
-			</see-also>
-		</managerEventInstance>
-	***/
-
-	manager_event(EVENT_FLAG_CALL, "ConfbridgeStartRecord", "Conference: %s\r\n", conf_name);
-}
-
-static void send_stop_record_event(const char *conf_name)
-{
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a conference recording stops.</synopsis>
-			<syntax>
-				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" />
-			</syntax>
-			<see-also>
-				<ref type="managerEvent">ConfbridgeStartRecord</ref>
-			</see-also>
-		</managerEventInstance>
-	***/
-	manager_event(EVENT_FLAG_CALL, "ConfbridgeStopRecord", "Conference: %s\r\n", conf_name);
-}
-
-static void send_mute_event(struct ast_channel *chan, const char *conf_name)
-{
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a Confbridge participant mutes.</synopsis>
-			<syntax>
-				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" />
-			</syntax>
-			<see-also>
-				<ref type="managerEvent">ConfbridgeUnmute</ref>
-				<ref type="application">ConfBridge</ref>
-			</see-also>
-		</managerEventInstance>
-	***/
-	ast_manager_event(chan, EVENT_FLAG_CALL, "ConfbridgeMute",
-		"Channel: %s\r\n"
-		"Uniqueid: %s\r\n"
-		"Conference: %s\r\n"
-		"CallerIDnum: %s\r\n"
-		"CallerIDname: %s\r\n",
-		ast_channel_name(chan),
-		ast_channel_uniqueid(chan),
-		conf_name,
-		S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, "<unknown>"),
-		S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, "<unknown>")
-	);
-}
-
-static void send_unmute_event(struct ast_channel *chan, const char *conf_name)
-{
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a Confbridge participant unmutes.</synopsis>
-			<syntax>
-				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" />
-			</syntax>
-			<see-also>
-				<ref type="managerEvent">ConfbridgeMute</ref>
-			</see-also>
-		</managerEventInstance>
-	***/
-	ast_manager_event(chan, EVENT_FLAG_CALL, "ConfbridgeUnmute",
-		"Channel: %s\r\n"
-		"Uniqueid: %s\r\n"
-		"Conference: %s\r\n"
-		"CallerIDnum: %s\r\n"
-		"CallerIDname: %s\r\n",
-		ast_channel_name(chan),
-		ast_channel_uniqueid(chan),
-		conf_name,
-		S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, "<unknown>"),
-		S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, "<unknown>")
-	);
+static void send_conf_stasis(struct confbridge_conference *conference, struct ast_channel *chan, const char *type, struct ast_json *extras, int channel_topic)
+{
+	RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
+	RAII_VAR(struct ast_json *, json_object, NULL, ast_json_unref);
+
+	json_object = ast_json_pack("{s: s, s: s}",
+		"type", type,
+		"conference", conference->name);
+
+	if (!json_object) {
+		return;
+	}
+
+	if (extras) {
+		ast_json_object_update(json_object, extras);
+	}
+
+	msg = ast_bridge_blob_create(confbridge_message_type(),
+					 conference->bridge,
+					 chan,
+					 json_object);
+	if (!msg) {
+		return;
+	}
+
+	if (channel_topic) {
+		stasis_publish(ast_channel_topic(chan), msg);
+	} else {
+		stasis_publish(ast_bridge_topic(conference->bridge), msg);
+	}
+
+}
+
+static void send_conf_start_event(struct confbridge_conference *conference)
+{
+	send_conf_stasis(conference, NULL, "confbridge_start", NULL, 0);
+}
+
+static void send_conf_end_event(struct confbridge_conference *conference)
+{
+	send_conf_stasis(conference, NULL, "confbridge_end", NULL, 0);
+}
+
+static void send_join_event(struct ast_channel *chan, struct confbridge_conference *conference)
+{
+	send_conf_stasis(conference, chan, "confbridge_join", NULL, 0);
+}
+
+static void send_leave_event(struct ast_channel *chan, struct confbridge_conference *conference)
+{
+	send_conf_stasis(conference, chan, "confbridge_leave", NULL, 0);
+}
+
+static void send_start_record_event(struct confbridge_conference *conference)
+{
+	send_conf_stasis(conference, NULL, "confbridge_record", NULL, 0);
+}
+
+static void send_stop_record_event(struct confbridge_conference *conference)
+{
+	send_conf_stasis(conference, NULL, "confbridge_stop_record", NULL, 0);
+}
+
+static void send_mute_event(struct ast_channel *chan, struct confbridge_conference *conference)
+{
+	send_conf_stasis(conference, chan, "confbridge_mute", NULL, 1);
+}
+
+static void send_unmute_event(struct ast_channel *chan, struct confbridge_conference *conference)
+{
+	send_conf_stasis(conference, chan, "confbridge_unmute", NULL, 1);
 }
 
 
@@ -693,6 +590,7 @@
 		return NULL;
 	}
 	if (ast_bridge_features_init(&features)) {
+		ast_bridge_features_cleanup(&features);
 		conference->record_thread = AST_PTHREADT_NULL;
 		ast_mutex_unlock(&conference->record_lock);
 		ao2_ref(conference, -1);
@@ -747,7 +645,7 @@
 	ast_queue_frame(chan, &ast_null_frame);
 	chan = ast_channel_unref(chan);
 	ast_test_suite_event_notify("CONF_STOP_RECORD", "Message: stopped conference recording channel\r\nConference: %s", conference->b_profile.name);
-	send_stop_record_event(conference->name);
+	send_stop_record_event(conference);
 
 	return 0;
 }
@@ -821,7 +719,7 @@
 	ast_cond_signal(&conference->record_cond);
 	ast_mutex_unlock(&conference->record_lock);
 	ast_test_suite_event_notify("CONF_START_RECORD", "Message: started conference recording channel\r\nConference: %s", conference->b_profile.name);
-	send_start_record_event(conference->name);
+	send_start_record_event(conference);
 
 	return 0;
 }
@@ -1260,7 +1158,7 @@
 {
 	/* Called with a reference to conference */
 	ao2_unlink(conference_bridges, conference);
-	send_conf_end_event(conference->name);
+	send_conf_end_event(conference);
 	conf_stop_record_thread(conference);
 }
 
@@ -1361,7 +1259,7 @@
 			ao2_unlock(conference);
 		}
 
-		send_conf_start_event(conference->name);
+		send_conf_start_event(conference);
 		ast_debug(1, "Created conference '%s' and linked to container.\n", conference_name);
 	}
 
@@ -1563,31 +1461,22 @@
 static void conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *pvt_data, int talking)
 {
 	const char *conf_name = pvt_data;
-
-	/* notify AMI someone is has either started or stopped talking */
-	/*** DOCUMENTATION
-		<managerEventInstance>
-			<synopsis>Raised when a conference participant has started or stopped talking.</synopsis>
-			<syntax>
-				<xi:include xpointer="xpointer(/docs/managerEvent[@name='ConfbridgeStart']/managerEventInstance/syntax/parameter[@name='Conference'])" />
-				<parameter name="TalkingStatus">
-					<enumlist>
-						<enum name="on"/>
-						<enum name="off"/>
-					</enumlist>
-				</parameter>
-			</syntax>
-		</managerEventInstance>
-	***/
-	ast_manager_event(bridge_channel->chan, EVENT_FLAG_CALL, "ConfbridgeTalking",
-		"Channel: %s\r\n"
-		"Uniqueid: %s\r\n"
-		"Conference: %s\r\n"
-		"TalkingStatus: %s\r\n",
-		ast_channel_name(bridge_channel->chan),
-		ast_channel_uniqueid(bridge_channel->chan),
-		conf_name,
-		talking ? "on" : "off");
+	struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
+	struct ast_json *talking_extras;
+
+	if (!conference) {
+		return;
+	}
+
+	talking_extras = ast_json_pack("{s: s}",
+					 "talking_status", talking ? "on" : "off");
+
+	if (!talking_extras) {
+		return;
+	}
+
+	send_conf_stasis(conference, bridge_channel->chan, "confbridge_talking", talking_extras, 0);
+	ast_json_unref(talking_extras);
 }
 
 static int conf_get_pin(struct ast_channel *chan, struct confbridge_user *user)
@@ -1837,14 +1726,14 @@
 	conf_moh_unsuspend(&user);
 
 	/* Join our conference bridge for real */
-	send_join_event(user.chan, conference->name);
+	send_join_event(user.chan, conference);
 	ast_bridge_join(conference->bridge,
 		chan,
 		NULL,
 		&user.features,
 		&user.tech_args,
 		0);
-	send_leave_event(user.chan, conference->name);
+	send_leave_event(user.chan, conference);
 
 	/* if we're shutting down, don't attempt to do further processing */
 	if (ast_shutting_down()) {
@@ -1911,9 +1800,9 @@
 		user->features.mute = (!user->features.mute ? 1 : 0);
 		ast_test_suite_event_notify("CONF_MUTE", "Message: participant %s %s\r\nConference: %s\r\nChannel: %s", ast_channel_name(chan), user->features.mute ? "muted" : "unmuted", user->b_profile.name, ast_channel_name(chan));
 		if (user->features.mute) {
-			send_mute_event(chan, conference->name);
-		} else { 
-			send_unmute_event(chan, conference->name);
+			send_mute_event(chan, conference);
+		} else {
+			send_unmute_event(chan, conference);
 		}
 	}
 	return ast_stream_and_wait(chan, (user->features.mute ?
@@ -3234,6 +3123,9 @@
 	ast_manager_unregister("ConfbridgeStopRecord");
 	ast_manager_unregister("ConfbridgeSetSingleVideoSrc");
 
+	/* Unsubscribe from stasis confbridge message type and clean it up. */
+	manager_confbridge_shutdown();
+
 	/* Get rid of the conference bridges container. Since we only allow dynamic ones none will be active. */
 	ao2_cleanup(conference_bridges);
 	conference_bridges = NULL;
@@ -3283,6 +3175,9 @@
 		unload_module();
 		return AST_MODULE_LOAD_FAILURE;
 	}
+
+	/* Setup manager stasis subscriptions */
+	res |= manager_confbridge_init();
 
 	res |= ast_register_application_xml(app, confbridge_exec);
 

Modified: team/mmichelson/transfer/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/apps/app_dial.c?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/apps/app_dial.c (original)
+++ team/mmichelson/transfer/apps/app_dial.c Mon May 20 13:19:37 2013
@@ -972,6 +972,7 @@
 
 		ast_channel_appl_set(c, "AppDial");
 		ast_channel_data_set(c, "(Outgoing Line)");
+		ast_publish_channel_state(c);
 
 		ast_channel_unlock(in);
 		if (single && !ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)) {
@@ -2487,6 +2488,8 @@
 
 		ast_channel_appl_set(tc, "AppDial");
 		ast_channel_data_set(tc, "(Outgoing Line)");
+		ast_publish_channel_state(tc);
+
 		memset(ast_channel_whentohangup(tc), 0, sizeof(*ast_channel_whentohangup(tc)));
 
 		/* Determine CallerID to store in outgoing channel. */

Propchange: team/mmichelson/transfer/apps/app_morsecode.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-Author Revision Id Date
+Author Date Id Revision

Modified: team/mmichelson/transfer/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/apps/app_queue.c?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/apps/app_queue.c (original)
+++ team/mmichelson/transfer/apps/app_queue.c Mon May 20 13:19:37 2013
@@ -9875,9 +9875,7 @@
 
 	res |= ast_data_unregister(NULL);
 
-	if (device_state_sub) {
-		device_state_sub = stasis_unsubscribe(device_state_sub);
-	}
+	device_state_sub = stasis_unsubscribe_and_join(device_state_sub);
 
 	ast_extension_state_del(0, extension_state_cb);
 

Propchange: team/mmichelson/transfer/apps/app_setcallerid.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-Author Revision Id Date
+Author Date Id Revision

Propchange: team/mmichelson/transfer/apps/app_stasis.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-Author Date Id Rev URL
+Author Date Id Revision

Modified: team/mmichelson/transfer/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/apps/app_voicemail.c?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/apps/app_voicemail.c (original)
+++ team/mmichelson/transfer/apps/app_voicemail.c Mon May 20 13:19:37 2013
@@ -12689,9 +12689,7 @@
 {
 	poll_thread_run = 0;
 
-	if (mwi_sub_sub) {
-		mwi_sub_sub = stasis_unsubscribe(mwi_sub_sub);
-	}
+	mwi_sub_sub = stasis_unsubscribe_and_join(mwi_sub_sub);
 
 	ast_mutex_lock(&poll_lock);
 	ast_cond_signal(&poll_cond);

Propchange: team/mmichelson/transfer/apps/app_waituntil.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-Id Author Revision Date
+Author Date Id Revision

Modified: team/mmichelson/transfer/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/apps/confbridge/conf_config_parser.c?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/apps/confbridge/conf_config_parser.c (original)
+++ team/mmichelson/transfer/apps/confbridge/conf_config_parser.c Mon May 20 13:19:37 2013
@@ -290,6 +290,15 @@
 						allows the record name to be specified and a unique name to be chosen.
 						By default, the record_file is stored in Asterisk's spool/monitor directory
 						with a unique filename starting with the 'confbridge' prefix.
+					</para></description>
+				</configOption>
+				<configOption name="record_file_append" default="yes">
+					<synopsis>Append record file when starting/stopping on same conference recording</synopsis>
+					<description><para>
+						When record_file_append is set to yes, stopping and starting recording on a
+						conference adds the new portion to end of current record_file. When this is
+						set to no, a new record_file is generated every time you start then stop recording
+						on a conference.
 					</para></description>
 				</configOption>
 				<configOption name="video_mode">

Modified: team/mmichelson/transfer/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/apps/confbridge/include/confbridge.h?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/apps/confbridge/include/confbridge.h (original)
+++ team/mmichelson/transfer/apps/confbridge/include/confbridge.h Mon May 20 13:19:37 2013
@@ -460,4 +460,28 @@
  * \retval non-zero failure
  */
 int conf_add_post_join_action(struct confbridge_user *user, int (*func)(struct confbridge_user *user));
+
+/*!
+ * \since 12.0
+ * \brief get the confbridge stasis message type
+ *
+ * \retval stasis message type for confbridge messages if it's available
+ * \retval NULL if it isn't
+ */
+struct stasis_message_type *confbridge_message_type(void);
+
+/*!
+ * \since 12.0
+ * \brief register stasis message routers to handle manager events for confbridge messages
+ *
+ * \retval 0 success
+ * \retval non-zero failure
+ */
+int manager_confbridge_init(void);
+
+/*!
+ * \since 12.0
+ * \brief unregister stasis message routers to handle manager events for confbridge messages
+ */
+void manager_confbridge_shutdown(void);
 #endif

Propchange: team/mmichelson/transfer/bridges/bridge_builtin_interval_features.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-"Author Date Id Rev URL"
+Author Date Id Revision

Propchange: team/mmichelson/transfer/bridges/bridge_holding.c
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Mon May 20 13:19:37 2013
@@ -1,1 +1,1 @@
-"Author Date Id Rev URL"
+Author Date Id Revision

Modified: team/mmichelson/transfer/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/channels/chan_iax2.c?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/channels/chan_iax2.c (original)
+++ team/mmichelson/transfer/channels/chan_iax2.c Mon May 20 13:19:37 2013
@@ -101,6 +101,7 @@
 #include "asterisk/test.h"
 #include "asterisk/data.h"
 #include "asterisk/netsock2.h"
+#include "asterisk/security_events.h"
 #include "asterisk/bridging.h"
 
 #include "iax2/include/iax2.h"
@@ -1334,24 +1335,20 @@
 
 static void network_change_stasis_unsubscribe(void)
 {
-	if (network_change_sub) {
-		network_change_sub = stasis_unsubscribe(network_change_sub);
-	}
+	network_change_sub = stasis_unsubscribe_and_join(network_change_sub);
 }
 
 static void acl_change_stasis_subscribe(void)
 {
 	if (!acl_change_sub) {
-		acl_change_sub = stasis_subscribe(ast_acl_topic(),
+		acl_change_sub = stasis_subscribe(ast_security_topic(),
 			acl_change_stasis_cb, NULL);
 	}
 }
 
 static void acl_change_stasis_unsubscribe(void)
 {
-	if (acl_change_sub) {
-		acl_change_sub = stasis_unsubscribe(acl_change_sub);
-	}
+	acl_change_sub = stasis_unsubscribe_and_join(acl_change_sub);
 }
 
 static int network_change_sched_cb(const void *data)
@@ -6262,7 +6259,7 @@
 		struct MD5Context md5;
 		unsigned char digest[16];
 		char *tmppw, *stringp;
-		
+
 		tmppw = ast_strdupa(iaxs[callno]->secret);
 		stringp = tmppw;
 		while ((tmppw = strsep(&stringp, ";"))) {
@@ -7824,10 +7821,13 @@
 	if ((p->authmethods & IAX_AUTH_RSA) && !ast_strlen_zero(rsasecret) && !ast_strlen_zero(p->inkeys)) {
 		struct ast_key *key;
 		char *keyn;
-		char tmpkey[256];
+		char *tmpkey;
 		char *stringp=NULL;
-		ast_copy_string(tmpkey, p->inkeys, sizeof(tmpkey));
-		stringp=tmpkey;
+		if (!(tmpkey = ast_strdup(p->inkeys))) {
+			ast_log(LOG_ERROR, "Unable to create a temporary string for parsing stored 'inkeys'\n");
+			return res;
+		}
+		stringp = tmpkey;
 		keyn = strsep(&stringp, ":");
 		while(keyn) {
 			key = ast_key_get(keyn, AST_KEY_PUBLIC);
@@ -7838,11 +7838,12 @@
 				ast_log(LOG_WARNING, "requested inkey '%s' for RSA authentication does not exist\n", keyn);
 			keyn = strsep(&stringp, ":");
 		}
+		ast_free(tmpkey);
 	} else if (p->authmethods & IAX_AUTH_MD5) {
 		struct MD5Context md5;
 		unsigned char digest[16];
 		char *tmppw, *stringp;
-		
+
 		tmppw = ast_strdupa(p->secret);
 		stringp = tmppw;
 		while((tmppw = strsep(&stringp, ";"))) {
@@ -7945,10 +7946,13 @@
 	/* Check secret against what we have on file */
 	if (!ast_strlen_zero(rsasecret) && (p->authmethods & IAX_AUTH_RSA) && !ast_strlen_zero(iaxs[callno]->challenge)) {
 		if (!ast_strlen_zero(p->inkeys)) {
-			char tmpkeys[256];
+			char *tmpkey;
 			char *stringp=NULL;
-			ast_copy_string(tmpkeys, p->inkeys, sizeof(tmpkeys));
-			stringp=tmpkeys;
+			if (!(tmpkey = ast_strdup(p->inkeys))) {
+				ast_log(LOG_ERROR, "Unable to create a temporary string for parsing stored 'inkeys'\n");
+				goto return_unref;
+			}
+			stringp = tmpkey;
 			keyn = strsep(&stringp, ":");
 			while(keyn) {
 				key = ast_key_get(keyn, AST_KEY_PUBLIC);
@@ -7959,6 +7963,7 @@
 					ast_log(LOG_WARNING, "requested inkey '%s' does not exist\n", keyn);
 				keyn = strsep(&stringp, ":");
 			}
+			ast_free(tmpkey);
 			if (!keyn) {
 				if (authdebug)
 					ast_log(LOG_NOTICE, "Host %s failed RSA authentication with inkeys '%s'\n", peer, p->inkeys);
@@ -12264,9 +12269,7 @@
 	if (peer->dnsmgr)
 		ast_dnsmgr_release(peer->dnsmgr);
 
-	if (peer->mwi_event_sub) {
-		peer->mwi_event_sub = stasis_unsubscribe(peer->mwi_event_sub);
-	}
+	peer->mwi_event_sub = stasis_unsubscribe(peer->mwi_event_sub);
 
 	ast_string_field_free_memory(peer);
 }
@@ -14427,8 +14430,13 @@
 	struct ast_data *data_user, *data_authmethods, *data_enum_node;
 	struct iax2_user *user;
 	struct ao2_iterator i;
-	char auth[90];
+	struct ast_str *auth;
 	char *pstr = "";
+
+	if (!(auth = ast_str_create(90))) {
+		ast_log(LOG_ERROR, "Unable to create temporary string for storing 'secret'\n");
+		return 0;
+	}
 
 	i = ao2_iterator_init(users, 0);
 	for (; (user = ao2_iterator_next(&i)); user_unref(user)) {
@@ -14442,13 +14450,13 @@
 		iax2_data_add_codecs(data_user, "codecs", user->capability);
 
 		if (!ast_strlen_zero(user->secret)) {
-			ast_copy_string(auth, user->secret, sizeof(auth));
+			ast_str_set(&auth, 0, "%s", user->secret);
 		} else if (!ast_strlen_zero(user->inkeys)) {
-			snprintf(auth, sizeof(auth), "Key: %s", user->inkeys);
+			ast_str_set(&auth, 0, "Key: %s", user->inkeys);
 		} else {
-			ast_copy_string(auth, "no secret", sizeof(auth));
-		}
-		ast_data_add_password(data_user, "secret", auth);
+			ast_str_set(&auth, 0, "no secret");
+		}
+		ast_data_add_password(data_user, "secret", ast_str_buffer(auth));
 
 		ast_data_add_str(data_user, "context", user->contexts ? user->contexts->context : DEFAULT_CONTEXT);
 
@@ -14488,6 +14496,7 @@
 	}
 	ao2_iterator_destroy(&i);
 
+	ast_free(auth);
 	return 0;
 }
 

Modified: team/mmichelson/transfer/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/channels/chan_mgcp.c?view=diff&rev=389260&r1=389259&r2=389260
==============================================================================
--- team/mmichelson/transfer/channels/chan_mgcp.c (original)
+++ team/mmichelson/transfer/channels/chan_mgcp.c Mon May 20 13:19:37 2013
@@ -83,6 +83,7 @@
 #include "asterisk/chanvars.h"
 #include "asterisk/pktccops.h"
 #include "asterisk/stasis.h"
+#include "asterisk/bridging.h"
 
 /*
  * Define to work around buggy dlink MGCP phone firmware which
@@ -3212,56 +3213,55 @@
 	return NULL;
 }
 
-static int attempt_transfer(struct mgcp_endpoint *p)
-{
-	/* *************************
-	 * I hope this works.
-	 * Copied out of chan_zap
-	 * Cross your fingers
-	 * *************************/
-
-	/* In order to transfer, we need at least one of the channels to
-	   actually be in a call bridge.  We can't conference two applications
-	   together (but then, why would we want to?) */
-	if (ast_bridged_channel(p->sub->owner)) {
-		/* The three-way person we're about to transfer to could still be in MOH, so
-		   stop it now */
-		ast_queue_control(p->sub->next->owner, AST_CONTROL_UNHOLD);
-		if (ast_channel_state(p->sub->owner) == AST_STATE_RINGING) {
-			ast_queue_control(p->sub->next->owner, AST_CONTROL_RINGING);
-		}
-		if (ast_channel_masquerade(p->sub->next->owner, ast_bridged_channel(p->sub->owner))) {
-			ast_log(LOG_WARNING, "Unable to masquerade %s as %s\n",
-				ast_channel_name(ast_bridged_channel(p->sub->owner)), ast_channel_name(p->sub->next->owner));
-			return -1;
-		}
-		/* Orphan the channel */
-		unalloc_sub(p->sub->next);
-	} else if (ast_bridged_channel(p->sub->next->owner)) {
-		if (ast_channel_state(p->sub->owner) == AST_STATE_RINGING) {
-			ast_queue_control(p->sub->next->owner, AST_CONTROL_RINGING);
-		}
-		ast_queue_control(p->sub->next->owner, AST_CONTROL_UNHOLD);

[... 6833 lines stripped ...]



More information about the svn-commits mailing list