Asterisk cmd Dictate
Created by: dblood,Last modification on Mon 29 of Oct, 2007 [16:20 UTC] by jon.webster
Dictate
Asterisk now comes with an application to facilitate dictations, see bug 3893.Synopsis
Virtual Dictation MachineDescription
Dictate([<base_dir>[|<filename>]])Start dictation machine using optional base dir for files.
Options
dial 1 to toggle record and playback modesdial 0 for help
dial * pause/unpause
dial # to enter a new filename
Playback Mode Options
dial 2 to toggle fast playback (speed 1x, 2x, 3x, 4x)dial 7 to seek backwards a few frames
dial 8 to seek forwards a few frames
Record Mode Options
dial 8 to erase the whole file and start again.File Format
The files are recorded in raw format and can be changed using sox.ex: sox -r 8000 -w -c 1 -s raw input file output file
Examples
exten => 1000,1,Dictate()exten => 1100,1,Dictate(/tmp/dictations)
exten => 1200,1,Dictate(/tmp/dictations|1234)
Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Comments
333Re: medical dictation
333medical dictation
Where is your hospital located? I have an application that would be of value to you, and it
wraps around the dictation system that we have configured.
Cheers,
Vincent
333Re: An alternative
333An alternative
I'm not 100% clear on what your goals are with the dictate command, but it seems like everthing you want to do after the user hangs up is system commands. If that is the case, what if you just use Cron and have it run every five minutes or so? I know that's not a perfect, clean solution but it might work. I know I wouldn't like it either, but I've seen others trying to execute things after hangup and remember they were not having much success. Please keep in mind, I'm a noob too.
Hope this helps.
333Re:
333
333Usage confusion
custom-dic-rad
exten => s,1,Dictate(/var/spool/asterisk/dictate/radiology)
exten => s,2,System(for i in /var/spool/asterisk/dictate/radiology/*.raw; do /usr/bin/sox -r 8000 -w -c 1 -s $i /var/spool/asterisk/dictate/radiology/$(basename $i .raw).wav; done)
exten => s,3,System(date > /var/spool/asterisk/dictate/radiology/Message.txt)
exten => s,4,System(mutt -s "Dictation from workgroup Radiology" -a /var/spool/asterisk/dictate/radiology/*.wav dictation@hospital.local < /var/spool/asterisk/dictate/radiology/Message.txt)
exten => s,5,System(rm -f /var/spool/asterisk/dictate/radiology/*.raw)
exten => s,6,Wait,2
exten => s,7,Hangup