[Freeswitch-users] Confusing SIP auth failure logging message?

Simon J Mudd sjmudd at pobox.com
Mon Feb 7 02:22:36 MSK 2011


I've been looking at trying to configure tighter controls for extensions that register.
Doing so made me trigger this error message (adjusted slightly):

2011-02-07 00:07:51.343303 [WARNING] sofia_reg.c:1247 SIP auth challenge (REGISTER) on sofia profile 'internal' for [1000 at sip.example.com] from ip 192.168.4.99
2011-02-07 00:07:51.343303 [WARNING] sofia_reg.c:1247 SIP auth challenge (REGISTER) on sofia profile 'internal' for [1000 at sip.example.com] from ip 192.168.4.99

Looking at the message it is not clear if the SIP authentication has succeeded or failed.
Judging by the code it seems this is meant to represent a SIP auth failure. If so should
the code not be patched as shown?

diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c
index 631cbdb..e42c777 100644
--- a/src/mod/endpoints/mod_sofia/sofia_reg.c
+++ b/src/mod/endpoints/mod_sofia/sofia_reg.c
@@ -1244,7 +1244,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                }
                /* Log line added to support Fail2Ban */
                if (sofia_test_pflag(profile, PFLAG_LOG_AUTH_FAIL)) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "SIP auth challenge (%s) on sofia profile '%s' "
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "SIP auth failure (%s) on sofia profile '%s' "
                                                          "for [%s@%s] from ip %s\n", (regtype == REG_INVITE) ? "INVITE" : "REGISTER", 
                                                          profile->name, to_user, to_host, network_ip);
                }

Thanks,

Simon



More information about the FreeSWITCH-users mailing list