Cmd Record used to record a file, cp to INBOX -> VM crash


What actually happens is that when the user retrieves the voicemail, asterisk crashes. This may be because of the wrong format recorded to voicemail.conf allowed formats, or because the .txt file is being made by the script.

Here are the details:



exten => s,1,Answer()
exten => s,2,Set(START_TIME=${EPOCH})
exten => s,3,Set(THIS_MSG_FILE=org/memo_${UNIQUEID}.WAV)
exten => s,4,Record(${THIS_MSG_FILE})
exten => s,5,Wait(1)
exten => s,6,Set(END_TIME=${EPOCH})
exten => s,7,Set(DURATION_TIME=$[${END_TIME}-${START_TIME}])
exten => s,8,NoOp(Duration: ${DURATION_TIME})
exten => s,9,AGI(copyRecordingToMailbox.agi|${THIS_MSG_FILE}&${CALLERIDNUM}&${DURATION_TIME}&${CHANNEL}&571&570&569)
exten => s,10,Hangup()

In the agi script just makes the msgXXXX.txt file for voicemail and copies the recorded file to the mailbox(es)

I’ve tried formats for cmd record of: .wav .gsm .WAV
no luck…

any help would be great cos I’m trying to release this script as a memo broadcast service as part of my useful office tools for asterisk…