Я хочу где, пользователь нажимает на #, и элемент управления IVR возвращается в главное меню.
Но когда пользователь нажимает на #, появляется фатальная ошибка.
Я новичок в Домене IVR, пожалуйста, помогите мне.
<?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>
Полагаю, это должно сработать, то есть присвоить значение termchar "", пользователь может ввести # в качестве ввода.
<property name='termchar' value=' '></property>
Я получаю сообщение об ошибке: =
swi:SBjsi|501|SBjsi:ECMAScript engine exception|errmsg=SyntaxError: illegal character|line=1|linetxt=ivr_input == #|tokentxt=#\n