About

Read DTMF (touch-tone) digits.



Usage

 read <min> <max> <sound file> <variable name> <timeout> <terminators>

Parameters

Examples

Read and playback digits. In this example 400 is the destination number min digits 0 max 10 with # as a terminator. The timeout argument is an inter-digit timeout.

<extension name="Read Example">
  <condition field="destination_number" expression="^400$">
    <action application="answer"/>
    <action application="sleep" data="1"/>
    <action application="read" data="0 10 $${base_dir}/sounds/en/us/callie/conference/8000/conf-pin.wav res 10000 #"/>
    <action application="phrase" data="spell,${res}"/>
    <action application="hangup"/>
  </condition>
</extension>

You can also have multiple terminators just comma separate them.

<extension name="Read Example">
  <condition field="destination_number" expression="^400$">
    <action application="answer"/>
    <action application="sleep" data="1"/>
    <action application="read" data="0 10 $${base_dir}/sounds/en/us/callie/conference/8000/conf-pin.wav res 10000 #,*"/>
    <action application="phrase" data="spell,${res}"/>
    <action application="hangup"/>
  </condition>
</extension>



See Also