[Freeswitch-svn] [commit] r7189 - freeswitch/trunk/scripts
Freeswitch SVN
anthm at freeswitch.org
Sat Jan 12 14:25:36 EST 2008
Author: anthm
Date: Sat Jan 12 14:25:35 2008
New Revision: 7189
Added:
freeswitch/trunk/scripts/dtmftest.js
Log:
update
Added: freeswitch/trunk/scripts/dtmftest.js
==============================================================================
--- (empty file)
+++ freeswitch/trunk/scripts/dtmftest.js Sat Jan 12 14:25:35 2008
@@ -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);
+}
More information about the Freeswitch-svn
mailing list