From: Anthony Minessale Date: Thu, 24 Jul 2014 18:17:55 +0000 (+0500) Subject: send dtmf from keyboard strokes X-Git-Tag: v1.4.8~10^2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acffa7961bbe93b939e09242753c9a2ea1788bfc;p=thirdparty%2Ffreeswitch.git send dtmf from keyboard strokes --- diff --git a/html5/verto/demo/verto.js b/html5/verto/demo/verto.js index b770a7c394..b1777e252a 100644 --- a/html5/verto/demo/verto.js +++ b/html5/verto/demo/verto.js @@ -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); + } + }); + }