While

While

The While step allows you to create a loop in your dial plan. All steps between a 'While' and 'End While' will run repeatedly whilst ALL of the comparisons evaluate to true.

WARNING: be careful with a While loop particularly if the remote end is a voicemail box as the While loop could run indefinitely holding the call open indefinitely. 

Comparisons

The While step allows you to define one or more comparisons. All of the comparisons MUST be true for the while loop to continue (or start).

You can specify a different comparison operator for each comparison.

The operators are: 

  • Disabled: the comparison is ignored. You MUST have a least one comparison that is enabled.
  • Equals (alpha) - compares two strings (literals or variables)
  • Equals(num) - compares to numbers.
  • Not Equals - compares two strings or numbers and returns True if they are not the same.
  • Greater Than - compares to numbers and returns True if the left hand value is greater than the right hand value.
  • Greater than Or Equal To - compares to numbers and returns True if the left hand value is greater than or equal to the right hand value.
  • Less Than - compares to numbers and returns True if the left hand value is leass than the right hand value.
  • Less than or Equal To - compares to numbers and returns True if the left hand value is less than or equal the right hand value.
  • Contains - returns True if the left hand string contains the right hand string.
  • Starts With - returns True if the Left Hand string starts with the contents of the right hand string.
  • Ends With - returns True if the Left Hand string ends with the contents of the right hand string.