Message Filter Settings

All the filter options that you add and configure must match (be true) for the associated policy event(s) to be evaluated.

Setting Description
Remote Phone Number

Enter one regular expression that defines a pattern for one or more phone numbers.

Do not enter the leading and trailing / (slash) characters.

Start the regular expression with the ^ (caret) character and end it with the $ (dollar sign) character.

Examples

Match only U.S. numbers with a 900 or 976 area code: ^(+?1)?(900|976)[0-9]{7}$ 

  • (+?1)? allows for the possibility of 1 or +1, the U.S. country code.
  • (900|976) requires matching either 900 or 976.
  • [0-9]{7} requires matching the digits 0 through 9 exactly 7 times.
  • ^ ensures no characters come before the number.
  • $ ensures no characters come after the number.

Match exactly 6505551212, with or without the U.S. country code: ^(+?1)?(6505551212)$

Match any legal U.S. phone number: ^(+?1)?[2-9][0-9]{2}[2-9][0-9]{6}$

When a regular expression is entered, the filter criteria matches only when a messaging app attempts to send a message to or receive a message from a number that matches the regular expression.

Service Design Center checks the validity of the entered regular expression. If the regular expression is not valid, you will see an error and you will not be able to save the filter. See Regular Expression Tutorial and Examples for some basics on how to build valid regular expressions.
Direction

Select:

  • Inbound (MT): To match inbound traffic (default). MT stands for mobile terminated.
  • Outbound (MO): To match outbound traffic. MO stands for mobile originated.
SMS Body

Enter one regular expression that defines a pattern of text to match any part of the body of text message. When a regular expression is entered, the filter criteria matches only when the regular expression matches some part of the message.

Service Design Center checks the validity of the entered regular expression. If the regular expression is not valid, you will see an error and you will not be able to save the filter. See Regular Expression Tutorial and Examples for some basics on how to build valid regular expressions.