Skip to content

Commit

Permalink
Applied patch from Michael Neuhauser:
Browse files Browse the repository at this point in the history
"The JavaScript demo is not working as expected in my environment (SUN
java 1.6.0_07, Asterisk 1.4.19): The problem is that
channel.waitForDigit(10000) returns an integer but channel.sayDigits()
expects a string. Converting the integer to a single character string
with String.fromCharCode() fixes the problem for me"
  • Loading branch information
srt committed Jun 16, 2009
1 parent a6b068d commit c2f0c18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/agi/demo.js
Expand Up @@ -7,9 +7,10 @@ for (var i = 10; i >= 0; i--)
channel.streamFile('beep');

// read a few dtmf digits
var digit;
while ((digit = channel.waitForDigit(10000)) != 0)
var code;
while ((code = channel.waitForDigit(10000)) != 0)
{
var digit = String.fromCharCode(code);
if (digit == '#' || digit == '*')
{
break;
Expand Down

0 comments on commit c2f0c18

Please sign in to comment.