I would like to log all INVITE requests sent by users with wrong authentication details
The problem is that I only need really failed auth INVITE attempts (with wrong username/password), not all requests sent with no credentials (before challenged by OpenSIPS).
Following script logs also requests with no credentials, it would be great if someone will help me to correct it:
if (!check_source_address("0")) {
if (!proxy_authorize("", "subscriber")) {
xlog("L_ERROR","Auth error for $fU@$fd from $si cause -1 INVITE\n");
proxy_challenge("", "0");
exit;
}
if (!db_check_from()) {
sl_send_reply("403","Forbidden, use FROM=ID");
exit;
}
consume_credentials();
# caller authenticated
}
elp and this is the working one.