From d14d2465b4612e1cff3b8ffcaf4e4a90a90bcdb0 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 12 Jan 2008 19:25:35 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7189 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- scripts/dtmftest.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/dtmftest.js diff --git a/scripts/dtmftest.js b/scripts/dtmftest.js new file mode 100644 index 0000000000..77e0e7034d --- /dev/null +++ b/scripts/dtmftest.js @@ -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); +}