[Freeswitch-users] validating dtmf digits received

Michael Jerris mike at jerris.com
Mon Oct 19 06:32:28 PDT 2009


inline is new, it won't work unless your using recent trunk.  That  
being said, read is not being run inline, so the set is actually being  
run before digits_dialed is set.  You will most likely need to use  
transfer in this situation.

Mike

On Oct 19, 2009, at 12:53 AM, Mark Campbell-Smith wrote:

> 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!
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- 
> users
> http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list