diff --git a/config/filter.d/asterisk.conf b/config/filter.d/asterisk.conf index 6d493f13..21081d98 100644 --- a/config/filter.d/asterisk.conf +++ b/config/filter.d/asterisk.conf @@ -14,16 +14,16 @@ # (?:::f{4,6}:)?(?P\S+) # Values: TEXT # -failregex = NOTICE.* .*: Registration from '.*' failed for '' - Wrong password - NOTICE.* .*: Registration from '.*' failed for '' - No matching peer found - NOTICE.* .*: Registration from '.*' failed for '' - Username/auth name mismatch - NOTICE.* .*: Registration from '.*' failed for '' - Device does not match ACL - NOTICE.* .*: Registration from '.*' failed for '' - Peer is not supposed to register - NOTICE.* .*: Registration from '.*' failed for '' - ACL error (permit/deny) +failregex = NOTICE.* .*: Registration from '.*' failed for '' - Wrong password$ + NOTICE.* .*: Registration from '.*' failed for '' - No matching peer found$ + NOTICE.* .*: Registration from '.*' failed for '' - Username/auth name mismatch$ + NOTICE.* .*: Registration from '.*' failed for '' - Device does not match ACL$ + NOTICE.* .*: Registration from '.*' failed for '' - Peer is not supposed to register$ + NOTICE.* .*: Registration from '.*' failed for '' - ACL error (permit/deny)$ NOTICE.* failed to authenticate as '.*'$ - NOTICE.* .*: No registration for peer '.*' \(from \) - NOTICE.* .*: Host failed MD5 authentication for '.*' (.*) - NOTICE.* .*: Failed to authenticate user .*@.* + NOTICE.* .*: No registration for peer '.*' \(from \)$ + NOTICE.* .*: Host failed MD5 authentication for '.*' (.*)$ + NOTICE.* .*: Failed to authenticate user .*@.*$ # Option: ignoreregex # Notes.: regex to ignore. If this regex matches, the line is ignored. diff --git a/testcases/files/logs/asterisk b/testcases/files/logs/asterisk new file mode 100644 index 00000000..4715f608 --- /dev/null +++ b/testcases/files/logs/asterisk @@ -0,0 +1,11 @@ +# Sample log files for asterisk +[2012-02-13 17:21:54] NOTICE[1638] chan_sip.c: Registration from '' failed for '1.2.3.4' - Wrong password +[2012-02-13 17:18:22] NOTICE[1638] chan_sip.c: Registration from '' failed for '1.2.3.4' - No matching peer found +[2012-02-13 17:21:21] NOTICE[1638] chan_sip.c: Registration from '' failed for '1.2.3.4' - Username/auth name mismatch +[2012-02-13 17:32:01] NOTICE[1638] chan_sip.c: Registration from '' failed for '1.2.3.4' - Device does not match ACL +[2012-02-13 17:34:10] NOTICE[1638] chan_sip.c: Registration from '' failed for '1.2.3.4' - Peer is not supposed to register +[2012-02-13 17:36:23] NOTICE[1638] chan_sip.c: Registration from '' failed for '1.2.3.4' - ACL error (permit/deny) +[2012-02-13 17:53:59] NOTICE[1638] chan_iax2.c: Host 1.2.3.4 failed to authenticate as 'Fail2ban' +[2012-02-13 17:39:20] NOTICE[1638] chan_iax2.c: No registration for peer 'Fail2ban' (from 1.2.3.4) +[2012-02-13 17:44:26] NOTICE[1638] chan_iax2.c: Host 1.2.3.4 failed MD5 authentication for 'Fail2ban' (e7df7cd2ca07f4f1ab415d457a6e1c13 != 53ac4bc41ee4ec77888ed4aa50677247) +[2012-02-13 17:37:07] NOTICE[1638] chan_sip.c: Failed to authenticate user "Fail2ban" ;tag=1r698745234