[asterisk-commits] file: trunk r413122 - in /trunk: ./ res/stasis/control.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 30 07:42:47 CDT 2014


Author: file
Date: Wed Apr 30 07:42:42 2014
New Revision: 413122

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=413122
Log:
res_stasis: Add progress indications to operations which perform media.

This change fixes operations which did not account for the fact that they may
be executed on channels which have not been answered. These operations will
now indicate progress when invoked.

ASTERISK-23560 #close
ASTERISk-23560 #comment Reported by: Jan Svoboda

Review: https://reviewboard.asterisk.org/r/3495/
........

Merged revisions 413121 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/stasis/control.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/stasis/control.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis/control.c?view=diff&rev=413122&r1=413121&r2=413122
==============================================================================
--- trunk/res/stasis/control.c (original)
+++ trunk/res/stasis/control.c Wed Apr 30 07:42:42 2014
@@ -444,6 +444,10 @@
 {
 	RAII_VAR(struct stasis_app_control_dtmf_data *, dtmf_data, data, ast_free);
 
+	if (ast_channel_state(chan) != AST_STATE_UP) {
+		ast_indicate(chan, AST_CONTROL_PROGRESS);
+	}
+
 	if (dtmf_data->before) {
 		ast_safe_sleep(chan, dtmf_data->before);
 	}
@@ -629,6 +633,10 @@
 {
 	char *moh_class = data;
 
+	if (ast_channel_state(chan) != AST_STATE_UP) {
+		ast_indicate(chan, AST_CONTROL_PROGRESS);
+	}
+
 	ast_moh_start(chan, moh_class, NULL);
 
 	ast_free(moh_class);
@@ -661,6 +669,10 @@
 static int app_control_silence_start(struct stasis_app_control *control,
 	struct ast_channel *chan, void *data)
 {
+	if (ast_channel_state(chan) != AST_STATE_UP) {
+		ast_indicate(chan, AST_CONTROL_PROGRESS);
+	}
+
 	if (control->silgen) {
 		/* We have a silence generator, but it may have been implicitly
 		 * disabled by media actions (music on hold, playing media,




More information about the asterisk-commits mailing list