/var/lib/asterisk/agi-bin/googlettstime.agi #!/usr/bin/perl use strict; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); my @dweek = qw/日 月 火 水 木 金 土/; $mon++; my $out = "$mon月$mday日$dweek[$wday]曜日$hour時$min分$sec秒です"; print "SET VARIABLE TTSCLOCK $out";
# chmod +x /var/lib/asterisk/agi-bin/googlettstime.agi
/etc/asterisk/extensions_additional.conf ;最終行に挿入 ;=== 日時読み上げ (Google TTS) === exten => 117,1,Answer() exten => 117,n,agi(googlettstime.agi) exten => 117,n,agi(googletts.agi,"${TTSCLOCK}",ja) exten => 117,n,Wait(1) exten => 117,n,Hangup()
# fwconsole restart
コメント