Skip to content

Commit c2f0c18

Browse files
committed
Applied patch from Michael Neuhauser:
"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"
1 parent a6b068d commit c2f0c18

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dist/agi/demo.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ for (var i = 10; i >= 0; i--)
77
channel.streamFile('beep');
88

99
// read a few dtmf digits
10-
var digit;
11-
while ((digit = channel.waitForDigit(10000)) != 0)
10+
var code;
11+
while ((code = channel.waitForDigit(10000)) != 0)
1212
{
13+
var digit = String.fromCharCode(code);
1314
if (digit == '#' || digit == '*')
1415
{
1516
break;

0 commit comments

Comments
 (0)