From acffa7961bbe93b939e09242753c9a2ea1788bfc Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 24 Jul 2014 23:17:55 +0500 Subject: [PATCH] send dtmf from keyboard strokes --- html5/verto/demo/verto.js | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); + } + }); + }