send dtmf from keyboard strokes

This commit is contained in:
Anthony Minessale 2014-07-24 23:17:55 +05:00
parent 004c5ab2b0
commit acffa7961b
1 changed files with 10 additions and 0 deletions

View 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);
}
});
}