[Freeswitch-users] validating dtmf digits received

Mark Campbell-Smith mcampbellsmith at gmail.com
Sun Oct 18 21:53:02 PDT 2009


Hi!

I simply want to validate the dtmf digits I read from a user.    From
the wiki, it appears I need to use inline="true" when setting the
variable so it can be used directly within the same extension.

What have I done wrong below?   I have tried many different
alternatives, but the second condition field, which is meant to match
the dtmf digits received (in this case 0000) is never matched, and the
anti-action is called instead.

:
      <some code here>
      <action application="read" data="1 10
ivr/ivr-please_enter_pin_followed_by_pound.wav res 10000 9"/>
       <action application="phrase" data="spell,${res}"/>
       <action inline="true" application="set" data="code=${digits_dialed}"/>
       <!-- <action inline="true" application="set" data="code=${res}"/> -->
  </condition>
  <condition field="digits_dialed" expression="^0000$">
  <!-- <condition field="${code}" expression="^0000$"> -->
  <!-- <condition field="${res}" expression="^0000$"> -->
        <some code here>
       <anti-action application="hangup"/>

Thanks!




More information about the FreeSWITCH-users mailing list