El Monday 13 August 2007 22:11:34 Edoardo Serra escribió:
Hi all, I'd like to log failed SIP REGISTER attempt either with xlog or with sip_trace() but I cannot understand where to put related code to catch the authentication error
With XLOG is easy :)
Here is the part of my opensr.cfg dedicated to REGISTER handling
if (method=="REGISTER") { if (!proxy_authorize("exorsa", "openser_view")) {
xlog("L_INFO", "REGISTER: auth required\n");
proxy_challenge("exorsa", "0"); exit; } if (!check_to()) {
xlog("L_WARN", "REGISTER: !check_to()\n");
sl_send_reply("403", "Digest username and URI username
do NOT match! Stay away!"); exit; }
xlog("L_INFO", "REGISTER: authorized\n");
save("location"); exit;
};
Regards.