Misc. Dialplan Tools read

From FreeSWITCH Wiki

Jump to: navigation, search

Read

read,Read Digits,<min> <max> <file> <var name> <timeout> <terminators>

Example: 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 seperate 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>

read

Read DTMF

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

  • min = Minimum number of digits to fetch
  • max = Maximum number of digits to fetch
  • sound file = Sound file to play before digits are fetched
  • variable name = Channel variable that digits should be placed in.
  • timeout = Number of milliseconds to wait on each digit
  • terminators = digits used to end input if less than <min> digits have been pressed. (Typically '#')
Personal tools
Community