Record application generated unusable WAV files

I am updating a prompt recording context. I was recently asked to modify it so that the user could not generate WAV files that were greater than 1 minute in length. I’m using 1.8.5 and naturally chose to use the maxduration parameter to accomplish this.

Original code:

  exten => record, n, Playback(silence/1&record&your&vm-message&after-the-tone&then-press-pound)
  exten => record, n, Record(${BCAST_RECORDINGS}/${internal_filename}:wav,,,k)

New code:

  exten => record, n, Playback(silence/1&record&your&vm-message&after-the-tone&then-press-pound&silence/1&maximum&vm-message&time&is&digits/1&minute)
  exten => record, n, Record(${BCAST_RECORDINGS}/${internal_filename}:wav,,60,k)

My problem is that hitting the maxduration means the user did not press pound. The file that the Record() call generates is then bad and cannot be used. Is there a way to use Record() with a time cutoff that generates a usable file?

i don’t have my Asterisk box now ,for make some tests. and help you. but try setting a timeout before the record app. Set(TIMEOUT(absolute)=60) . and please check the syntax

Record(filename.format,silence,maxduration,options). And if is possible try with a different format

wiki.asterisk.org/wiki/display/ … ion_Record