When using # (hash) as valid input in IVR menu or getInput() function the Plivo Cloud returns empty digits, altough this is considered a valid digit according to their docs: https://www.plivo.com/docs/xml/getdigits/
When using # (hash) as valid input in IVR menu or getInput() function the Plivo Cloud returns empty digits, altough this is considered a valid digit according to their docs: https://www.plivo.com/docs/xml/getdigits/
Comments
Comment #1
tamerzg commentedFrom plivo support:
"In there is an attribute " finishOnKey " which has the default value "#" .So you need to change it to something else , that's why it's giving you an empty $_REQUEST['digits']."
Actually Plivo doesn't allow empty finishOnKey (end_key in our case) value, but it defaults to # which then can't be used in getdigits. I fixed some of the scripts which where using pound key as valid digit, but had empty end_key (switched end_key to * or something else not used in valid digit).
But real problem is with addRunIvrMenu() in where we allow any digit as valid input (1234567890*#) while Plivo must use one of digits for end_key.
Looking at code that generates ivr menu at voipscript.inc line 1152:
we see third param passed for end_key is empty.
Above code will work for other servers but not Plivo. This is more of design issue than a bug.
What should we do? If we remove # key as valid from ivr menu and set end_key as this:
that would affect all servers.
Or should we just mention in docs that in case of Plivo we can't use # as valid IVR menu option?
Or just warn that ivr_menu can't work
Comment #2
tamerzg commentedAfter further talking with Plivo support, it seems we should use "none" value for finishOnKey when it should be empty.