Changed how return value of WaitForDigit is built#4
Changed how return value of WaitForDigit is built#4Ulexus merged 1 commit intoCyCoreSystems:masterfrom
Conversation
|
Good find, thanks! I didn't realize "WAIT FOR DIGIT" used the return value as the DTMF value... that's particularly perplexing since DTMF can contain non-numeric characters. Never-the-less, the official documentation appears to agree with you. Do you happen to know how non-numeric DTMF digits are presented in this case? Regardless, we do have the |
|
Hi, I'm not recasting Result, I'm returning, as per interface, a string. WAIT FOR DIGIT will encode as ASCII code the digits (* and # included) into result. I'm using this modified version with our software and is working flawlessly. |
|
|
|
Hi, it's not the same, this is what is returned when pressing 1 (ASCII 49) and * (ASCII 42) ResultString is the string representation of the number (49 for example) and Result is the int parsed from the string. Doing string(int) I'm not getting the string representation of int but the corresponding ASCII char. If I press "" ResultString is "42", Result is 42 and string(Result) is "" which is the one I want returned. Hope this is more clear |
|
Oh, I see. It's returning the ASCII integer value of the received digit? How bizarre! Well, so be it, then. Thanks for the patch! |
WaitForDigit should return the pressed digit as result. Asterisk result value should be parsed as ASCII char.