I understand that source code for Asterisk 1.8.23.0-vici is available for download at http://download.vicidial.com/required-a ... ici.tar.gz.
due to this asterisk version logging issues of the attacker IP:
[2013-12-09 08:21:35] NOTICE[2226] chan_sip.c: Failed to authenticate device 200<sip:200@MY IP>;tag=23754701
[2013-12-09 08:21:35] NOTICE[2226] chan_sip.c: Failed to authenticate device 200<sip:200@MY IP>;tag=e865f2fe
[2013-12-09 08:21:36] NOTICE[2226] chan_sip.c: Failed to authenticate device 200<sip:200@MY IP>;tag=6c9d1e0e
[2013-12-09 08:21:36] NOTICE[2226] chan_sip.c: Failed to authenticate device 200<sip:200@MY IP>;tag=31c166f0
[2013-12-09 08:21:37] NOTICE[2226] chan_sip.c: Failed to authenticate device 200<sip:200@MY IP>;tag=568c5031
I attempted to recompile the chan_sip.c module with patch by hand in 4 diferent places
/* ast_log(LOG_NOTICE, "Failed to authenticate device %s\n", get_header(req, "From")); */
ast_log(LOG_NOTICE, "Failed to authenticate device %s [IP: %s]\n", get_header(req, "From"), ast_sockaddr_stringify(addr));
to log the IP of attacker so fail2ban can read it, however the following error appears:
[2013-12-08 21:02:58] WARNING[6025] loader.c: Module 'chan_sip.so' was not compiled with the same compile-time options as this version of Asterisk.
[2013-12-08 21:02:58] WARNING[6025] loader.c: Module 'chan_sip.so' will not be initialized as it may cause instability.
[2013-12-08 21:02:58] WARNING[6025] loader.c: Module 'chan_sip.so' could not be loaded.
and compiled modules are much, much bigger in size:
original module :
-rwxr-xr-x 1 root root 17298 Aug 6 20:27 /usr/lib/asterisk/modules/cdr_csv.so
newly compiled module without any changes:
-rwxr-xr-x 1 root root 214391 Dec 8 20:26 /usr/local/src/asterisk-1.8.23.0/cdr/cdr_csv.so
The installation is vicibox 32 bit