Skip to content

Filter

Synopsis

Dynamically add filters for the current manager session.

Description

See the manager.conf.sample file in the configs/samples directory of the Asterisk source tree for a full description and examples.

Note

The filters added are only used for the current session. Once the connection is closed the filters are removed.

Note

This comand requires the system permission because this command can be used to create filters that may bypass filters defined in manager.conf

Syntax

    Action: Filter
    ActionID: <value>
    Operation: <value>
    MatchCriteria: <value>
    Filter: <value>
Arguments
  • ActionID - ActionID for this transaction. Will be returned.

  • Operation

    • Add - Add a filter.
  • MatchCriteria - Advanced match criteria. If not specified, the 'Filter' parameter is assumed to be a regular expression and will be matched against the entire event payload.
    Syntax: [name()][,header()][,]
    One of each of the following may be specified separated by commas.

    • action(include|exclude) - Instead of prefixing the Filter with '!' to exclude matching events, specify 'action(exclude)'. Although the default is 'include' if 'action' isn't specified, adding 'action(include)' will help with readability.

    • name(<event_name>) - Only events with name event_name will be included.

    • header(<header_name>) - Only events containing a header with a name of header_name will be included and the 'Filter' parameter (if supplied) will only be matched against the value of the header.

    • <match_method> - Specifies how the 'Filter' parameter is to be applied to the results of applying any 'name()' and/or 'header()' parameters above.
      One of the following:

      • regex - The 'Filter' parameter contains a regular expression which will be matched against the result. (default)

      • exact - The 'Filter' parameter contains a string which must exactly match the entire result.

      • startsWith - The 'Filter' parameter contains a string which must match the beginning of the result.

      • endsWith - The 'Filter' parameter contains a string which must match the end of the result.

      • contains - The 'Filter' parameter contains a string which will be searched for in the result.

      • none - The 'Filter' parameter is ignored.

  • Filter - The match expression to be applied to the event.
    See the manager.conf.sample file in the configs/samples directory of the Asterisk source tree for more information.

Generated Version

This documentation was generated from Asterisk branch 21 using version GIT