--- /usr/src/asterisk/apps/app_voicemail.c 2004-02-25 01:24:52.000000000 -0500 +++ /usr/src/astpatches/app_voicemail.c.duration 2004-02-25 01:24:24.000000000 -0500 @@ -1473,6 +1473,9 @@ res = play_and_record(chan, NULL, fn, vmmaxmessage, fmt); if (res > 0) res = 0; + if ((txt = fopen(txtfile, "r"))==NULL) { + ast_log(LOG_WARNING, "No vm file on duration!\n"); + }else{ txt = fopen(txtfile, "a"); if (txt) { time(&end); @@ -1491,6 +1494,7 @@ myserveremail = vmu->serveremail; sendmail(myserveremail, vmu, msgnum, ext, chan->callerid, fn, fmt, end - start, attach_user_voicemail); } + } if (strlen(vmu->pager)) { char *myserveremail = serveremail; if (strlen(vmu->serveremail))