[asterisk-commits] oej: branch oej/no-premature-183 r203135 - in /team/oej/no-premature-183: app...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 25 11:21:18 CDT 2009


Author: oej
Date: Thu Jun 25 11:21:14 2009
New Revision: 203135

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203135
Log:
Make sure we send progress control frame when sending audio on a channel that's not in UP state. This is to get the early media forced by apps with "noanswer" option to work when we filter out media frames before answer or actual session progress control frame.

Modified:
    team/oej/no-premature-183/apps/app_disa.c
    team/oej/no-premature-183/apps/app_playback.c
    team/oej/no-premature-183/main/pbx.c

Modified: team/oej/no-premature-183/apps/app_disa.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/oej/no-premature-183/apps/app_disa.c?view=diff&rev=203135&r1=203134&r2=203135
==============================================================================
--- team/oej/no-premature-183/apps/app_disa.c (original)
+++ team/oej/no-premature-183/apps/app_disa.c Thu Jun 25 11:21:14 2009
@@ -176,7 +176,12 @@
 			/* answer */
 			ast_answer(chan);
 		}
-	} else special_noanswer = 1;
+	} else {
+		special_noanswer = 1;
+		if (chan->_state != AST_STATE_UP) {
+			ast_indicate(chan, AST_CONTROL_PROGRESS);
+		}
+	}
 	i = k = x = 0; /* k is 0 for pswd entry, 1 for ext entry */
 	did_ignore = 0;
 	exten[0] = 0;

Modified: team/oej/no-premature-183/apps/app_playback.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/oej/no-premature-183/apps/app_playback.c?view=diff&rev=203135&r1=203134&r2=203135
==============================================================================
--- team/oej/no-premature-183/apps/app_playback.c (original)
+++ team/oej/no-premature-183/apps/app_playback.c Thu Jun 25 11:21:14 2009
@@ -418,9 +418,13 @@
 		if (option_skip) {
 			/* At the user's option, skip if the line is not up */
 			goto done;
-		} else if (!option_noanswer)
+		} else if (!option_noanswer) {
 			/* Otherwise answer unless we're supposed to send this while on-hook */
 			res = ast_answer(chan);
+		} else {
+			ast_indicate(chan, AST_CONTROL_PROGRESS);
+		}
+
 	}
 	if (!res) {
 		char *back = args.filenames;

Modified: team/oej/no-premature-183/main/pbx.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/oej/no-premature-183/main/pbx.c?view=diff&rev=203135&r1=203134&r2=203135
==============================================================================
--- team/oej/no-premature-183/main/pbx.c (original)
+++ team/oej/no-premature-183/main/pbx.c Thu Jun 25 11:21:14 2009
@@ -5707,6 +5707,8 @@
 		} else if (!ast_test_flag(&flags, BACKGROUND_NOANSWER)) {
 			res = ast_answer(chan);
 		}
+		/* Send progress control frame to start early media */
+		ast_indicate(chan, AST_CONTROL_PROGRESS);
 	}
 
 	if (!res) {




More information about the asterisk-commits mailing list