Issue title: Should `name=` be `actname` in `[asterisk]` jail?
 Issue body: ### Environment:
- Fail2Ban version (including any possible distribution suffixes): 0.10.5 (release 2.fc31)
- OS, including release name/version: Fedora release 31
- [x] Fail2Ban installed via OS/distribution mechanisms
- [x] You have not applied any additional foreign patches to the codebase
- [x] Some customizations were done to the configuration (provide details below is so)

### The issue:

Error `Action firewallcmd-ipset already exists` in startup when `asterisk` jail enabled.

#### Steps to reproduce

Minimal F31 install, `dnf install fail2ban`, create `/etc/fail2ban/jail.d/local.conf` as below, `systemctl start fail2ban`

```
[asterisk]
  enabled = true
``` 

#### Expected behavior

No errors.

#### Observed behavior

Following error in `/var/log/fail2ban.log`.
```
2020-04-08 17:33:21,593 fail2ban                [7520]: ERROR   NOK: ('Action firewallcmd-ipset already exists',)
```

#### Any additional information

Problem appears to be due to the stock `jail.conf`'s `[asterisk]` section.

```
action   = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(action)s-tcp]
           %(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
           %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s"]
```

I believe the `[name=` portions should be changed to `[actname=`.  I notice other `action` entries using `name=` that may need to change as well.

### Configuration, dump and another helpful excerpts

na

#### Any customizations done to /etc/fail2ban/ configuration
_(see above)_

#### Relevant parts of /var/log/fail2ban.log file:
```
2020-04-08 17:33:21,593 fail2ban.transmitter    [7520]: WARNING Command ['server-stream', [['set', 'syslogsocket', 'auto'], ['set', 'loglevel', 'INFO'], ['set', 'logtarget', '/var/log/fail2ban.log'], ['set', 'dbfile', '/var/lib/fail2ban/fail2ban.sqlite3'], ['set', 'dbmaxmatches', 10], ['set', 'dbpurgeage', '1d'], ['add', 'asterisk', 'auto'], ['set', 'asterisk', 'usedns', 'warn'], ['set', 'asterisk', 'prefregex', '^(?:\\[\\])?\\s*(?:<[^.]+\\.[^.]+>\\s+)?(?:\\S+\\s+)?(?:kernel:\\s?\\[ *\\d+\\.\\d+\\]:?\\s+)?(?:@vserver_\\S+\\s+)?(?:(?:(?:\\[\\d+\\])?:\\s+[\\[\\(]?\\S*(?:\\(\\S+\\))?[\\]\\)]?:?|[\\[\\(]?\\S*(?:\\(\\S+\\))?[\\]\\)]?:?(?:\\[\\d+\\])?:?)\\s+)?(?:\\[ID \\d+ \\S+\\]\\s+)?(?:NOTICE|SECURITY|WARNING)(?:\\s*\\[\\d+\\]):?(?:\\[C-[\\da-f]*\\])?:? [^:]+:\\d*(?:(?: in)? [^:]+:)? <F-CONTENT>.+</F-CONTENT>$'], ['multi-set', 'asterisk', 'addfailregex', ["^Registration from '[^']*' failed for '<HOST>(:\\d+)?' - (?:Wrong password|Username/auth name mismatch|No matching peer found|Not a local domain|Device does not match ACL|Peer is not supposed to register|ACL error \\(permit/deny\\)|Not a local domain)$", "^Call from '[^']*' \\(<HOST>:\\d+\\) to extension '[^']*' rejected because extension not found in context", '^(?:Host )?<HOST> (?:failed (?:to authenticate\\b|MD5 authentication\\b)|tried to authenticate with nonexistent user\\b)', "^No registration for peer '[^']*' \\(from <HOST>\\)$", "^hacking attempt detected '<HOST>'$", '^SecurityEvent="(?:FailedACL|InvalidAccountID|ChallengeResponseFailed|InvalidPassword)"(?:(?:,(?!RemoteAddress=)\\w+="[^"]*")*|.*?),RemoteAddress="IPV[46]/[^/"]+/<HOST>/\\d+"(?:,(?!RemoteAddress=)\\w+="[^"]*")*$', '^"Rejecting unknown SIP connection from <HOST>(?38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5\\d+)?"$', "^Request (?:'[^']*' )?from '(?:[^']*|.*?)' failed for '<HOST>(?38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5\\d+)?'\\s\\(callid: [^\\)]*\\) - (?:No matching endpoint found|Not match Endpoint(?: Contact)? ACL|(?:Failed|Error) to authenticate)\\s*$"]], ['set', 'asterisk', 'datepattern', '{^LN-BEG}'], ['set', 'asterisk', 'addjournalmatch', '_SYSTEMD_UNIT=asterisk.service'], ['set', 'asterisk', 'maxretry', 10], ['set', 'asterisk', 'maxmatches', 10], ['set', 'asterisk', 'findtime', '10m'], ['set', 'asterisk', 'bantime', '600'], ['set', 'asterisk', 'ignorecommand', ''], ['set', 'asterisk', 'addignoreip', '(289)413-6600', '38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5', '#.#.#.0/24', 'pbx.example.com', 'sip1.eg.com', 'sip2.eg.com'], ['set', 'asterisk', 'logencoding', 'auto'], ['set', 'asterisk', 'addlogpath', '/var/log/asterisk/messages', 'head'], ['set', 'asterisk', 'addaction', 'firewallcmd-ipset'], ['multi-set', 'asterisk', 'action', 'firewallcmd-ipset', [['actionstart', 'ipset create <ipmset> hash:ip timeout <bantime><familyopt>\nfirewall-cmd --direct --add-rule <family> filter INPUT_direct 0 -p tcp -m multiport --dports 5060,5061 -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>'], ['actionstop', 'firewall-cmd --direct --remove-rule <family> filter INPUT_direct 0 -p tcp -m multiport --dports 5060,5061 -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>\nipset flush <ipmset>\nipset destroy <ipmset>'], ['actionflush', 'ipset flush <ipmset>'], ['actionban', 'ipset add <ipmset> <ip> timeout <bantime> -exist'], ['actionunban', 'ipset del <ipmset> <ip> -exist'], ['actiontype', '<multiport>'], ['name', 'asterisk-tcp'], ['port', '5060,5061'], ['protocol', 'tcp'], ['chain', '<known/chain>'], ['actname', 'firewallcmd-ipset'], ['family', 'ipv4'], ['zone', 'public'], ['service', 'ssh'], ['rejecttype', 'icmp-port-unreachable'], ['blocktype', 'REJECT --reject-with <rejecttype>'], ['rich-blocktype', "reject type='<rejecttype>'"], ['family?family=inet6', 'ipv6'], ['rejecttype?family=inet6', 'icmp6-port-unreachable'], ['bantime', '600'], ['allports', '-p <protocol>'], ['multiport', '-p <protocol> -m multiport --dports <port>'], ['ipmset', 'f2b-<name>'], ['familyopt', ''], ['ipmset?family=inet6', 'f2b-<name>6'], ['familyopt?family=inet6', '<sp>family inet6']]], ['set', 'asterisk', 'addaction', 'firewallcmd-ipset'], ['multi-set', 'asterisk', 'action', 'firewallcmd-ipset', [['actionstart', 'ipset create <ipmset> hash:ip timeout <bantime><familyopt>\nfirewall-cmd --direct --add-rule <family> filter INPUT_direct 0 -p udp -m multiport --dports 5060,5061 -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>'], ['actionstop', 'firewall-cmd --direct --remove-rule <family> filter INPUT_direct 0 -p udp -m multiport --dports 5060,5061 -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>\nipset flush <ipmset>\nipset destroy <ipmset>'], ['actionflush', 'ipset flush <ipmset>'], ['actionban', 'ipset add <ipmset> <ip> timeout <bantime> -exist'], ['actionunban', 'ipset del <ipmset> <ip> -exist'], ['actiontype', '<multiport>'], ['name', 'asterisk-udp'], ['port', '5060,5061'], ['protocol', 'udp'], ['chain', '<known/chain>'], ['actname', 'firewallcmd-ipset'], ['family', 'ipv4'], ['zone', 'public'], ['service', 'ssh'], ['rejecttype', 'icmp-port-unreachable'], ['blocktype', 'REJECT --reject-with <rejecttype>'], ['rich-blocktype', "reject type='<rejecttype>'"], ['family?family=inet6', 'ipv6'], ['rejecttype?family=inet6', 'icmp6-port-unreachable'], ['bantime', '600'], ['allports', '-p <protocol>'], ['multiport', '-p <protocol> -m multiport --dports <port>'], ['ipmset', 'f2b-<name>'], ['familyopt', ''], ['ipmset?family=inet6', 'f2b-<name>6'], ['familyopt?family=inet6', '<sp>family inet6']]], ['set', 'asterisk', 'addaction', 'sendmail-whois'], ['multi-set', 'asterisk', 'action', 'sendmail-whois', [['actionstart', 'printf %b "Subject: [Fail2Ban] asterisk: started on <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <fail2ban>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe jail asterisk has been started successfully.\\n\nRegards,\\n\nFail2Ban" | /usr/sbin/sendmail -f "fail2ban" "batesjeremiah@example.com"'], ['actionstop', 'printf %b "Subject: [Fail2Ban] asterisk: stopped on <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <fail2ban>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe jail asterisk has been stopped.\\n\nRegards,\\n\nFail2Ban" | /usr/sbin/sendmail -f "fail2ban" "batesjeremiah@example.com"'], ['actioncheck', ''], ['actionban', 'printf %b "Subject: [Fail2Ban] asterisk: banned <ip> from <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <fail2ban>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe IP <ip> has just been banned by Fail2Ban after\n<failures> attempts against asterisk.\\n\\n\nHere is more information about <ip> :\\n\n`whois <ip> || echo "missing whois program"`\\n\nRegards,\\n\nFail2Ban" | /usr/sbin/sendmail -f "fail2ban" "batesjeremiah@example.com"'], ['actionunban', ''], ['norestored', True], ['name', 'asterisk'], ['dest', 'batesjeremiah@example.com'], ['actname', 'sendmail-whois'], ['mailcmd', '/usr/sbin/sendmail -f "<sender>" "<dest>"'], ['sender', 'fail2ban'], ['sendername', 'Fail2Ban']]], ['start', 'asterisk']]] has failed. Received ValueError('Action firewallcmd-ipset already exists')
2020-04-08 17:33:21,593 fail2ban                [7520]: ERROR   NOK: ('Action firewallcmd-ipset already exists',)
```

#### Relevant lines from monitored log files in question:

na
 Comments: 
 Comment 0: > Problem appears to be due to the stock jail.conf's [asterisk] section.

Well your config deviates from the stock config of 0.10 branch (by the way this default 3 actions configuration of asterisk jail is already 7 years old):

https://github.com/fail2ban/fail2ban/blob/34d63fccfe794030bb044ee175aef8560b41f769/config/jail.conf#L718-L723

> I believe the [name= portions should be changed to [actname=. I notice other action entries using name= that may need to change as well.

Take a look attentive in our config and in yours - we have already `actname` at end of every action parameters, in your case it is modified locally, so try to apply this diff to resolve that:
```diff
-action   = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(action)s-tcp]
+action   = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp] 
            %(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp] 
```
 Comment 1: The stock config available on a current Fedora Server 31 installation with Fail2ban installed from the stock repositories generated an error when the [asterisk] jail is enabled. Are you saying that stock /etc/fail2ban/jail.conf excerpted below is correct?  

```
[asterisk]

port     = 5060,5061
action   = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
           %(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
           %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s"]
logpath  = /var/log/asterisk/messages
maxretry = 10
```

When I start Fail2ban with the stock configs and a single jail.local with "[asterisk]\nenabled=true" is get this big long error.

````
2020-04-14 15:25:21,249 fail2ban.filter         [5493]: INFO    Added logfile: '/var/log/asterisk/messages' (pos = 13599321, hash = 315d2c96ca977b243da348ce2fc87ad9cde0df0c)
2020-04-14 15:25:21,249 fail2ban.transmitter    [5493]: WARNING Command ['server-stream', [['set', 'syslogsocket', 'auto'], ['set', 'loglevel', 'INFO'], ['set', 'logtarget', '/var/log/fail2ban.log'], ['set', 'dbfile', '/var/lib/fail2ban/fail2ban.sqlite3'], ['set', 'dbmaxmatches', 10], ['set', 'dbpurgeage', '1d'], ['add', 'sshd', 'systemd'], ['set', 'sshd', 'usedns', 'warn'], ['set', 'sshd', 'prefregex', '^<F-MLFID>\\s*(?:\\S+\\s+)?(?:sshd(?:\\[\\d+\\])?:?\\s+)?(?:kernel:\\s?\\[ *\\d+\\.\\d+\\]:?\\s+)?</F-MLFID>(?:(?:error|fatal): (?:PAM: )?)?<F-CONTENT>.+</F-CONTENT>$'], ['set', 'sshd', 'maxlines', 1], ['multi-set', 'sshd', 'addfailregex', ['^[aA]uthentication (?:failure|error|failed) for <F-USER>.*</F-USER> from <HOST>( via \\S+)?(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^User not known to the underlying authentication module for <F-USER>.*</F-USER> from <HOST>(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^Failed publickey for invalid user <F-USER>(?P<cond_user>\\S+)|(?:(?! from ).)*?</F-USER> from <HOST>(?: (?:port \\d+|on \\S+)){0,2}(?: ssh\\d*)?(?(cond_user): |(?:(?:(?! from ).)*)$)', '^Failed \\b(?!publickey)\\S+ for (?P<cond_inv>invalid user )?<F-USER>(?P<cond_user>\\S+)|(?(cond_inv)(?:(?! from ).)*?|[^:]+)</F-USER> from <HOST>(?: (?:port \\d+|on \\S+)){0,2}(?: ssh\\d*)?(?(cond_user): |(?:(?:(?! from ).)*)$)', '^<F-USER>ROOT</F-USER> LOGIN REFUSED FROM <HOST>', '^[iI](?:llegal|nvalid) user <F-USER>.*?</F-USER> from <HOST>(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^User <F-USER>.+</F-USER> from <HOST> not allowed because not listed in AllowUsers(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^User <F-USER>.+</F-USER> from <HOST> not allowed because listed in DenyUsers(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^User <F-USER>.+</F-USER> from <HOST> not allowed because not in any group(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^refused connect from \\S+ \\(<HOST>\\)', '^Received <F-MLFFORGET>disconnect</F-MLFFORGET> from <HOST>(?: (?:port \\d+|on \\S+)){0,2}:\\s*3: .*: Auth fail(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^User <F-USER>.+</F-USER> from <HOST> not allowed because a group is listed in DenyGroups(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', "^User <F-USER>.+</F-USER> from <HOST> not allowed because none of user's groups are listed in AllowGroups(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$", '^<F-NOFAIL>pam_[a-z]+\\(sshd:auth\\):\\s+authentication failure;</F-NOFAIL>(?:\\s+(?:(?:logname|e?uid|tty)=\\S*)){0,4}\\s+ruser=<F-ALT_USER>\\S*</F-ALT_USER>\\s+rhost=<HOST>(?:\\s+user=<F-USER>\\S*</F-USER>)?(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^(error: )?maximum authentication attempts exceeded for <F-USER>.*</F-USER> from <HOST>(?: (?:port \\d+|on \\S+)){0,2}(?: ssh\\d*)?(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^User <F-USER>.+</F-USER> not allowed because account is locked(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*', '^<F-MLFFORGET>Disconnecting</F-MLFFORGET>(?: from)?(?: (?:invalid|authenticating)) user <F-USER>\\S+</F-USER> <HOST>(?: (?:port \\d+|on \\S+)){0,2}:\\s*Change of username or service not allowed:\\s*.*\\[preauth\\]\\s*$', '^<F-MLFFORGET>Disconnecting</F-MLFFORGET>: Too many authentication failures(?: for <F-USER>.+?</F-USER>)?(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*$', '^<F-NOFAIL>Received <F-MLFFORGET>disconnect</F-MLFFORGET></F-NOFAIL> from <HOST>(?: (?:port \\d+|on \\S+)){0,2}:\\s*11:', '^<F-NOFAIL><F-MLFFORGET>(Connection closed|Disconnected)</F-MLFFORGET></F-NOFAIL> (?:by|from)(?: (?:invalid|authenticating) user <F-USER>\\S+|.+?</F-USER>)? <HOST>(?:(?: (?:port \\d+|on \\S+|\\[preauth\\])){0,3}\\s*|\\s*)$', '^<F-MLFFORGET><F-MLFGAINED>Accepted \\w+</F-MLFGAINED></F-MLFFORGET> for <F-USER>\\S+</F-USER> from <HOST>(?:\\s|$)', '^<F-NOFAIL>Connection from</F-NOFAIL> <HOST>']], ['set', 'sshd', 'datepattern', '{^LN-BEG}'], ['set', 'sshd', 'addjournalmatch', '_SYSTEMD_UNIT=sshd.service', '+', '_COMM=sshd'], ['set', 'sshd', 'maxretry', 5], ['set', 'sshd', 'maxmatches', 5], ['set', 'sshd', 'findtime', '10m'], ['set', 'sshd', 'bantime', '600'], ['set', 'sshd', 'ignorecommand', ''], ['set', 'sshd', 'addignoreip', '(289)413-6600', '38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5', '116.69.203.115/24', 'pbx.pra-corp.com', 'atlanta1.voip.ms', 'atlanta2.voip.ms'], ['set', 'sshd', 'logencoding', 'auto'], ['set', 'sshd', 'addaction', 'firewallcmd-ipset'], ['multi-set', 'sshd', 'action', 'firewallcmd-ipset', [['actionstart', 'ipset create <ipmset> hash:ip timeout <bantime><familyopt>\nfirewall-cmd --direct --add-rule <family> filter INPUT_direct 0 -p tcp -m multiport --dports ssh -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>'], ['actionstop', 'firewall-cmd --direct --remove-rule <family> filter INPUT_direct 0 -p tcp -m multiport --dports ssh -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>\nipset flush <ipmset>\nipset destroy <ipmset>'], ['actionflush', 'ipset flush <ipmset>'], ['actionban', 'ipset add <ipmset> <ip> timeout <bantime> -exist'], ['actionunban', 'ipset del <ipmset> <ip> -exist'], ['actiontype', '<multiport>'], ['name', 'sshd'], ['bantime', '600'], ['port', 'ssh'], ['protocol', 'tcp'], ['chain', '<known/chain>'], ['actname', 'firewallcmd-ipset'], ['family', 'ipv4'], ['zone', 'public'], ['service', 'ssh'], ['rejecttype', 'icmp-port-unreachable'], ['blocktype', 'REJECT --reject-with <rejecttype>'], ['rich-blocktype', "reject type='<rejecttype>'"], ['family?family=inet6', 'ipv6'], ['rejecttype?family=inet6', 'icmp6-port-unreachable'], ['allports', '-p <protocol>'], ['multiport', '-p <protocol> -m multiport --dports <port>'], ['ipmset', 'f2b-<name>'], ['familyopt', ''], ['ipmset?family=inet6', 'f2b-<name>6'], ['familyopt?family=inet6', '<sp>family inet6']]], ['set', 'sshd', 'addaction', 'sendmail-whois-lines'], ['multi-set', 'sshd', 'action', 'sendmail-whois-lines', [['actionstart', 'printf %b "Subject: [Fail2Ban] sshd: started on <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <batesjeremiah@example.com>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe jail sshd has been started successfully.\\n\nRegards,\\n\nFail2Ban" | /usr/sbin/sendmail -f "batesjeremiah@example.com" "batesjeremiah@example.com"'], ['actionstop', 'printf %b "Subject: [Fail2Ban] sshd: stopped on <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <batesjeremiah@example.com>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe jail sshd has been stopped.\\n\nRegards,\\n\nFail2Ban" | /usr/sbin/sendmail -f "batesjeremiah@example.com" "batesjeremiah@example.com"'], ['actioncheck', ''], ['actionban', '( printf %b "Subject: [Fail2Ban] sshd: banned <ip> from <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <batesjeremiah@example.com>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe IP <ip> has just been banned by Fail2Ban after\n<failures> attempts against sshd.\\n\\n\nHere is more information about <ip> :\\n"\nwhois <ip> || echo "missing whois program";\nprintf %b "\\nLines containing failures of <ip> (max 1000)\\n";\nlogpath="/var/log/secure"; grep -m 1000 -wF "<ip>" $logpath | tail -n 1000;\nprintf %b "\\n\nRegards,\\n\nFail2Ban" ) | /usr/sbin/sendmail -f "batesjeremiah@example.com" "batesjeremiah@example.com"'], ['actionunban', ''], ['norestored', True], ['name', 'sshd'], ['sender', 'batesjeremiah@example.com'], ['dest', 'batesjeremiah@example.com'], ['logpath', '/var/log/secure'], ['chain', '<known/chain>'], ['actname', 'sendmail-whois-lines'], ['mailcmd', '/usr/sbin/sendmail -f "<sender>" "<dest>"'], ['sendername', 'Fail2Ban'], ['greplimit', 'tail -n <grepmax>'], ['grepmax', '1000'], ['grepopts', '-m <grepmax>']]], ['add', 'asterisk', 'auto'], ['set', 'asterisk', 'usedns', 'warn'], ['set', 'asterisk', 'prefregex', '^(?:\\[\\])?\\s*(?:<[^.]+\\.[^.]+>\\s+)?(?:\\S+\\s+)?(?:kernel:\\s?\\[ *\\d+\\.\\d+\\]:?\\s+)?(?:@vserver_\\S+\\s+)?(?:(?:(?:\\[\\d+\\])?:\\s+[\\[\\(]?\\S*(?:\\(\\S+\\))?[\\]\\)]?:?|[\\[\\(]?\\S*(?:\\(\\S+\\))?[\\]\\)]?:?(?:\\[\\d+\\])?:?)\\s+)?(?:\\[ID \\d+ \\S+\\]\\s+)?(?:NOTICE|SECURITY|WARNING)(?:\\s*\\[\\d+\\]):?(?:\\[C-[\\da-f]*\\])?:? [^:]+:\\d*(?:(?: in)? [^:]+:)? <F-CONTENT>.+</F-CONTENT>$'], ['multi-set', 'asterisk', 'addfailregex', ["^Registration from '[^']*' failed for '<HOST>(:\\d+)?' - (?:Wrong password|Username/auth name mismatch|No matching peer found|Not a local domain|Device does not match ACL|Peer is not supposed to register|ACL error \\(permit/deny\\)|Not a local domain)$", "^Call from '[^']*' \\(<HOST>:\\d+\\) to extension '[^']*' rejected because extension not found in context", '^(?:Host )?<HOST> (?:failed (?:to authenticate\\b|MD5 authentication\\b)|tried to authenticate with nonexistent user\\b)', "^No registration for peer '[^']*' \\(from <HOST>\\)$", "^hacking attempt detected '<HOST>'$", '^SecurityEvent="(?:FailedACL|InvalidAccountID|ChallengeResponseFailed|InvalidPassword)"(?:(?:,(?!RemoteAddress=)\\w+="[^"]*")*|.*?),RemoteAddress="IPV[46]/[^/"]+/<HOST>/\\d+"(?:,(?!RemoteAddress=)\\w+="[^"]*")*$', '^"Rejecting unknown SIP connection from <HOST>(?38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5\\d+)?"$', "^Request (?:'[^']*' )?from '(?:[^']*|.*?)' failed for '<HOST>(?38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5\\d+)?'\\s\\(callid: [^\\)]*\\) - (?:No matching endpoint found|Not match Endpoint(?: Contact)? ACL|(?:Failed|Error) to authenticate)\\s*$"]], ['set', 'asterisk', 'datepattern', '{^LN-BEG}'], ['set', 'asterisk', 'addjournalmatch', '_SYSTEMD_UNIT=asterisk.service'], ['set', 'asterisk', 'maxretry', 10], ['set', 'asterisk', 'maxmatches', 10], ['set', 'asterisk', 'findtime', '10m'], ['set', 'asterisk', 'bantime', '600'], ['set', 'asterisk', 'ignorecommand', ''], ['set', 'asterisk', 'addignoreip', '(289)413-6600', '38d1:d2b4:3d06:83e8:96a5:8c2:893d:aba5', '116.69.203.115/24', 'pbx.pra-corp.com', 'atlanta1.voip.ms', 'atlanta2.voip.ms'], ['set', 'asterisk', 'logencoding', 'auto'], ['set', 'asterisk', 'addlogpath', '/var/log/asterisk/messages', 'head'], ['set', 'asterisk', 'addaction', 'firewallcmd-ipset'], ['multi-set', 'asterisk', 'action', 'firewallcmd-ipset', [['actionstart', 'ipset create <ipmset> hash:ip timeout <bantime><familyopt>\nfirewall-cmd --direct --add-rule <family> filter INPUT_direct 0 -p tcp -m multiport --dports 5060,5061 -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>'], ['actionstop', 'firewall-cmd --direct --remove-rule <family> filter INPUT_direct 0 -p tcp -m multiport --dports 5060,5061 -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>\nipset flush <ipmset>\nipset destroy <ipmset>'], ['actionflush', 'ipset flush <ipmset>'], ['actionban', 'ipset add <ipmset> <ip> timeout <bantime> -exist'], ['actionunban', 'ipset del <ipmset> <ip> -exist'], ['actiontype', '<multiport>'], ['name', 'asterisk-tcp'], ['port', '5060,5061'], ['protocol', 'tcp'], ['chain', '<known/chain>'], ['actname', 'firewallcmd-ipset'], ['family', 'ipv4'], ['zone', 'public'], ['service', 'ssh'], ['rejecttype', 'icmp-port-unreachable'], ['blocktype', 'REJECT --reject-with <rejecttype>'], ['rich-blocktype', "reject type='<rejecttype>'"], ['family?family=inet6', 'ipv6'], ['rejecttype?family=inet6', 'icmp6-port-unreachable'], ['bantime', '600'], ['allports', '-p <protocol>'], ['multiport', '-p <protocol> -m multiport --dports <port>'], ['ipmset', 'f2b-<name>'], ['familyopt', ''], ['ipmset?family=inet6', 'f2b-<name>6'], ['familyopt?family=inet6', '<sp>family inet6']]], ['set', 'asterisk', 'addaction', 'firewallcmd-ipset'], ['multi-set', 'asterisk', 'action', 'firewallcmd-ipset', [['actionstart', 'ipset create <ipmset> hash:ip timeout <bantime><familyopt>\nfirewall-cmd --direct --add-rule <family> filter INPUT_direct 0 -p udp -m multiport --dports 5060,5061 -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>'], ['actionstop', 'firewall-cmd --direct --remove-rule <family> filter INPUT_direct 0 -p udp -m multiport --dports 5060,5061 -m set --match-set <ipmset> src -j REJECT --reject-with <rejecttype>\nipset flush <ipmset>\nipset destroy <ipmset>'], ['actionflush', 'ipset flush <ipmset>'], ['actionban', 'ipset add <ipmset> <ip> timeout <bantime> -exist'], ['actionunban', 'ipset del <ipmset> <ip> -exist'], ['actiontype', '<multiport>'], ['name', 'asterisk-udp'], ['port', '5060,5061'], ['protocol', 'udp'], ['chain', '<known/chain>'], ['actname', 'firewallcmd-ipset'], ['family', 'ipv4'], ['zone', 'public'], ['service', 'ssh'], ['rejecttype', 'icmp-port-unreachable'], ['blocktype', 'REJECT --reject-with <rejecttype>'], ['rich-blocktype', "reject type='<rejecttype>'"], ['family?family=inet6', 'ipv6'], ['rejecttype?family=inet6', 'icmp6-port-unreachable'], ['bantime', '600'], ['allports', '-p <protocol>'], ['multiport', '-p <protocol> -m multiport --dports <port>'], ['ipmset', 'f2b-<name>'], ['familyopt', ''], ['ipmset?family=inet6', 'f2b-<name>6'], ['familyopt?family=inet6', '<sp>family inet6']]], ['set', 'asterisk', 'addaction', 'sendmail-whois'], ['multi-set', 'asterisk', 'action', 'sendmail-whois', [['actionstart', 'printf %b "Subject: [Fail2Ban] asterisk: started on <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <fail2ban>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe jail asterisk has been started successfully.\\n\nRegards,\\n\nFail2Ban" | /usr/sbin/sendmail -f "fail2ban" "batesjeremiah@example.com"'], ['actionstop', 'printf %b "Subject: [Fail2Ban] asterisk: stopped on <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <fail2ban>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe jail asterisk has been stopped.\\n\nRegards,\\n\nFail2Ban" | /usr/sbin/sendmail -f "fail2ban" "batesjeremiah@example.com"'], ['actioncheck', ''], ['actionban', 'printf %b "Subject: [Fail2Ban] asterisk: banned <ip> from <fq-hostname>\nDate: `LC_ALL=C date +"%a, %d %h %Y %T %z"`\nFrom: Fail2Ban <fail2ban>\nTo: batesjeremiah@example.com\\n\nHi,\\n\nThe IP <ip> has just been banned by Fail2Ban after\n<failures> attempts against asterisk.\\n\\n\nHere is more information about <ip> :\\n\n`whois <ip> || echo "missing whois program"`\\n\nRegards,\\n\nFail2Ban" | /usr/sbin/sendmail -f "fail2ban" "batesjeremiah@example.com"'], ['actionunban', ''], ['norestored', True], ['name', 'asterisk'], ['dest', 'batesjeremiah@example.com'], ['actname', 'sendmail-whois'], ['mailcmd', '/usr/sbin/sendmail -f "<sender>" "<dest>"'], ['sender', 'fail2ban'], ['sendername', 'Fail2Ban']]], ['start', 'sshd'], ['start', 'asterisk']]] has failed. Received ValueError('Action firewallcmd-ipset already exists')
2020-04-14 15:25:21,250 fail2ban                [5493]: ERROR   NOK: ('Action firewallcmd-ipset already exists',)
```

 Comment 2: Removing the name=... definitions from the actions "fixes" the problem for me.
 Comment 3: >  Are you saying that stock /etc/fail2ban/jail.conf excerpted below is correct?

Yes... but in your initial issue description it was different: `actname=%(action)s-tcp` instead of `actname=%(banaction)s-tcp`. 
This is definitely not correct.

By the way, what is specified as banaction in your configs?

> Removing the name=... definitions from the actions "fixes" the problem for me.

Removing the name=... definitions could probably introduce another regression - the name may be used for chain or table names (depending on banaction used), so both actions (udp/tcp) may conflict within the internal handler (e. g. if they get created on demand).

 Comment 4: My apologies for providing incomplete details.  Unintentional.

The fail2ban-firewalld-0.10.5-2.fc31.noarch package adds `/etc/fail2ban/jail.d/00-firewalld.conf` which contains:
```
[DEFAULT]
banaction = firewallcmd-ipset[actiontype=<multiport>]
banaction_allports = firewallcmd-ipset[actiontype=<allports>]
```

I've not made any changes or overrides to that. 
 Comment 5: If the stock version of the [asterisk] jail is correct, what could be the cause of that error?
 Comment 6: > `banaction = firewallcmd-ipset[actiontype=<multiport>]`

OK, this could be a reason for the error (substitution of banaction can cause that combined parameters interpolated incorrect).
I'll check and fix that if affected.

 Comment 7: Thanks much @sebres.
 Comment 8: Confirmed: complex `banaction` parameter (containing `[...]`) bothers the `action` interpolation (so `actname` gets the same value for both actions, so does not unique anymore).
This happens because normally it should be enclosed in quotes, like:
```diff
- [..., actname=%(banaction)s-tcp, ...]
+ [..., actname="%(banaction)s-tcp", ...]
```
But because banaction could contain quotes two, better would be not to use its substitution inside the batesjeremiah@example.com.

I found better solution for that, so fixed in 06b46e92eb3fc11c29974fea1753a96edaf8ec20 (testing now).
Unless it is not released/updated one can use configuration like this in `jail.local`:
```ini
[asterisk]
action  = %(action_)s[name=%(__name__)s-tcp, actname=ban-tcp, protocol="tcp"]
          %(action_)s[name=%(__name__)s-udp, actname=ban-udp, protocol="udp"]
enabled = true
```
Also note that there are some banning multi-port actions allowing to ban all protocols (e. g. nftables etc), so if supported, one can theoretically redefine that using single action.

{'source': 'GithubIssues', 'repo_name_with_owner': 'fail2ban/fail2ban', 'issue_id': 596888684, 'repo_stars': 7879.0}