[asterisk-commits] dlee: branch dlee/record r393548 - in /team/dlee/record: ./ apps/ apps/confbr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 3 12:46:53 CDT 2013


Author: dlee
Date: Wed Jul  3 12:46:49 2013
New Revision: 393548

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393548
Log:
Merged revisions 392777-393542 from http://svn.asterisk.org/svn/asterisk/trunk

Added:
    team/dlee/record/configs/ari.conf.sample
      - copied unchanged from r393542, trunk/configs/ari.conf.sample
    team/dlee/record/configs/stasis.conf.sample
      - copied unchanged from r393542, trunk/configs/stasis.conf.sample
    team/dlee/record/doc/rest-api/   (props changed)
      - copied from r393542, trunk/doc/rest-api/
    team/dlee/record/include/asterisk/mixmonitor.h
      - copied unchanged from r393542, trunk/include/asterisk/mixmonitor.h
    team/dlee/record/main/mixmonitor.c
      - copied unchanged from r393542, trunk/main/mixmonitor.c
    team/dlee/record/main/stasis_config.c
      - copied unchanged from r393542, trunk/main/stasis_config.c
    team/dlee/record/res/res_ari_model.c
      - copied unchanged from r393542, trunk/res/res_ari_model.c
    team/dlee/record/res/res_ari_model.exports.in
      - copied unchanged from r393542, trunk/res/res_ari_model.exports.in
    team/dlee/record/res/res_sip/config_security.c
      - copied unchanged from r393542, trunk/res/res_sip/config_security.c
    team/dlee/record/res/res_sip_notify.c
      - copied unchanged from r393542, trunk/res/res_sip_notify.c
    team/dlee/record/res/stasis_http/ari_model_validators.c
      - copied unchanged from r393542, trunk/res/stasis_http/ari_model_validators.c
    team/dlee/record/res/stasis_http/ari_model_validators.h
      - copied unchanged from r393542, trunk/res/stasis_http/ari_model_validators.h
    team/dlee/record/res/stasis_http/ari_websockets.c
      - copied unchanged from r393542, trunk/res/stasis_http/ari_websockets.c
    team/dlee/record/res/stasis_http/cli.c
      - copied unchanged from r393542, trunk/res/stasis_http/cli.c
    team/dlee/record/res/stasis_http/config.c
      - copied unchanged from r393542, trunk/res/stasis_http/config.c
    team/dlee/record/res/stasis_http/internal.h
      - copied unchanged from r393542, trunk/res/stasis_http/internal.h
    team/dlee/record/rest-api-templates/api.wiki.mustache
      - copied unchanged from r393542, trunk/rest-api-templates/api.wiki.mustache
    team/dlee/record/rest-api-templates/ari_model_validators.c.mustache
      - copied unchanged from r393542, trunk/rest-api-templates/ari_model_validators.c.mustache
    team/dlee/record/rest-api-templates/ari_model_validators.h.mustache
      - copied unchanged from r393542, trunk/rest-api-templates/ari_model_validators.h.mustache
    team/dlee/record/rest-api-templates/make_ari_stubs.py
      - copied unchanged from r393542, trunk/rest-api-templates/make_ari_stubs.py
    team/dlee/record/rest-api-templates/models.wiki.mustache
      - copied unchanged from r393542, trunk/rest-api-templates/models.wiki.mustache
    team/dlee/record/rest-api-templates/param_parsing.mustache
      - copied unchanged from r393542, trunk/rest-api-templates/param_parsing.mustache
    team/dlee/record/tests/test_ari_model.c
      - copied unchanged from r393542, trunk/tests/test_ari_model.c
    team/dlee/record/tests/test_cel.c
      - copied unchanged from r393542, trunk/tests/test_cel.c
Removed:
    team/dlee/record/configs/stasis_core.conf.sample
    team/dlee/record/configs/stasis_http.conf.sample
    team/dlee/record/res/res_stasis_json_asterisk.c
    team/dlee/record/res/res_stasis_json_asterisk.exports.in
    team/dlee/record/res/res_stasis_json_bridges.c
    team/dlee/record/res/res_stasis_json_bridges.exports.in
    team/dlee/record/res/res_stasis_json_channels.c
    team/dlee/record/res/res_stasis_json_channels.exports.in
    team/dlee/record/res/res_stasis_json_endpoints.c
    team/dlee/record/res/res_stasis_json_endpoints.exports.in
    team/dlee/record/res/res_stasis_json_events.c
    team/dlee/record/res/res_stasis_json_events.exports.in
    team/dlee/record/res/res_stasis_json_playback.c
    team/dlee/record/res/res_stasis_json_playback.exports.in
    team/dlee/record/res/res_stasis_json_recordings.c
    team/dlee/record/res/res_stasis_json_recordings.exports.in
    team/dlee/record/res/res_stasis_json_sounds.c
    team/dlee/record/res/res_stasis_json_sounds.exports.in
    team/dlee/record/res/res_stasis_websocket.c
    team/dlee/record/res/stasis_json/
    team/dlee/record/rest-api-templates/event_function_decl.mustache
    team/dlee/record/rest-api-templates/make_stasis_http_stubs.py
    team/dlee/record/rest-api-templates/res_stasis_json_resource.c.mustache
    team/dlee/record/rest-api-templates/res_stasis_json_resource.exports.mustache
    team/dlee/record/rest-api-templates/stasis_json_resource.h.mustache
Modified:
    team/dlee/record/   (props changed)
    team/dlee/record/CHANGES
    team/dlee/record/Makefile
    team/dlee/record/apps/app_celgenuserevent.c
    team/dlee/record/apps/app_dial.c
    team/dlee/record/apps/app_meetme.c
    team/dlee/record/apps/app_mixmonitor.c
    team/dlee/record/apps/app_queue.c
    team/dlee/record/apps/app_stasis.c
    team/dlee/record/apps/confbridge/conf_chan_announce.c
    team/dlee/record/bridges/bridge_builtin_features.c
    team/dlee/record/channels/chan_dahdi.c
    team/dlee/record/channels/chan_gtalk.c
    team/dlee/record/channels/chan_iax2.c
    team/dlee/record/channels/chan_motif.c
    team/dlee/record/channels/chan_sip.c
    team/dlee/record/channels/chan_skinny.c
    team/dlee/record/channels/chan_unistim.c
    team/dlee/record/channels/sig_analog.c
    team/dlee/record/channels/sig_pri.c
    team/dlee/record/channels/sip/include/sip.h
    team/dlee/record/configs/features.conf.sample
    team/dlee/record/configs/sip.conf.sample
    team/dlee/record/configure
    team/dlee/record/configure.ac
    team/dlee/record/contrib/scripts/ast_tls_cert
    team/dlee/record/funcs/func_channel.c
    team/dlee/record/include/asterisk/autoconfig.h.in
    team/dlee/record/include/asterisk/bridging.h
    team/dlee/record/include/asterisk/bridging_features.h
    team/dlee/record/include/asterisk/cdr.h
    team/dlee/record/include/asterisk/cel.h
    team/dlee/record/include/asterisk/channel.h
    team/dlee/record/include/asterisk/config_options.h
    team/dlee/record/include/asterisk/features.h
    team/dlee/record/include/asterisk/features_config.h
    team/dlee/record/include/asterisk/http.h
    team/dlee/record/include/asterisk/json.h
    team/dlee/record/include/asterisk/parking.h
    team/dlee/record/include/asterisk/pbx.h
    team/dlee/record/include/asterisk/res_sip.h
    team/dlee/record/include/asterisk/res_sip_pubsub.h
    team/dlee/record/include/asterisk/sorcery.h
    team/dlee/record/include/asterisk/stasis.h
    team/dlee/record/include/asterisk/stasis_app.h
    team/dlee/record/include/asterisk/stasis_bridging.h
    team/dlee/record/include/asterisk/stasis_channels.h
    team/dlee/record/include/asterisk/stasis_http.h
    team/dlee/record/include/asterisk/utils.h
    team/dlee/record/main/Makefile
    team/dlee/record/main/aoc.c
    team/dlee/record/main/asterisk.c
    team/dlee/record/main/bridging.c
    team/dlee/record/main/cdr.c
    team/dlee/record/main/cel.c
    team/dlee/record/main/config_options.c
    team/dlee/record/main/core_local.c
    team/dlee/record/main/datastore.c
    team/dlee/record/main/devicestate.c
    team/dlee/record/main/features.c
    team/dlee/record/main/features_config.c
    team/dlee/record/main/http.c
    team/dlee/record/main/json.c
    team/dlee/record/main/manager.c
    team/dlee/record/main/manager_bridging.c
    team/dlee/record/main/named_acl.c
    team/dlee/record/main/parking.c
    team/dlee/record/main/pbx.c
    team/dlee/record/main/presencestate.c
    team/dlee/record/main/sorcery.c
    team/dlee/record/main/stasis.c
    team/dlee/record/main/stasis_bridging.c
    team/dlee/record/main/stasis_channels.c
    team/dlee/record/main/stasis_endpoints.c
    team/dlee/record/main/utils.c
    team/dlee/record/makeopts.in
    team/dlee/record/res/Makefile
    team/dlee/record/res/parking/parking_applications.c
    team/dlee/record/res/parking/parking_bridge.c
    team/dlee/record/res/parking/parking_bridge_features.c
    team/dlee/record/res/parking/parking_controller.c
    team/dlee/record/res/parking/parking_manager.c
    team/dlee/record/res/parking/parking_ui.c
    team/dlee/record/res/parking/res_parking.h
    team/dlee/record/res/res_agi.c
    team/dlee/record/res/res_calendar.c
    team/dlee/record/res/res_chan_stats.c
    team/dlee/record/res/res_http_websocket.c
    team/dlee/record/res/res_http_websocket.exports.in
    team/dlee/record/res/res_parking.c
    team/dlee/record/res/res_sip.c
    team/dlee/record/res/res_sip.exports.in
    team/dlee/record/res/res_sip/config_auth.c
    team/dlee/record/res/res_sip/include/res_sip_private.h
    team/dlee/record/res/res_sip/sip_configuration.c
    team/dlee/record/res/res_sip/sip_distributor.c
    team/dlee/record/res/res_sip/sip_options.c
    team/dlee/record/res/res_sip_acl.c
    team/dlee/record/res/res_sip_authenticator_digest.c
    team/dlee/record/res/res_sip_outbound_authenticator_digest.c
    team/dlee/record/res/res_sip_pubsub.c
    team/dlee/record/res/res_sip_pubsub.exports.in
    team/dlee/record/res/res_sip_refer.c
    team/dlee/record/res/res_stasis.c
    team/dlee/record/res/res_stasis_answer.c
    team/dlee/record/res/res_stasis_bridge_add.c
    team/dlee/record/res/res_stasis_http.c
    team/dlee/record/res/res_stasis_http.exports.in
    team/dlee/record/res/res_stasis_http_asterisk.c
    team/dlee/record/res/res_stasis_http_bridges.c
    team/dlee/record/res/res_stasis_http_channels.c
    team/dlee/record/res/res_stasis_http_endpoints.c
    team/dlee/record/res/res_stasis_http_events.c
    team/dlee/record/res/res_stasis_http_playback.c
    team/dlee/record/res/res_stasis_http_recordings.c
    team/dlee/record/res/res_stasis_http_sounds.c
    team/dlee/record/res/res_stasis_playback.c
    team/dlee/record/res/res_stasis_test.c
    team/dlee/record/res/res_statsd.c
    team/dlee/record/res/stasis/control.c
    team/dlee/record/res/stasis_http/resource_channels.c
    team/dlee/record/res/stasis_http/resource_channels.h
    team/dlee/record/res/stasis_http/resource_events.c
    team/dlee/record/res/stasis_http/resource_events.h
    team/dlee/record/res/stasis_http/resource_recordings.c
    team/dlee/record/res/stasis_http/resource_recordings.h
    team/dlee/record/rest-api-templates/asterisk_processor.py
    team/dlee/record/rest-api-templates/res_stasis_http_resource.c.mustache
    team/dlee/record/rest-api-templates/rest_handler.mustache
    team/dlee/record/rest-api-templates/stasis_http_resource.c.mustache
    team/dlee/record/rest-api-templates/stasis_http_resource.h.mustache
    team/dlee/record/rest-api-templates/swagger_model.py
    team/dlee/record/rest-api-templates/transform.py
    team/dlee/record/rest-api/api-docs/asterisk.json
    team/dlee/record/rest-api/api-docs/bridges.json
    team/dlee/record/rest-api/api-docs/channels.json
    team/dlee/record/rest-api/api-docs/endpoints.json
    team/dlee/record/rest-api/api-docs/events.json
    team/dlee/record/rest-api/api-docs/playback.json
    team/dlee/record/rest-api/api-docs/recordings.json
    team/dlee/record/rest-api/api-docs/sounds.json
    team/dlee/record/tests/test_cdr.c
    team/dlee/record/tests/test_endpoints.c
    team/dlee/record/tests/test_res_stasis.c
    team/dlee/record/tests/test_stasis_channels.c
    team/dlee/record/tests/test_stasis_endpoints.c
    team/dlee/record/tests/test_stasis_http.c
    team/dlee/record/tests/test_utils.c

Propchange: team/dlee/record/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Propchange: team/dlee/record/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jul  3 12:46:49 2013
@@ -1,1 +1,1 @@
-/trunk:1-392772
+/trunk:1-393547

Modified: team/dlee/record/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/CHANGES?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/CHANGES (original)
+++ team/dlee/record/CHANGES Wed Jul  3 12:46:49 2013
@@ -143,7 +143,7 @@
 
  * The SIPqualifypeer action now acknowledges the request once it has established
    that the request is against a known peer. It also issues a new event,
-   'SIPqualifypeerdone', once the qualify action has been completed.
+   'SIPQualifyPeerDone', once the qualify action has been completed.
 
  * The PlayDTMF action now supports an optional 'Duration' parameter.  This
    specifies the duration of the digit to be played, in milliseconds.
@@ -196,8 +196,8 @@
    event, the various ChanVariable fields will contain a suffix that specifies
    which channel they correspond to.
 
-* The NewPeerAccount AMI event is no longer raised. The NewAccountCode AMI
-  event always conveys the AMI event for a particular channel.
+ * The NewPeerAccount AMI event is no longer raised. The NewAccountCode AMI
+   event always conveys the AMI event for a particular channel.
 
  * All "Reload" events have been consolidated into a single event type. This
    event will always contain a Module field specifying the name of the module
@@ -238,6 +238,22 @@
    information about each channel.  The (infamous) "Join" and "Leave" AMI
    events have been changed to "QueueCallerJoin" and "QueueCallerLeave".
 
+ * The MCID AMI event now publishes a channel snapshot when available and
+   its non-channel-snapshot parameters now use either the "MCallerID" or
+   "MConnectedID" prefixes with Subaddr*, Name*, and Num* suffixes instead
+   of "CallerID" and "ConnectedID" to avoid confusion with similarly named
+   parameters in the channel snapshot.
+
+ * The "Agentlogin" and "Agentlogoff" events have been renamed "AgentLogin" and
+   "AgentLogoff" respectively.
+
+ * The "Channel" key used in the "AlarmClear", "Alarm", and "DNDState" has been
+   renamed "DAHDIChannel" since it does not convey an Asterisk channel name.
+
+ * "ChannelUpdate" events have been removed.
+
+ * AMI events now contain a SystemName field, if available.
+
 AGI (Asterisk Gateway Interface)
 ------------------
  * The manager event AGIExec has been split into AGIExecStart and AGIExecEnd.
@@ -269,7 +285,7 @@
    will now apply the feature to the calling party while use of a lowercase
    letter will apply that feature to the called party.
 
- * Add support for automixmonitor to the BRIDGE_FEATURES channel variable.
+ * Add support for automixmon to the BRIDGE_FEATURES channel variable.
 
  * Parking has been pulled from core and placed into a separate module called
    res_parking. See Parking changes below for more details.
@@ -277,6 +293,14 @@
  * You can now have the settings for a channel updated using the FEATURE()
    and FEATUREMAP() functions inherited to child channels by setting
    FEATURE(inherit)=yes.
+
+ * automixmon now supports additional channel variables from automon including:
+   TOUCH_MIXMONITOR_PREFIX, TOUCH_MIXMONITOR_MESSAGE_START,
+   and TOUCH_MIXMONITOR_MESSAGE_STOP
+
+ * A new general features.conf option 'recordingfailsound' has been added which
+   allowssetting a failure sound for a user tries to invoke a recording feature
+   such as automon or automixmon and it fails.
 
 Logging
 -------------------
@@ -330,12 +354,33 @@
  * 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 AMI command 'Park' has had the argument 'Channel2' renamed to
+   'TimeoutChannel'. 'TimeoutChannel' is no longer a required argument.
+   'Channel2' can still be used as the argument name, but it is deprecated
+   and the 'TimeoutChannel' argument will be used if both are present.
+
  * 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.
+
+ * Dynamic parking lots will now fail to be created if the parking lot specified
+   by PARKINGDYNAMIC does not exist.
+
+ * Dynamic parking lots will also fail to be created now if they require exclusive
+   park and parkedcall extensions which overlap with other parking lots.
+
+ * Dynamic parking lots will be cleared on reload for dynamic parking lots that
+   currently contain no calls. Dynamic parking lots containing parked calls will
+   persist through the reloads without alteration.
+
+ * If parkext_exclusive is set for a parking lot and that extension is already in
+   use when that parking lot tries to register it, this is now considered a parking
+   system configuration error. Configurations which do this will be rejected.
+   Dynamic parking lots which try to register extensions that already exist will
+   also be rejected.
 
  * Added a channel variable PARKER_FLAT which stores the name of the extension
    that would be used to come back to if comebacktoorigin was set to use. This can

Modified: team/dlee/record/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/Makefile?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/Makefile (original)
+++ team/dlee/record/Makefile Wed Jul  3 12:46:49 2013
@@ -416,6 +416,7 @@
 	rm -f main/version.c
 	rm -f doc/core-en_US.xml
 	rm -f doc/full-en_US.xml
+	rm -f docs/rest-api/*.wiki
 	@$(MAKE) -C menuselect clean
 	cp -f .cleancount .lastclean
 
@@ -476,7 +477,7 @@
 	@echo "</docs>" >> $@
 
 ifneq ($(GREP),)
-  XMX_full_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+  XML_full_en_US = $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
 endif
 
 doc/full-en_US.xml: makeopts .lastclean $(XML_full_en_US)
@@ -964,15 +965,15 @@
 
 # We don't want to require Python or Pystache for every build, so this is its
 # own target.
-stasis-stubs:
+ari-stubs:
 ifeq ($(PYTHON),:)
 	@echo "--------------------------------------------------------------------------"
-	@echo "---        Please install python to build Stasis HTTP stubs            ---"
+	@echo "---        Please install python to build ARI stubs            ---"
 	@echo "--------------------------------------------------------------------------"
 	@false
 else
-	$(PYTHON) rest-api-templates/make_stasis_http_stubs.py \
-		rest-api/resources.json res/
+	$(PYTHON) rest-api-templates/make_ari_stubs.py \
+		rest-api/resources.json .
 endif
 
 .PHONY: menuselect
@@ -994,7 +995,7 @@
 .PHONY: installdirs
 .PHONY: validate-docs
 .PHONY: _clean
-.PHONY: stasis-stubs
+.PHONY: ari-stubs
 .PHONY: $(SUBDIRS_INSTALL)
 .PHONY: $(SUBDIRS_DIST_CLEAN)
 .PHONY: $(SUBDIRS_CLEAN)

Modified: team/dlee/record/apps/app_celgenuserevent.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/apps/app_celgenuserevent.c?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/apps/app_celgenuserevent.c (original)
+++ team/dlee/record/apps/app_celgenuserevent.c Wed Jul  3 12:46:49 2013
@@ -62,6 +62,7 @@
 {
 	int res = 0;
 	char *parse;
+	RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(event);
 		AST_APP_ARG(extra);
@@ -74,7 +75,13 @@
 	parse = ast_strdupa(data);
 	AST_STANDARD_APP_ARGS(args, parse);
 
-	ast_cel_report_event(chan, AST_CEL_USER_DEFINED, args.event, args.extra, NULL);
+	blob = ast_json_pack("{s: s, s: s}",
+		"event", args.event,
+		"extra", args.extra);
+	if (!blob) {
+		return res;
+	}
+	ast_cel_publish_event(chan, AST_CEL_USER_DEFINED, blob);
 	return res;
 }
 

Modified: team/dlee/record/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/apps/app_dial.c?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/apps/app_dial.c (original)
+++ team/dlee/record/apps/app_dial.c Wed Jul  3 12:46:49 2013
@@ -859,8 +859,6 @@
 		ast_clear_flag64(o, OPT_IGNORE_CONNECTEDLINE);
 	}
 
-	ast_cel_report_event(in, AST_CEL_FORWARD, NULL, ast_channel_call_forward(c), NULL);
-
 	/* Before processing channel, go ahead and check for forwarding */
 	ast_verb(3, "Now forwarding %s to '%s/%s' (thanks to %s)\n", ast_channel_name(in), tech, stuff, ast_channel_name(c));
 	/* If we have been told to ignore forwards, just set this channel to null and continue processing extensions normally */
@@ -1004,7 +1002,8 @@
 			ast_channel_unlock(c);
 
 			ast_channel_lock_both(original, in);
-			ast_channel_publish_dial(in, original, NULL, "CANCEL");
+			ast_channel_publish_dial_forward(in, original, NULL, "CANCEL",
+				ast_channel_call_forward(c));
 			ast_channel_unlock(in);
 			ast_channel_unlock(original);
 

Modified: team/dlee/record/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/apps/app_meetme.c?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/apps/app_meetme.c (original)
+++ team/dlee/record/apps/app_meetme.c Wed Jul  3 12:46:49 2013
@@ -1117,75 +1117,15 @@
 	15,
 };
 
-/*!
- * \internal
- * \brief accessor for join message type
- * \since 12.0.0
- *
- * \retval pointer to the stasis message type
- * \retval NULL if not initialized
- */
-static struct stasis_message_type *meetme_join_type(void);
-
-/*!
- * \internal
- * \brief accessor for leave message type
- * \since 12.0.0
- *
- * \retval pointer to the stasis message type
- * \retval NULL if not initialized
- */
-static struct stasis_message_type *meetme_leave_type(void);
-
-/*!
- * \internal
- * \brief accessor for end message type
- * \since 12.0.0
- *
- * \retval pointer to the stasis message type
- * \retval NULL if not initialized
- */
-static struct stasis_message_type *meetme_end_type(void);
-
-/*!
- * \internal
- * \brief accessor for mute message type
- * \since 12.0.0
- *
- * \retval pointer to the stasis message type
- * \retval NULL if not initialized
- */
-static struct stasis_message_type *meetme_mute_type(void);
-
-/*!
- * \internal
- * \brief accessor for talking message type
- * \since 12.0.0
- *
- * \retval pointer to the stasis message type
- * \retval NULL if not initialized
- */
-static struct stasis_message_type *meetme_talking_type(void);
-
-/*!
- * \internal
- * \brief accessor for talk request message type
- * \since 12.0.0
- *
- * \retval pointer to the stasis message type
- * \retval NULL if not initialized
- */
-static struct stasis_message_type *meetme_talk_request_type(void);
-
 /* Routes the various meetme message types to the meetme stasis callback function to turn them into events */
 static struct stasis_message_router *meetme_event_message_router;
 
-STASIS_MESSAGE_TYPE_DEFN(meetme_join_type);
-STASIS_MESSAGE_TYPE_DEFN(meetme_leave_type);
-STASIS_MESSAGE_TYPE_DEFN(meetme_end_type);
-STASIS_MESSAGE_TYPE_DEFN(meetme_mute_type);
-STASIS_MESSAGE_TYPE_DEFN(meetme_talking_type);
-STASIS_MESSAGE_TYPE_DEFN(meetme_talk_request_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(meetme_join_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(meetme_leave_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(meetme_end_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(meetme_mute_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(meetme_talking_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(meetme_talk_request_type);
 
 static void meetme_stasis_cb(void *data, struct stasis_subscription *sub,
 	struct stasis_topic *topic, struct stasis_message *message);

Modified: team/dlee/record/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/apps/app_mixmonitor.c?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/apps/app_mixmonitor.c (original)
+++ team/dlee/record/apps/app_mixmonitor.c Wed Jul  3 12:46:49 2013
@@ -56,6 +56,7 @@
 #include "asterisk/mod_format.h"
 #include "asterisk/linkedlists.h"
 #include "asterisk/test.h"
+#include "asterisk/mixmonitor.h"
 
 /*** DOCUMENTATION
 	<application name="MixMonitor" language="en_US">
@@ -78,7 +79,6 @@
 					</option>
 					<option name="b">
 						<para>Only save audio to the file while the channel is bridged.</para>
-						<note><para>Does not include conferences or sounds played to each bridged party</para></note>
 						<note><para>If you utilize this option inside a Local channel, you must make sure the Local
 						channel is not optimized away. To do this, be sure to call your Local channel with the
 						<literal>/n</literal> option. For example: Dial(Local/start at mycontext/n)</para></note>
@@ -103,7 +103,6 @@
 						<para>Use the specified file to record the <emphasis>receive</emphasis> audio feed.
 						Like with the basic filename argument, if an absolute path isn't given, it will create
 						the file in the configured monitoring directory.</para>
-
 					</option>
 					<option name="t">
 						<argument name="file" required="true" />
@@ -133,11 +132,7 @@
 			<para>Records the audio on the current channel to the specified file.</para>
 			<para>This application does not automatically answer and should be preceeded by
 			an application such as Answer or Progress().</para>
-			<note><para>MixMonitor runs as an audiohook. In order to keep it running through
-			a transfer, AUDIOHOOK_INHERIT must be set for the channel which ran mixmonitor.
-			For more information, including dialplan configuration set for using
-			AUDIOHOOK_INHERIT with MixMonitor, see the function documentation for
-			AUDIOHOOK_INHERIT.</para></note>
+			<note><para>MixMonitor runs as an audiohook.</para></note>
 			<variablelist>
 				<variable name="MIXMONITOR_FILENAME">
 					<para>Will contain the filename used to record.</para>
@@ -648,7 +643,9 @@
 		 * Unlock it, but remember to lock it before looping or exiting */
 		ast_audiohook_unlock(&mixmonitor->audiohook);
 
-		if (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED) || (mixmonitor->autochan->chan && ast_bridged_channel(mixmonitor->autochan->chan))) {
+		if (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED)
+			|| (mixmonitor->autochan->chan
+				&& ast_channel_is_bridged(mixmonitor->autochan->chan))) {
 			ast_mutex_lock(&mixmonitor->mixmonitor_ds->lock);
 
 			/* Write out the frame(s) */
@@ -807,7 +804,9 @@
 				*p2 = '$';
 			}
 		}
+		ast_channel_lock(chan);
 		pbx_substitute_variables_helper(chan, p1, postprocess2, sizeof(postprocess2) - 1);
+		ast_channel_unlock(chan);
 	}
 
 	/* Pre-allocate mixmonitor structure and spy */
@@ -946,7 +945,7 @@
 	char *filename_read = NULL;
 	char *filename_write = NULL;
 	char filename_buffer[1024] = "";
-        char *uid_channel_var = NULL;
+	char *uid_channel_var = NULL;
 
 	struct ast_flags flags = { 0 };
 	char *recipients = NULL;
@@ -1071,9 +1070,10 @@
 
 	ast_channel_lock(chan);
 
-	if (!(datastore = ast_channel_datastore_find(chan, &mixmonitor_ds_info, args.mixmonid))) {
+	datastore = ast_channel_datastore_find(chan, &mixmonitor_ds_info, args.mixmonid);
+	if (!datastore) {
 		ast_channel_unlock(chan);
-                return -1;
+		return -1;
 	}
 	mixmonitor_ds = datastore->data;
 
@@ -1123,9 +1123,11 @@
 	case CLI_INIT:
 		e->command = "mixmonitor {start|stop|list}";
 		e->usage =
-			"Usage: mixmonitor <start|stop|list> <chan_name> [args]\n"
-			"       The optional arguments are passed to the MixMonitor\n"
-			"       application when the 'start' command is used.\n";
+			"Usage: mixmonitor start <chan_name> [args]\n"
+			"         The optional arguments are passed to the MixMonitor application.\n"
+			"       mixmonitor stop <chan_name> [args]\n"
+			"         The optional arguments are passed to the StopMixMonitor application.\n"
+			"       mixmonitor list <chan_name>\n";
 		return NULL;
 	case CLI_GENERATE:
 		return ast_complete_channels(a->line, a->word, a->pos, a->n, 2);
@@ -1141,35 +1143,35 @@
 		return CLI_SUCCESS;
 	}
 
-	ast_channel_lock(chan);
-
 	if (!strcasecmp(a->argv[1], "start")) {
 		mixmonitor_exec(chan, (a->argc >= 4) ? a->argv[3] : "");
-		ast_channel_unlock(chan);
 	} else if (!strcasecmp(a->argv[1], "stop")){
-		ast_channel_unlock(chan);
 		stop_mixmonitor_exec(chan, (a->argc >= 4) ? a->argv[3] : "");
 	} else if (!strcasecmp(a->argv[1], "list")) {
 		ast_cli(a->fd, "MixMonitor ID\tFile\tReceive File\tTransmit File\n");
 		ast_cli(a->fd, "=========================================================================\n");
+		ast_channel_lock(chan);
 		AST_LIST_TRAVERSE(ast_channel_datastores(chan), datastore, entry) {
 			if (datastore->info == &mixmonitor_ds_info) {
 				char *filename = "";
 				char *filename_read = "";
 				char *filename_write = "";
+
 				mixmonitor_ds = datastore->data;
-				if (mixmonitor_ds->fs)
-					filename = ast_strdupa(mixmonitor_ds->fs->filename);
-				if (mixmonitor_ds->fs_read)
-					filename_read = ast_strdupa(mixmonitor_ds->fs_read->filename);
-				if (mixmonitor_ds->fs_write)
-					filename_write = ast_strdupa(mixmonitor_ds->fs_write->filename);
+				if (mixmonitor_ds->fs) {
+					filename = mixmonitor_ds->fs->filename;
+				}
+				if (mixmonitor_ds->fs_read) {
+					filename_read = mixmonitor_ds->fs_read->filename;
+				}
+				if (mixmonitor_ds->fs_write) {
+					filename_write = mixmonitor_ds->fs_write->filename;
+				}
 				ast_cli(a->fd, "%p\t%s\t%s\t%s\n", mixmonitor_ds, filename, filename_read, filename_write);
 			}
 		}
 		ast_channel_unlock(chan);
 	} else {
-		ast_channel_unlock(chan);
 		chan = ast_channel_unref(chan);
 		return CLI_SHOWUSAGE;
 	}
@@ -1182,15 +1184,12 @@
 /*! \brief  Mute / unmute  a MixMonitor channel */
 static int manager_mute_mixmonitor(struct mansession *s, const struct message *m)
 {
-	struct ast_channel *c = NULL;
-
+	struct ast_channel *c;
 	const char *name = astman_get_header(m, "Channel");
 	const char *id = astman_get_header(m, "ActionID");
 	const char *state = astman_get_header(m, "State");
 	const char *direction = astman_get_header(m,"Direction");
-
 	int clearmute = 1;
-
 	enum ast_audiohook_flags flag;
 
 	if (ast_strlen_zero(direction)) {
@@ -1220,15 +1219,15 @@
 	}
 
 	clearmute = ast_false(state);
+
 	c = ast_channel_get_by_name(name);
-
 	if (!c) {
 		astman_send_error(s, m, "No such channel");
 		return AMI_SUCCESS;
 	}
 
 	if (ast_audiohook_set_mute(c, mixmonitor_spy_type, flag, clearmute)) {
-		c = ast_channel_unref(c);
+		ast_channel_unref(c);
 		astman_send_error(s, m, "Cannot set mute flag");
 		return AMI_SUCCESS;
 	}
@@ -1241,15 +1240,32 @@
 
 	astman_append(s, "\r\n");
 
-	c = ast_channel_unref(c);
+	ast_channel_unref(c);
 
 	return AMI_SUCCESS;
 }
 
+static int start_mixmonitor_callback(struct ast_channel *chan, const char *filename, const char *options)
+{
+	char args[PATH_MAX];
+
+	if (ast_strlen_zero(options)) {
+		snprintf(args, sizeof(args), "%s", filename);
+	} else {
+		snprintf(args, sizeof(args), "%s,%s", filename, options);
+	}
+
+	return mixmonitor_exec(chan, args);
+}
+
+static int stop_mixmonitor_callback(struct ast_channel *chan, const char *mixmonitor_id)
+{
+	return stop_mixmonitor_full(chan, mixmonitor_id);
+}
+
 static int manager_mixmonitor(struct mansession *s, const struct message *m)
 {
-	struct ast_channel *c = NULL;
-
+	struct ast_channel *c;
 	const char *name = astman_get_header(m, "Channel");
 	const char *id = astman_get_header(m, "ActionID");
 	const char *file = astman_get_header(m, "File");
@@ -1258,16 +1274,15 @@
 	struct ast_flags flags = { 0 };
 	char *uid_channel_var = NULL;
 	const char *mixmonitor_id = NULL;
-
 	int res;
-	char args[PATH_MAX] = "";
+	char args[PATH_MAX];
+
 	if (ast_strlen_zero(name)) {
 		astman_send_error(s, m, "No channel specified");
 		return AMI_SUCCESS;
 	}
 
 	c = ast_channel_get_by_name(name);
-
 	if (!c) {
 		astman_send_error(s, m, "No such channel");
 		return AMI_SUCCESS;
@@ -1279,17 +1294,18 @@
 
 	snprintf(args, sizeof(args), "%s,%s", file, options);
 
-	ast_channel_lock(c);
 	res = mixmonitor_exec(c, args);
 
 	if (ast_test_flag(&flags, MUXFLAG_UID)) {
 		uid_channel_var = opts[OPT_ARG_UID];
+		ast_channel_lock(c);
 		mixmonitor_id = pbx_builtin_getvar_helper(c, uid_channel_var);
-	}
-	ast_channel_unlock(c);
+		mixmonitor_id = ast_strdupa(S_OR(mixmonitor_id, ""));
+		ast_channel_unlock(c);
+	}
 
 	if (res) {
-		c = ast_channel_unref(c);
+		ast_channel_unref(c);
 		astman_send_error(s, m, "Could not start monitoring channel");
 		return AMI_SUCCESS;
 	}
@@ -1306,35 +1322,33 @@
 
 	astman_append(s, "\r\n");
 
-	c = ast_channel_unref(c);
+	ast_channel_unref(c);
 
 	return AMI_SUCCESS;
 }
 
 static int manager_stop_mixmonitor(struct mansession *s, const struct message *m)
 {
-	struct ast_channel *c = NULL;
-
+	struct ast_channel *c;
 	const char *name = astman_get_header(m, "Channel");
 	const char *id = astman_get_header(m, "ActionID");
 	const char *mixmonitor_id = astman_get_header(m, "MixMonitorID");
-
 	int res;
+
 	if (ast_strlen_zero(name)) {
 		astman_send_error(s, m, "No channel specified");
 		return AMI_SUCCESS;
 	}
 
 	c = ast_channel_get_by_name(name);
-
 	if (!c) {
 		astman_send_error(s, m, "No such channel");
 		return AMI_SUCCESS;
 	}
 
 	res = stop_mixmonitor_full(c, mixmonitor_id);
-
 	if (res) {
+		ast_channel_unref(c);
 		astman_send_error(s, m, "Could not stop monitoring channel");
 		return AMI_SUCCESS;
 	}
@@ -1347,7 +1361,7 @@
 
 	astman_append(s, "\r\n");
 
-	c = ast_channel_unref(c);
+	ast_channel_unref(c);
 
 	return AMI_SUCCESS;
 }
@@ -1355,6 +1369,21 @@
 static struct ast_cli_entry cli_mixmonitor[] = {
 	AST_CLI_DEFINE(handle_cli_mixmonitor, "Execute a MixMonitor command")
 };
+
+static int set_mixmonitor_methods(void)
+{
+	struct ast_mixmonitor_methods mixmonitor_methods = {
+		.start = start_mixmonitor_callback,
+		.stop = stop_mixmonitor_callback,
+	};
+
+	return ast_set_mixmonitor_methods(&mixmonitor_methods);
+}
+
+static int clear_mixmonitor_methods(void)
+{
+	return ast_clear_mixmonitor_methods();
+}
 
 static int unload_module(void)
 {
@@ -1366,6 +1395,7 @@
 	res |= ast_manager_unregister("MixMonitorMute");
 	res |= ast_manager_unregister("MixMonitor");
 	res |= ast_manager_unregister("StopMixMonitor");
+	res |= clear_mixmonitor_methods();
 
 	return res;
 }
@@ -1380,6 +1410,7 @@
 	res |= ast_manager_register_xml("MixMonitorMute", 0, manager_mute_mixmonitor);
 	res |= ast_manager_register_xml("MixMonitor", 0, manager_mixmonitor);
 	res |= ast_manager_register_xml("StopMixMonitor", 0, manager_stop_mixmonitor);
+	res |= set_mixmonitor_methods();
 
 	return res;
 }

Modified: team/dlee/record/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/apps/app_queue.c?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/apps/app_queue.c (original)
+++ team/dlee/record/apps/app_queue.c Wed Jul  3 12:46:49 2013
@@ -1811,39 +1811,22 @@
 	new->opos = *pos;
 }
 
-struct stasis_message_type *queue_caller_join_type(void);
-struct stasis_message_type *queue_caller_leave_type(void);
-struct stasis_message_type *queue_caller_abandon_type(void);
-
-struct stasis_message_type *queue_member_status_type(void);
-struct stasis_message_type *queue_member_added_type(void);
-struct stasis_message_type *queue_member_removed_type(void);
-struct stasis_message_type *queue_member_pause_type(void);
-struct stasis_message_type *queue_member_penalty_type(void);
-struct stasis_message_type *queue_member_ringinuse_type(void);
-
-struct stasis_message_type *queue_agent_called_type(void);
-struct stasis_message_type *queue_agent_connect_type(void);
-struct stasis_message_type *queue_agent_complete_type(void);
-struct stasis_message_type *queue_agent_dump_type(void);
-struct stasis_message_type *queue_agent_ringnoanswer_type(void);
-
-STASIS_MESSAGE_TYPE_DEFN(queue_caller_join_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_caller_leave_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_caller_abandon_type);
-
-STASIS_MESSAGE_TYPE_DEFN(queue_member_status_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_member_added_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_member_removed_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_member_pause_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_member_penalty_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_member_ringinuse_type);
-
-STASIS_MESSAGE_TYPE_DEFN(queue_agent_called_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_agent_connect_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_agent_complete_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_agent_dump_type);
-STASIS_MESSAGE_TYPE_DEFN(queue_agent_ringnoanswer_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_caller_join_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_caller_leave_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_caller_abandon_type);
+
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_member_status_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_member_added_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_member_removed_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_member_pause_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_member_penalty_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_member_ringinuse_type);
+
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_agent_called_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_agent_connect_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_agent_complete_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_agent_dump_type);
+STASIS_MESSAGE_TYPE_DEFN_LOCAL(queue_agent_ringnoanswer_type);
 
 static void queue_channel_manager_event(void *data,
 	struct stasis_subscription *sub, struct stasis_topic *topic,
@@ -4449,8 +4432,6 @@
 						o->block_connected_update = 0;
 					}
 
-					ast_cel_report_event(in, AST_CEL_FORWARD, NULL, ast_channel_call_forward(o->chan), NULL);
-
 					ast_verb(3, "Now forwarding %s to '%s/%s' (thanks to %s)\n", inchan_name, tech, stuff, ochan_name);
 					/* Setup parameters */
 					o->chan = ast_request(tech, ast_channel_nativeformats(in), in, stuff, &status);
@@ -4544,7 +4525,8 @@
 					ast_channel_unlock(qe->chan);
 
 					ast_channel_lock_both(qe->chan, original);
-					ast_channel_publish_dial(qe->chan, original, NULL, "CANCEL");
+					ast_channel_publish_dial_forward(qe->chan, original, NULL, "CANCEL",
+						ast_channel_call_forward(original));
 					ast_channel_unlock(original);
 					ast_channel_unlock(qe->chan);
 					/* Hangup the original channel now, in case we needed it */

Modified: team/dlee/record/apps/app_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/apps/app_stasis.c?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/apps/app_stasis.c (original)
+++ team/dlee/record/apps/app_stasis.c Wed Jul  3 12:46:49 2013
@@ -106,9 +106,7 @@
 	return r;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY,
-	AST_MODFLAG_DEFAULT,
-	"Stasis dialplan application",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Stasis dialplan application",
 	.load = load_module,
 	.unload = unload_module,
 	.nonoptreq = "res_stasis",

Modified: team/dlee/record/apps/confbridge/conf_chan_announce.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/record/apps/confbridge/conf_chan_announce.c?view=diff&rev=393548&r1=393547&r2=393548
==============================================================================
--- team/dlee/record/apps/confbridge/conf_chan_announce.c (original)
+++ team/dlee/record/apps/confbridge/conf_chan_announce.c Wed Jul  3 12:46:49 2013
@@ -172,8 +172,8 @@
 int conf_announce_channel_push(struct ast_channel *ast)
 {
 	struct ast_bridge_features *features;
+	struct ast_channel *chan;

[... 18068 lines stripped ...]



More information about the asterisk-commits mailing list