Elseif condition not being reached
Posted: Mon Jul 13, 2015 3:38 pm
I am using pre-recorded messages in my test application. That is going very well! However, the part I'm having trouble with--and it seems I've done this before and just cannot seem to get it to work here, is in the form below "SpeakToSubject", fill a field named "speakingTo" with my subject's response (voice and dtmf enabled) and then once filled, evaluate the field value in filled condition to determine where to go next...
As you can see below, I'm trying to do this step by step. If I choose 'Yes', then it works just fine. However if I choose 'No' it does not fall into the "elseif" condition--the call simply disconnects. I'm sure it's something simple that I am doing something missing/doing wrong, but I cannot figure it out.
Any help would be appreciated!
Thanks!
As you can see below, I'm trying to do this step by step. If I choose 'Yes', then it works just fine. However if I choose 'No' it does not fall into the "elseif" condition--the call simply disconnects. I'm sure it's something simple that I am doing something missing/doing wrong, but I cannot figure it out.
Any help would be appreciated!
Thanks!
Code: Select all
<form id="Welcome">
<block>
<prompt>
<audio expr="voiceUrl+'<%=gWav.ToString()%>' ">
<%=greeting.ToString()%>
</audio>
</prompt>
<prompt>
<sentence><say-as type="name"><%=IVRCall.subName.ToString()%></say-as></sentence>
</prompt>
<goto next="#SpeakToSubject" />
</block>
</form>
<form id="SpeakToSubject">
<field name="speakingTo">
<grammar src="builtin:grammar/boolean" />
<grammar src="builtin:dtmf/boolean" />
<prompt>
<audio expr="yesNoUrl">
For Yes, press 1 or Say Yes. For No, press 2 or Say No.
</audio>
</prompt>
<filled>
<if cond="speakingTo==1" >
Going on to rest of survey.
<elseif cond="speakingTo==2" />
Need to get right person.
<clear namelist="speakingTo" />
</if>
</filled>
</field>
</form>