1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-08-14 09:58:17 +00:00
Files
build
cmake_modules
conf
debian
docs
dtd
freeswitch.xcodeproj
fscomm
htdocs
libs
patches
scripts
applescript
c
javascript
aadir
js_modules
api.js
dtmftest.js
pizza.js
ps_pizza.js
lua
perl
php
py_modules
python
rss
sql
trace
build_freeswitch_svn
check-gitignore.sh
debug_sofia.sh
freeswitch-gcore
freeswitch-reporter
freeswitch.pkg_deps.sh
freeswitch.sh
fsxs.in
gentls_cert.in
m4a-to-wav.sh
setup-git.sh
tagscript.sh
yes_no.gram
src
support-d
w32
web
.gitignore
.version.in
CMakeLists.txt
Freeswitch.2005.unsupported.sln
Freeswitch.2008.express.sln
Freeswitch.2008.sln
Freeswitch.2008.sln.debug.bat
Freeswitch.2008.sln.release.bat
Freeswitch.2010.sln
INSTALL
Makefile.am
acinclude.m4
bootstrap.sh
configure.in
freeswitch.spec
freeswitch/scripts/javascript/dtmftest.js
2009-06-27 00:38:46 +00:00

22 lines
417 B
JavaScript

function onPlayFile(s, type, obj, arg)
{
try {
if (type == "dtmf") {
console_log("info", "DTMF digit: " + s.name + " [" + obj.digit + "] len [" + obj.duration + "]\n\n");
session.execute("phrase", "spell," + obj.digit);
}
} catch (e) {
console_log("err", e + "\n");
}
return true;
}
session.answer();
while(session.ready()) {
session.streamFile(argv[0], onPlayFile);
}