2004-07-02 10:00:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-02-05 11:42:17 +00:00
|
|
|
# play.sh
|
|
|
|
# This file is part of the YATE Project http://YATE.null.ro
|
|
|
|
#
|
|
|
|
# Yet Another Telephony Engine - a fully featured software PBX and IVR
|
2023-05-29 11:46:58 +00:00
|
|
|
# Copyright (C) 2005-2023 Null Team
|
2014-02-05 11:42:17 +00:00
|
|
|
#
|
|
|
|
# This software is distributed under multiple licenses;
|
|
|
|
# see the COPYING file in the main directory for licensing
|
|
|
|
# information for this specific distribution.
|
|
|
|
#
|
|
|
|
# This use of this software may be subject to additional restrictions.
|
|
|
|
# See the LEGAL file in the main directory for details.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
|
2004-07-02 10:00:26 +00:00
|
|
|
# Bourne shell test script for the Yate external module interface
|
|
|
|
# Plays sound using the "play" program (from the sox package)
|
|
|
|
# To test add a route to: external/record/play.sh
|
|
|
|
|
2014-12-16 09:39:41 +00:00
|
|
|
read -r REPLY
|
2005-08-06 19:37:31 +00:00
|
|
|
echo "$REPLY" | sed 's/^[^:]*:\([^:]*\):.*$/%%<message:\1:true:/;'
|
|
|
|
|
2004-07-02 10:00:26 +00:00
|
|
|
echo "=================== play ====================" >&2
|
|
|
|
play -t raw -c 1 -f s -r 8000 -s w - <&3
|
|
|
|
echo "================= play done =================" >&2
|