The behavior I would like to see here is to allow the caller to skip the greeting if they press a digit. I would also like to allow tone tone termination after the caller leaves a recording. I have tired to use the <property> tag to set bargein to false in the <record> tag, however this is setting this behavior accross the entire vxml document. I had thought that the <property> tag was supposeed to follow the same rules as variable scoping.
Here is the code I am using:
Code: Select all
<!--
#########################################################################
#
# PlayGreeting:
#
#########################################################################
-->
<form id="PlayGreeting">
<block>
<audio expr="app_audio_path + 'storage_link/' + app_basePath + 'data/greeting.' + app_greetingType + '.wav'" >
The user you are attempting to contact is not available at this time, please leave your name and number after the tone.
</audio>
<if cond="app_msgOnly == 1">
<disconnect/>
<else/>
<goto next="#RecordMessage"/>
</if>
</block>
</form>
<!--
## #####################################################################
##
## RecordMessage: Record the callers information.
##
## ######################################################################
-->
<form id="RecordMessage">
<property name="bargein" value="false"/>
<catch event="connection.disconnect.hangup">
<assign name="doc_timer" expr="callerrecording$.duration"/>
<assign name="app_callerRecording" expr="callerrecording"/>
<log>
Disconnect during record phase.
</log>
<goto next="#InsertMessage"/>
</catch>
<record name="callerrecording" beep="true" type="audio/basic" finalsilence="5s" >
<property name="bargein" value="false"/>
<audio expr="app_audio_path+'record.Silence.wav'">
After the beep, please record your message.
</audio>
<filled>
<assign name="doc_timer" expr="callerrecording$.duration"/>
<assign name="app_callerRecording" expr="callerrecording"/>
<goto next="#PostRecordMenu"/>
</filled>
</record>
</form>