The echo script can play a prompt before starting to echo back voice.
git-svn-id: http://yate.null.ro/svn/yate/trunk@3102 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
b92560f83c
commit
76e67ff79c
|
@ -4,9 +4,17 @@
|
|||
# Loops back audio data
|
||||
# To test add a route to: external/playrec/echo.sh
|
||||
|
||||
prompt=""
|
||||
# put here a proper wave/play file to play before starting echoing
|
||||
# prompt="share/sounds/tone.wav"
|
||||
|
||||
read
|
||||
echo "$REPLY" | sed 's/^[^:]*:\([^:]*\):.*$/%%<message:\1:true:/;'
|
||||
|
||||
if [ -n "$prompt" -a -f "$prompt" ]; then
|
||||
echo "================ play prompt ================" >&2
|
||||
echo "%%>message::"`date +%s`":chan.attach::single=true:override=wave/play/$prompt"
|
||||
fi
|
||||
echo "=================== play ====================" >&2
|
||||
(sleep 1; cat) <&3 >&4
|
||||
echo "================= play done =================" >&2
|
||||
|
|
Loading…
Reference in New Issue