How to disable VXML to "catch event" (nomatch) for specific DTML - dtmf

The VXML menu has the options 1, 2, 3, 9, and '#'. The customers will assume that if they press 0, it would take them to the transfer to service center.
But 0 in this menu won't take them to service center, the requirement is to ignore 0 DTMF and keep playing the prompt without warning them.
This menu's bargien property has to be true. I am required to make the prompt menu where users are able to press any mentioning DTMF above to interrupt it and goto next, but I have to set the program to ignore DTMF 0.

Please try this code.
Key point is "bargeintype" property and grammar rule.
VXML's form
<form id="sample">
<field name="menu_result">
<property name="bargein" value="true" />
<property name="bargeintype" value="hotword" /><!-- Important! -->
<property name="inputmodes" value="dtmf" />
<property name="timeout" value="5s" />
<property name="interdigittimeout" value="0s" />
<property name="termchar" value="D" />
<prompt>
Please push either of 1, 2, 3, 9 or pound sign button.
Other button is ignored.
</prompt>
<grammar src="special_menu.grxml" />
<filled>
<assign name="result" expr="menu_result.slice(-1)"/><!-- Get last 1 digit -->
<goto next="#next_form"/>
</filled>
<noinput><prompt>No input error.</prompt></noinput>
<nomatch><prompt>No match error.</prompt></nomatch>
</field>
</form>
special_menu.grxml
<?xml version="1.0" encoding="UTF-8"?>
<grammar
version="1.0"
mode="dtmf"
root="main"
xmlns="http://www.w3.org/2001/06/grammar"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rule id="main">
<item repeat="0-">
<one-of><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>*</item></one-of>
</item>
<one-of>
<item>1</item><item>2</item><item>3</item><item>9</item><item>#</item>
</one-of>
</rule>
</grammar>

Related

Can we remove image preview from ui fileuploader?

Is it possible to remove image preview from UI fileuploder component, without using file component?
here is my code=>
<field name="file">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">string</item>
<item name="source" xsi:type="string">TestGroup</item>
<item name="label" xsi:type="string" translate="true">File</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">fileUploader</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
<item name="previewTmpl" xsi:type="string">Vendor_Module/image-preview</item>
<item name="required" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="number">40</item>
<item name="uploaderConfig" xsi:type="array">
<item name="url" xsi:type="url" path="controller/index/upload"/>
</item>
</argument>
</field>
tried by removing item name= elementTmpl and previewTmpl but not working
can anybody help me to disable the image preview for fileupload.
Thanks in Advance.
Remove the src of image every time you click:
$("#input1").click(function () {
$('#imagepreview1').attr('src','');
});

Why am I receiving an uncaught type error from my KendoUI taghelper grid in my ASP.NET Core application?

I have a tag helper KendoUI grid, the grid is filterable but when I added the filter properties I get an error message back of:
Uncaught TypeError: t is undefined kendo.all.js:96768:38
If I remove the line of code that sets the grid as filterable it works but there is no filtering capability.
<filterable enabled="true" mode="row" />
Looking at this closely, removing the property of mode=¬row" causes the error to go away however, as above there are no filter capabilities.
Here is the complete code for my grid as it stands:
<kendo-grid name="addVesselPositionGrid" deferred="false">
<datasource type="DataSourceTagHelperType.Ajax" page-size="10">
<transport>
<read url="/Core/ReadVessels" />
</transport>
<schema>
<model id="Id">
<fields>
<field name="Id" editable="false"></field>
<field name="Name" type="Name" />
<field name="IMO" type="IMO" />
</fields>
</model>
</schema>
</datasource>
<sortable enabled="true" />
<pageable enabled="true" />
<filterable enabled="true" mode="row" />
<columns>
<column field="Id" title="Id" hidden="true"></column>
<column field="Name" title="Name">
<filterable multi="true">
<cell operator="Contains" suggestion-operator="Contains"></cell>
</filterable>
</column>
<column field="IMO" title="IMO"></column>
</columns>
</kendo-grid>
I've searched the documentation but I can't find any information on this, looking at my code it seems to be accurate. Any ideas?

UserInputPanel Radio Button ignoring conditionid value izpack

I'm running the installer in debug mode and I want to hide a radio button based on a condition.
The value of the conditions are correct but my panel is ignoring the conditions and showing all of the radio buttons.
<condition type="variable" id="gains.show.radio.custom.passwords">
<name>show.radio.custom.passwords</name>
<value>true</value>
</condition>
<condition type="variable" id="gains.show.radio.default.passwords">
<name>show.radio.default.passwords</name>
<value>true</value>
</condition>
<!-- Variables to control which radio buttons are shown for password options-->
<variable name="show.radio.custom.passwords" value="false" />
<variable name="show.radio.default.passwords" value="true" />
<panel order="15">
<field size="2" txt="Password Options" type="title" />
<field align="top" type="divider" />
<field type="radio" variable="gains.radio.password.selection">
<description align="left" txt="Choose password option:" />
<spec>
<choice txt="Use Gains preset default users passwords" value="default passwords selected" conditionid="gains.show.radio.default.passwords"/>
<choice txt="Use custom set passwords" value="use custom passwords" set="true" conditionid="gains.show.radio.custom.passwords" />
<choice txt="Reset Gains default users passwords" value="reset passwords selected"/>
</spec>
</field>
<field align="bottom" type="divider" />
</panel>

VXML dtmf grammar with unknown number of digits and specific terminating character

I am new to VXML and trying to construct an inline dtmf grammar that will allow any sequence of digits between 1 and 5 terminated with digit 6 be returned.
So all three of the following sequences should result in a fill:
1123236, 236, 55555555552342346
I've tried implementing the grammar like so:
<grammar mode="dtmf">
<rule>
<item>
<item repeat"0-">1|2|3|4|5<item>6</item>
</item>
</rule>
</grammar>
and also like so:
<grammar mode="dtmf">
<rule>
<item repeat"0-">1|2|3|4|5</item>
<item>6</item>
</rule>
</grammar>
I am out of ideas and would greatly appreciate your help
Here is a grammar you may use:
<grammar mode="dtmf" version="1.0" root="oneToFiveSequence">
<rule id="onetofive">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</one-of>
</rule>
<rule id="oneToFiveSequence" scope="public" >
<one-of>
<item repeat="0-">
<ruleref uri="#onetofive"/>
</item>
</one-of>
</rule>
</grammar>
To stop recognition with digit "6" set a property in your VXML form:
<property name="termchar" value="6" />
In the form while processing "filled" event you will know that the sequence was terminated with "6" so you may append it to data if it needs be.
An equivalent single rule grammar as requested in comments
<grammar mode="dtmf" version="1.0" root="oneToFiveSequence">
<rule id="oneToFiveSequence" scope="public" >
<one-of>
<item repeat="0-">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</one-of>
</item>
</one-of>
</rule>
</grammar>
Both variants are tested with Holly Connects Voice Platform
Here is an app you may use for quick testing.
<?xml version="1.0" encoding="utf-8"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<property name="inputmodes" value="dtmf"/>
<form id="welcome">
<field name="option">
<property name="termchar" value="6"/>
<grammar mode="dtmf" version="1.0" root="oneToFiveSequence">
<rule id="oneToFiveSequence" scope="public" >
<one-of>
<item repeat="0-">
<one-of>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</one-of>
</item>
</one-of>
</rule>
</grammar>
<prompt>Enter digits</prompt>
<filled>
<log> You entered <value expr="option"/></log>
</filled>
</field>
</form>
</vxml>

Fatal Error Ocurrs when Subscriber Clicks #

I want the where, user clicks on the # and the IVR control goes back to main menu.
But when user clicks on # it say fatal error occurred.
I am newbie in IVR Domain please help me out.
<?xml version='1.0' encoding='iso-8859-1' ?>
<vxml application='http://intx.dev.spokn.com/airtelintx/global.vxml' version='2.0'>
<log expr='[vxml_root_page] This log is after property element' />
<property name='termchar' value=' '></property>
<property name='inputmodes' value='dtmf'></property>
<log expr='[vxml_root_page] This log is after property element' />
<form id='main_menu'>
<var expr='0' name='errorcount' />
<var expr='3' name='maxerrors' />
<field name='ivr_input'>
<grammar mode='dtmf' root='main_choices' type='application/srgs+xml' version='1.0' xml:lang='en-US' xmlns='http://www.w3.org/2001/06/grammar'>
<rule id='main_choices'>
<one-of>
<item>
1
</item>
<item>
2
</item>
<item>
3
</item>
<item>
#
</item>
</one-of>
</rule>
</grammar>
<prompt>
Choose which country you would like to go.
For USA, press 1.
For UK, press 2.
For Canada, press 3.
Press # to return to the main menu.
</prompt>
<nomatch>
<if cond='errorcount == maxerrors'>
<goto next='#exit' />
<else />
<assign expr='errorcount + 1' name='errorcount' />
Oops that was an invalid input
<reprompt />
</if>
</nomatch>
<noinput>
<if cond='errorcount == maxerrors'>
<goto next='#exit' />
<else />
<assign expr='errorcount + 1' name='errorcount' />
No input detected. Please try again.
<reprompt />
</if>
</noinput>
<filled>
<if cond='ivr_input == 1'>
<log expr="'[vxml_reply] ivr_input choice 1, record'" />
<log expr="'[vxml_reply] ivr_input choice 1, record'" />
<log expr="'[vxml_reply] The calling Number callerid'">
<value expr='callerid'></value>
</log>
<submit expr="application.apphost + application.appuri + '/ivr/confirm_country.vxml'" namelist='ivr_input callerid' />
</if>
<if cond='ivr_input == 2'>
<log expr="'[vxml_reply] ivr_input choice 2, record'" />
<log expr="'[vxml_reply] ivr_input choice 2, record'" />
<log expr="'[vxml_reply] The calling Number callerid'">
<value expr='callerid'></value>
</log>
<submit expr="application.apphost + application.appuri + '/ivr/confirm_country.vxml'" namelist='ivr_input callerid' />
</if>
<if cond='ivr_input == 3'>
<log expr="'[vxml_reply] ivr_input choice 3, record'" />
<log expr="'[vxml_reply] ivr_input choice 3, record'" />
<log expr="'[vxml_reply] The calling Number callerid'">
<value expr='callerid'></value>
</log>
<submit expr="application.apphost + application.appuri + '/ivr/confirm_country.vxml'" namelist='ivr_input callerid' />
</if>
<if cond='ivr_input == #'>
<log expr="'[vxml_reply] ivr_input choice #, record'" />
<log expr="'[vxml_reply] ivr_input choice #, record'" />
<log expr="'[vxml_reply] The calling Number callerid'">
<value expr='callerid'></value>
</log>
<submit expr="application.apphost + application.appuri + '/ivr/main_menu.vxml'" namelist='ivr_input callerid' />
</if>
</filled>
</field>
</form>
<error>
<log>
APP ERROR!!!
<value expr='_event' />
</log>
A fatal error occurred. Please contact a customer service representative.
<disconnect />
</error>
<catch event=''>
<log>
UNHANDLED EVENT!!!
<value expr='_event' />
</log>
Sorry, there was a problem processing your request. Please try again later.
<disconnect />
</catch>
</vxml>
I guess this should do the work i.e. assigning termchar value " ", the user can enter # as input.
<property name='termchar' value=' '></property>
I get flowing Error :=
swi:SBjsi|501|SBjsi:ECMAScript engine exception|errmsg=SyntaxError: illegal character|line=1|linetxt=ivr_input == #|tokentxt=#\n
On most platforms the "#" key is a termination character. This can be changed by setting the property "termchar" in you application. If you want to see if the user pressed a "termchar" you can use the shadow variable "termchar" to see what they pressed. For more details on this property and shadow variable you can reference the VoiceXML Specification.
The if condition inside tag should be
<if cond='ivr_input == '#''>
And it works fine. yeah!!!