[Home]

Summary:ASTERISK-01056: [patch] Add a variable to hold the filename created in the Record application
Reporter:oacyscom (oacyscom)Labels:
Date Opened:2004-02-19 17:26:45.000-0600Date Closed:2008-01-15 14:48:24.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_record.patch
Description:The attached patch upgrades the Record application so this it creates a variable, RECORD, containing the filename used. Specifically, this variable contains the filename after %d substitution has taken place.

****** ADDITIONAL INFORMATION ******

--- app_record.c.orig   2004-02-19 14:01:21.000000000 -0800
+++ app_record.c        2004-02-19 09:39:32.000000000 -0800
@@ -50,6 +50,7 @@
       int percentflag = 0;
       char fil[256];
       char tmp[256];
+       char tmp2[256];
       char ext[10];
       char * vdata;  /* Used so I don't have to typecast every use of *data */
       int i = 0;
@@ -220,6 +221,9 @@
       } else
               ast_log(LOG_WARNING, "Could not answer channel '%s'\n", chan->name);

+       snprintf(tmp2,255,"%s=%s","RECORD",tmp);
+       pbx_builtin_setvar(chan,tmp2);
+
       LOCAL_USER_REMOVE(u);
       if (silence > 0) {
               res = ast_set_read_format(chan, rfmt);
Comments:By: Mark Spencer (markster) 2004-03-21 23:12:17.000-0600

Good idea, bad implementation.  I've got it in, and store the recorded file as "RECORDED_FILE".  Thanks!

By: Mark Spencer (markster) 2004-03-21 23:12:31.000-0600

Fixed in CVS

By: Digium Subversion (svnbot) 2008-01-15 14:48:24.000-0600

Repository: asterisk
Revision: 2519

U   trunk/apps/app_record.c

------------------------------------------------------------------------
r2519 | markster | 2008-01-15 14:48:24 -0600 (Tue, 15 Jan 2008) | 2 lines

Store recorded file in RECORDED_FILE if 0 is used... (bug ASTERISK-1056)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=2519