Decrement and Test Counter Action

Last Updated : Dec 10, 2020 |

Decrease the values of a $COUNTER variable by 1 and then test whether its new value matches a target value.

The voicemail server provides counter variable $COUNTER1 to $COUNTER15. These can be used in the same way as other call variables. They can also be manipulated using Generic action commands for Set Counter , Clear Counter , Counter Decrement and Counter Increment.

They can also be used with the Decrement and Test Counter and Increment and Test Counter actions. By default the initial value of a counter variable is 0. The formats $COUNTERx or $COUNTER[x] are both supported.

Procedure

  1. Click the Condition Actions icon.
  2. Click on the callflow where you want the action placed.
  3. Connect the new action to the required result of a preceding action.
  4. Select Decrement and Test Counter.
  5. Double-click on the action to display its settings tabs.
  6. The General, Entry Prompts, Reporting and Results tabs are standard tabs available to all actions. See The Start Action and Action Settings Tabs.
  7. Select the Specific tab. Set the options as required.

    Setting

    Description

    Select counter

    Select the $COUNTER variable to increment and then test. $COUNTER1 to $COUNTER15 can be selected by entering 1 to 15 respectively.

    Value to test counter against

    This can be a number or another call variable . When the counter matches the value the True result connection is used, otherwise the False result connection is used.

  8. Click OK.
  9. Connect the action's results to following actions as required.

Result

This action has the following results which can be connected to further actions:

  • True: This result connection is used if the counter value matches the test value.

  • False: This result connection is used if the counter value does not match the test value.