forked from Mirrors/freeswitch
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7189 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
daea564f9b
commit
d14d2465b4
20
scripts/dtmftest.js
Normal file
20
scripts/dtmftest.js
Normal file
@ -0,0 +1,20 @@
|
||||
function onPlayFile(s, type, obj, arg)
|
||||
{
|
||||
try {
|
||||
if (type == "dtmf") {
|
||||
console_log("info", "DTMF digit: " + s.name + " [" + obj.digit + "] len [" + obj.duration + "]\n\n");
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console_log("err", e + "\n");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
session.answer();
|
||||
|
||||
while(session.ready()) {
|
||||
session.streamFile(argv[0], onPlayFile);
|
||||
}
|
Loading…
Reference in New Issue
Block a user