[svn-commits] trunk r33295 - in /trunk: ./ apps/app_dial.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Jun 9 11:12:47 MST 2006


Author: file
Date: Fri Jun  9 13:12:46 2006
New Revision: 33295

URL: http://svn.digium.com/view/asterisk?rev=33295&view=rev
Log:
Merged revisions 33294 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r33294 | file | 2006-06-09 15:08:00 -0300 (Fri, 09 Jun 2006) | 2 lines

Handle hangup during recording of screened name (issue #7304 reported by kulldominique)

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_dial.c

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

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?rev=33295&r1=33294&r2=33295&view=diff
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Fri Jun  9 13:12:46 2006
@@ -1017,11 +1017,20 @@
 				   "At the tone, please say your name:"
 
 				*/
-				ast_play_and_record(chan, "priv-recordintro", privintro, 4, "gsm", &duration, 128, 2000, 0);  /* NOTE: I've reduced the total time to 4 sec */
+				res = ast_play_and_record(chan, "priv-recordintro", privintro, 4, "gsm", &duration, 128, 2000, 0);  /* NOTE: I've reduced the total time to 4 sec */
 										/* don't think we'll need a lock removed, we took care of
 										   conflicts by naming the privintro file */
-				if( !ast_streamfile(chan, "vm-dialout", chan->language) )
-					ast_waitstream(chan, "");
+				if (res == -1) {
+					/* Delete the file regardless since they hung up during recording */
+                                        ast_filedelete(privintro, NULL);
+                                        if( ast_fileexists(privintro,NULL,NULL ) > 0 )
+                                                ast_log(LOG_NOTICE,"privacy: ast_filedelete didn't do its job on %s\n", privintro);
+                                        else if (option_verbose > 2)
+                                                ast_verbose( VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
+					goto out;
+				}
+                                if( !ast_streamfile(chan, "vm-dialout", chan->language) )
+                                        ast_waitstream(chan, "");
 			}
 		}
 	}
@@ -1279,7 +1288,6 @@
 					res2 = ast_play_and_wait(peer,"priv-callpending");
 				if (!valid_priv_reply(&opts, res2))
 					res2 = 0;
-				
 				/* priv-callpending script: 
 				   "I have a caller waiting, who introduces themselves as:"
 				*/



More information about the svn-commits mailing list