]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
send dtmf from keyboard strokes
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 24 Jul 2014 18:17:55 +0000 (23:17 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 24 Jul 2014 18:17:55 +0000 (23:17 +0500)
html5/verto/demo/verto.js

index b770a7c39495157bc5658a3a0786ce419d3770d3..b1777e252a25880e32194146c2a4c2fb003d6d97 100644 (file)
@@ -429,6 +429,16 @@ function init() {
        }
     });
 
+    $(document).keypress(function(event) {
+       if (!cur_call) return;
+       var key = String.fromCharCode(event.keyCode);
+       var i = parseInt(key);
+
+       if (key === "#" || key === "*" || key === "0" || (i > 0 && i <= 9)) {
+           cur_call.dtmf(key);
+       }
+    });
+
 
 }