[Freeswitch-users] validating dtmf digits received

Mark Campbell-Smith mcampbellsmith at gmail.com
Mon Oct 19 14:40:26 PDT 2009


Thanks Mike,

I have a lateish trunk and inline seems to work okay.

Does the inline statement below set variable ${code} to be used
directly or does it require transfer also?  ie is digits_dialed
available for use right after a read statement (<action
application="read" data="1 10
ivr/ivr-please_enter_pin_followed_by_pound.wav res 10000 9"/> in my
case) or is it not 'set' until after the transfer?

        <action inline="true" application="set" data="code=${digits_dialed}

Thanks!

On Tue, Oct 20, 2009 at 12:32 AM, Michael Jerris <mike at jerris.com> wrote:
> 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
>
>
> _______________________________________________
> 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