Index: app_record.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_record.c,v retrieving revision 1.21 diff -u -r1.21 app_record.c --- app_record.c 23 Sep 2004 16:39:33 -0000 1.21 +++ app_record.c 12 Oct 2004 00:15:29 -0000 @@ -29,7 +29,7 @@ static char *synopsis = "Record to a file"; static char *descrip = -" Record(filename:format|silence[|maxduration][|option])\n\n" +" Record(filename:format|silence[|maxduration][|option][|terminator])\n\n" "Records from the channel into a given filename. If the file exists it will\n" "be overwritten.\n" "- 'format' is the format of the file type to be recorded (wav, gsm, etc).\n" @@ -41,7 +41,8 @@ "If filename contains '%d', these characters will be replaced with a number\n" "incremented by one each time the file is recorded. \n\n" "Formats: g723, g729, gsm, h263, ulaw, alaw, vox, wav, WAV\n\n" -"User can press '#' to terminate the recording and continue to the next priority.\n\n" +"If no terminator key is set, user can press '#' to terminate the recording and continue to the next priority.\n" +"Star can be used as the terminator key, which will allow the user to press the * key to terminate the recording.\n" "Returns -1 when the user hangs up.\n"; STANDARD_LOCAL_USER; @@ -165,6 +166,12 @@ option_skip = 1; if (!strcasecmp(option, "noanswer")) option_noanswer = 1; + /* Getting the options for the terminator key */ + char terminator_key = '#'; + if (!strcasecmp(option, "star")) + terminator_key = '*'; + ast_verbose("key = %c\n",terminator_key); + /* done parsing */ @@ -275,7 +282,7 @@ } } if ((f->frametype == AST_FRAME_DTMF) && - (f->subclass == '#')) { + (f->subclass == terminator_key)) { ast_frfree(f); break; }