--- 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);