Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call file with WAV sound playback

Status
Not open for further replies.

michael.tint

Systems Engineer
Aug 9, 2019
2
GB
Hello

Call file with WAV playback

mydate=`date +%d%m%y_%H%M%S`
filename="$mydate"

text2wave /tmp/alarm.txt -o /tmp/$filename.wav

echo -e "Channel: DAHDI/g0/xxxxxxxx
Callerid: Nagios
MaxRetries: 3
RetryTime: 60
WaitTime: 60
Application: Playback
Data: /tmp/$filename" > /var/spool/asterisk/$filename.call

I am not hearing any sound and phone gets a call but then drop.

 
Why the double quotes on the Data: line?
Have you manually downloaded and listened to the WAV file to be sure it's created properly?



Just my $.02

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 

output of echo is saved to a file. hence " for closing.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top