I want to allow a caller to press 0 at a boolean field, but I don't see a way to distinguish between pressing 0 and saying "no" because the output from the built-in boolean grammar includes zero.
I'd rather not re-implement a version of the boolean grammar myself to work around this problem. Is there a way I might accept a dtmf "0" at a boolean prompt but still distinguish between pressing "0" vs saying "no"?
The data we get back is either “1” or “0": pressing 1 or saying yes returns a “1”, pressing 2 or saying no returns a “0"
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
DTMF 0 question
Re: DTMF 0 question
Hi,
It is possible to rewrite the value that is returned whenever you're working with an explicit grammar item. Here's a basic example where pressing 0 will return the string "skip".
The boolean responses are still the expected values. The value returned within the SWI_literal can be anything you'd like.
Regards,
Plum Support
It is possible to rewrite the value that is returned whenever you're working with an explicit grammar item. Here's a basic example where pressing 0 will return the string "skip".
Code: Select all
<field name="confirm" type="boolean">
<grammar type="application/srgs+xml" root="ZERO" mode="dtmf">
<rule id="ZERO">
<one-of>
<item> 0 <tag> SWI_literal='skip' </tag></item>
</one-of>
</rule>
</grammar>
<prompt> Press 1 or say yes. Press 2 or say no. Press 0 to skip. </prompt>
<filled>
<log> <value expr="confirm"/> </log>
</filled>
</field>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com