Filtering a message

A filter keyword is used to compare part of a push notification to a user-defined phrase. If the two phrases are textually equivalent, then an action is initiated. For more information about preprocessing push notifications for message filtering, see Message syntax.

Filter keywords can be specified by running the MobiLink Listener with the following syntax:

dblsn ... -l "filter-keyword-name='content to filter';action='...'"

You can use the -l option multiple times to create multiple filters, but you must also specify an action for every -l instance. Actions are only initiated when all filters are satisfied.

Each of the following keywords can only appear once in a message handler:

  • content   This and the subject keyword are recommended for filtering messages. Use this keyword to filter messages based on their content. For example:
    dblsn -l "content='your content filter here';action='...'"

  • subject   This and the content keyword are recommended for filtering messages. Use this keyword to filter messages based on their subject. For example:
    dblsn -l "subject='your subject filter here';action='...'"

  • message   Use this keyword to filter messages based on their raw data. Your filter value must match the exact length of the message. This keyword is not recommended since it has a variable structure. For more information about preprocessing push notifications for message filtering, see Message syntax.

  • message_start   Use this keyword to filter messages based on part of their raw data, starting from the beginning. For more information about preprocessing push notifications for message filtering, see Message syntax.

    When you specify this keyword, the MobiLink Listener creates the $message_start and $message_end action variables.

  • sender   Use this keyword to filter messages based on their sender. This keyword is useful for tracking push notifications sent by a particular Notifier. The value is dependent on the gateway being used. For UDP gateways, it is the IP address of the host of the gateway. For SYNC gateways, it is MobiLink. For SMTP gateways, it depends on your wireless carrier. See Gateways and carriers.

 See also