Filter

Since 10.0.0 AMI Actions Found this useful? Upvote it. ×

Dynamically add filters for the current manager session.

Last reviewed 2026-04-14

Filter
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 command requires the system permission because this command can be used to create filters that may bypass filters defined in manager.conf

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.
    • 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(<event_name>) and/or header(<header_name>) parameters above.
      • 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.

User Notes

No notes yet. Be the first to contribute a tip or example.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.
AMI Actions
Command AGI AOCMessage AbsoluteTimeout AgentLogoff Agents Atxfer BlindTransfer Bridge BridgeDestroy BridgeInfo BridgeKick BridgeList BridgeTechnologyList BridgeTechnologySuspend BridgeTechnologyUnsuspend CancelAtxfer Challenge ChangeMonitor ConfbridgeKick ConfbridgeList ConfbridgeListRooms ConfbridgeLock ConfbridgeMute ConfbridgeSetSingleVideoSrc ConfbridgeStartRecord ConfbridgeStopRecord ConfbridgeUnlock ConfbridgeUnmute ControlPlayback CoreSettings CoreShowChannelMap CoreShowChannels CoreStatus CreateConfig DAHDIDNDoff DAHDIDNDon DAHDIDialOffhook DAHDIHangup DAHDIRestart DAHDIShowChannels DAHDIShowStatus DAHDITransfer DBDel DBDelTree DBGet DBGetTree DBPut DeviceStateList DialplanExtensionAdd DialplanExtensionRemove Events ExtensionState ExtensionStateList FAXSession FAXSessions FAXStats Filter GetConfig GetConfigJSON Getvar Hangup IAXnetstats IAXpeerlist IAXpeers IAXregistry JabberSend ListCategories ListCommands LocalOptimizeAway LoggerRotate Login Logoff MWIDelete MWIGet MWIUpdate MailboxCount MailboxStatus MeetmeList MeetmeListRooms MeetmeMute MeetmeUnmute MessageSend MixMonitor MixMonitorMute ModuleCheck ModuleLoad Monitor MuteAudio Originate PJSIPHangup PJSIPNotify PJSIPQualify PJSIPRegister PJSIPShowAors PJSIPShowAuths PJSIPShowContacts PJSIPShowEndpoint PJSIPShowEndpoints PJSIPShowRegistrationInboundContactStatuses PJSIPShowRegistrationsInbound PJSIPShowRegistrationsOutbound PJSIPShowResourceLists PJSIPShowSubscriptionsInbound PJSIPShowSubscriptionsOutbound PJSIPUnregister PRIDebugFileSet PRIDebugFileUnset PRIDebugSet PRIShowSpans Park ParkedCalls Parkinglots PauseMonitor Ping PlayDTMF PlayMF PresenceState PresenceStateList QueueAdd QueueChangePriorityCaller QueueLog QueueMemberRingInUse QueuePause QueuePenalty QueueReload QueueRemove QueueReset QueueRule QueueStatus QueueSummary QueueWithdrawCaller Redirect Reload SIPnotify SIPpeers SIPpeerstatus SIPqualifypeer SIPshowpeer SIPshowregistry SKINNYdevices SKINNYlines SKINNYshowdevice SKINNYshowline SendFlash SendText Setvar ShowDialPlan SorceryMemoryCacheExpire SorceryMemoryCacheExpireObject SorceryMemoryCachePopulate SorceryMemoryCacheStale SorceryMemoryCacheStaleObject Status StopMixMonitor StopMonitor UnpauseMonitor UpdateConfig UserEvent VoicemailBoxSummary VoicemailForward VoicemailMove VoicemailRefresh VoicemailRemove VoicemailUserStatus VoicemailUsersList WaitEvent
AMI Actions
Command AGI AOCMessage AbsoluteTimeout AgentLogoff Agents Atxfer BlindTransfer Bridge BridgeDestroy BridgeInfo BridgeKick BridgeList BridgeTechnologyList BridgeTechnologySuspend BridgeTechnologyUnsuspend CancelAtxfer Challenge ChangeMonitor ConfbridgeKick ConfbridgeList ConfbridgeListRooms ConfbridgeLock ConfbridgeMute ConfbridgeSetSingleVideoSrc ConfbridgeStartRecord ConfbridgeStopRecord ConfbridgeUnlock ConfbridgeUnmute ControlPlayback CoreSettings CoreShowChannelMap CoreShowChannels CoreStatus CreateConfig DAHDIDNDoff DAHDIDNDon DAHDIDialOffhook DAHDIHangup DAHDIRestart DAHDIShowChannels DAHDIShowStatus DAHDITransfer DBDel DBDelTree DBGet DBGetTree DBPut DeviceStateList DialplanExtensionAdd DialplanExtensionRemove Events ExtensionState ExtensionStateList FAXSession FAXSessions FAXStats Filter GetConfig GetConfigJSON Getvar Hangup IAXnetstats IAXpeerlist IAXpeers IAXregistry JabberSend ListCategories ListCommands LocalOptimizeAway LoggerRotate Login Logoff MWIDelete MWIGet MWIUpdate MailboxCount MailboxStatus MeetmeList MeetmeListRooms MeetmeMute MeetmeUnmute MessageSend MixMonitor MixMonitorMute ModuleCheck ModuleLoad Monitor MuteAudio Originate PJSIPHangup PJSIPNotify PJSIPQualify PJSIPRegister PJSIPShowAors PJSIPShowAuths PJSIPShowContacts PJSIPShowEndpoint PJSIPShowEndpoints PJSIPShowRegistrationInboundContactStatuses PJSIPShowRegistrationsInbound PJSIPShowRegistrationsOutbound PJSIPShowResourceLists PJSIPShowSubscriptionsInbound PJSIPShowSubscriptionsOutbound PJSIPUnregister PRIDebugFileSet PRIDebugFileUnset PRIDebugSet PRIShowSpans Park ParkedCalls Parkinglots PauseMonitor Ping PlayDTMF PlayMF PresenceState PresenceStateList QueueAdd QueueChangePriorityCaller QueueLog QueueMemberRingInUse QueuePause QueuePenalty QueueReload QueueRemove QueueReset QueueRule QueueStatus QueueSummary QueueWithdrawCaller Redirect Reload SIPnotify SIPpeers SIPpeerstatus SIPqualifypeer SIPshowpeer SIPshowregistry SKINNYdevices SKINNYlines SKINNYshowdevice SKINNYshowline SendFlash SendText Setvar ShowDialPlan SorceryMemoryCacheExpire SorceryMemoryCacheExpireObject SorceryMemoryCachePopulate SorceryMemoryCacheStale SorceryMemoryCacheStaleObject Status StopMixMonitor StopMonitor UnpauseMonitor UpdateConfig UserEvent VoicemailBoxSummary VoicemailForward VoicemailMove VoicemailRefresh VoicemailRemove VoicemailUserStatus VoicemailUsersList WaitEvent