Merge branch '0.0.1' of Point808/wazo-dictate into master

This commit is contained in:
Josh North 2019-02-15 12:06:01 -05:00 committed by Gitea
commit 882edbfb40
3 changed files with 40 additions and 0 deletions

10
dictate.conf Normal file
View File

@ -0,0 +1,10 @@
[dictate]
exten => s,1,Playback(/var/lib/asterisk/sounds/custom/dd-rad,skip)
exten => s,2,Dictate(/var/spool/asterisk/dictate)
exten => s,3,System(for i in /var/spool/asterisk/dictate/*.raw; do /usr/bin/sox -r 8000 -w -c 1 -s $i /var/spool/asterisk/dictate/radiology/$(basename $i .raw).wav; done)
exten => s,4,System(date > /var/spool/asterisk/dictate/radiology/Message.txt)
exten => s,5,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,6,System(rm -f /var/spool/asterisk/dictate/radiology/*.raw)
exten => s,7,System(mv /var/spool/asterisk/dictate/radiology/*.wav /var/spool/asterisk/dictate/radiology/*.wav.old)
exten => s,8,Wait,2
exten => s,9,Hangup

11
wazo/plugin.yml Normal file
View File

@ -0,0 +1,11 @@
name: dictate
namespace: point808
version: 0.0.1
author: Josh North
display_name: Dictate
description: Set up dictation line
min_wazo_version: 18.02
tags:
- application
homepage: https://git.point808.com/Point808/wazo-dictate
icon: compress

19
wazo/rules Normal file
View File

@ -0,0 +1,19 @@
#!/bin/sh
case "$1" in
build)
;;
package)
mkdir -p ${pkgdir}/etc/asterisk/extensions_extra.d
cp dictate.conf ${pkgdir}/etc/asterisk/extensions_extra.d/
;;
install)
asterisk -x 'dialplan reload'
;;
uninstall)
;;
*)
echo "$0 called with unknown argument '$1'" >&2
exit 1
;;
esac