PDA

View Full Version : non xml?



Mike_eNET
04-14-2010, 09:48 AM
Hi,

I new to the scripting game, and Ive come across a problem with my XML.

I initially only had mainform (stolen out the manual im afraid) and that worked perfectly.

I added a datetime form, and now it wont upload to the PABX..

My script is below:

<vxml version="2.0">
<var name="working_hours" expr="'0'"/>
<var name="working_days" expr="'0'"/>
<form id="datetimeform">
<object name="field1" classid="datetime">
<filled>
<if cond="datetime_wday &gt; '1'">
<if cond="datetime_wday &lt; '7'">
<assign name="working_days" expr="'1'"/>
</if>
</if>
<if cond="working_days == '1'">
<if cond="datetime_hour &lt; '8'">
<elseif cond="datetime_hour &lt; '17'"/>
<assign name="working_hours" expr="'1'"/>
<else/>
</if>
</if>
<if cond="working_hours" == '1'">
<if cond="datetime_hour == '8'">
<if cond="datetime_min &lt; '25">
<assign name="working_hours" expr="'0'"/>
</if>
</if>
</if>
<if cond="working_hours =='1'">
<goto next="#mainform"/>
<else/>
<prompt>
<audio src="enet_welcome.wav"/>
<audio src="enet_outoffice.wav" />
</prompt>
</if>
<exit/>
</filled>
</object>
</form>
<form id="mainform">
<noinput count="1">
<assign name="field1" expr="'82'"/>
<goto nextitem="field2" />
</noinput>
<block>
<prompt bargein="true">
<audio src="enet_welcome.wav"/>
</prompt>
<goto nextitem="field1"/>
</block>
<field name="field1" type="digits?length=1" modal="false">
<prompt timeout="5s">
<audio src="enet_salesaccounts.wav"/>
</prompt>
<option dtmf="1" value="82"/>
<option dtmf="2" value="80"/>
<option dtmf="0" value="10"/>
<filled>
<goto nextitem="field2"/>
</filled>
</field>
<object name="field2" classid="connect">
<param name="extension" expr="field1"/>
<filled>
<prompt>
<audio src="timeover.wav"/>
</prompt>
<exit/>
</filled>
<nomatch>
<goto nextitem="field1"/>
</nomatch>
</object>
</form>
</vxml>

Any ideas?

Mike_eNET
04-15-2010, 03:47 AM
To Clarify my objective:

every call will get checked for Date and Time (Only open Mon - Fri 8:30am - 5pm)

Once checked, call gets sent to second form (Mainform) which will ask for dept, etc.

Mainform worked by itself, however when I added the Dateform the PABX give me the 'invalid XML' error.

KSComs
04-15-2010, 04:32 AM
<if cond="working_hours" == '1'">

Highlighted in red might be the culprit ... My xml writer/editor tells me that is the problem...


Regards

Kevin

Mike_eNET
04-15-2010, 05:04 AM
ah! thanks it was my comments. Sorted it out!