Conditions and Destination Variables

To create conditions you can use regular expressions to match the value in the variable field. The following expressions can be used:

\d      => 1 digit (0-9)
\d*     => 0 or more digits
\d+     => 1 or more digits
\d{3}   => exactly 3 digits
[0-9]   => any digit (1 digit only) 
[1-3]   => a digit between 1 and 3 (1 digit only) 
[13]    => digit is 1 or 3 (1 digit only)
[134-7] => digit is 1, 3, 4, 5, 6 or 7 (1 digit only) 

^123    => the value starts by 123
123$    => the value ends by 123


^00\d+$   => the number starts by 00 followed by 1 or more digits
^00(\d+)$ => the number starts by 00 followed by 1 or more digits, but the 1 or more digits is save in variable ${val1}

You can check at http://www.regular-expressions.info/ for a full documentation to learn more about regular expressions.

When send message a destination you can use variables that are passed to the action (check the manual for a complete list of variables), for example you can do:

${uuid} => The chat unique identifier
${val1}, ${val2}, ... => use the resulting match from the regular expression inside ()
${list\d+} => The list return variables
${list_<list_name>_\d+} => The list return variables from list name
${from} => The chat from, ex: 100@dominio
${to} => The chat to, ex: 100@dominio
${from_user} => The chat account source
${from_host} => The chat domain source
${odbc_[\w-]+} => The odbc return variables
${body} => The chat message

Example:

Expression: ^456(\d+)$ => chat to: #31#${val1}