[Asterisk-cvs] asterisk channel.c,1.131,1.132

markster at lists.digium.com markster at lists.digium.com
Fri Aug 6 10:57:31 CDT 2004


Update of /usr/cvsroot/asterisk
In directory localhost.localdomain:/tmp/cvs-serv25305

Modified Files:
	channel.c 
Log Message:
Only play announce time on first pass


Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -d -r1.131 -r1.132
--- channel.c	28 Jul 2004 20:41:49 -0000	1.131
+++ channel.c	6 Aug 2004 14:43:25 -0000	1.132
@@ -2464,19 +2464,23 @@
 	struct ast_channel *who = NULL;
 	int res=0;
 	int nativefailed=0;
+	int firstpass;
 	struct timeval start_time,precise_now;
 	long elapsed_ms=0, time_left_ms=0;
 	int playit=0, playitagain=1, first_time=1;
 
 	flags = (config->allowdisconnect_out||config->allowredirect_out ? AST_BRIDGE_DTMF_CHANNEL_0 : 0) + (config->allowdisconnect_in||config->allowredirect_in ? AST_BRIDGE_DTMF_CHANNEL_1 : 0);
 
+	firstpass = config->firstpass;
+	config->firstpass = 0;
+
 	/* timestamp */
 	gettimeofday(&start_time,NULL);
 	time_left_ms = config->timelimit;
 
-	if (config->play_to_caller && config->start_sound)
+	if (config->play_to_caller && config->start_sound && firstpass)
 		bridge_playfile(c0,c1,config->start_sound,time_left_ms / 1000);
-	if (config->play_to_callee && config->start_sound)
+	if (config->play_to_callee && config->start_sound && firstpass)
 		bridge_playfile(c1,c0,config->start_sound,time_left_ms / 1000);
 
 	/* Stop if we're a zombie or need a soft hangup */




More information about the svn-commits mailing list