Blockhosts and Asterisk

Has anybody created a regex that checks the Asterisk log files for failed attempts? The entries look like this:

[Jun 27 08:58:45] NOTICE[7314] chan_sip.c: Registration from '"615"' failed for '173.203.87.62' - No matching peer found

The address to block is 173.203.87.62 in this example. This address needs to be added to IPTABLES.

Asterisk regex

Does it really say NOTICE and not Asterix? Seems like multiple services might use the same thing.

Anyway, here's something that might work:

    "Asterix-NoPeer":
        r'''{LOG_PREFIX{NOTICE}} chan_sip.c: .* '{HOST_IP}' - No matching peer found$'''