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?