thank you for help i am new and i don't have brief knowledge so please tell me where i add this code and please explain in brief
# IP authorization and user authentication route[AUTH] { #!ifdef WITH_AUTH #!ifdef WITH_IPAUTH if((!is_method("REGISTER")) && allow_source_address()) { # source IP allowed return; } #!endif if (is_method("REGISTER") || from_uri==myself) { # authenticate requests if (!auth_check("$fd", "subscriber", "1")) { auth_challenge("$fd", "0"); exit; } # user authenticated - remove auth header if(!is_method("REGISTER|PUBLISH")) consume_credentials(); } # if caller is not local subscriber, then check if it calls # a local destination, otherwise deny, not an open relay here if (from_uri!=myself && uri!=myself) { sl_send_reply("403","Not relaying"); exit; } #!endif return; } On Mon, Mar 7, 2016 at 9:50 PM, Daniel Tryba <d.tr...@pocos.nl> wrote: > On Mon, Mar 07, 2016 at 09:13:05PM +0530, Shiv Patidar wrote: > > user registration is done successfully but in /var/log/kamailio.log is > not > > print log messages > > Kamailio doesn't log this kind of message unless you tell it to. > > Assuming you have the "default" config: > ======================================================================= > # IP authorization and user authentication > route[AUTH] { > #!ifdef WITH_AUTH > > #!ifdef WITH_IPAUTH > if((!is_method("REGISTER")) && allow_source_address()) { > # source IP allowed > return; > } > #!endif > > if (is_method("REGISTER") || from_uri==myself) > { > # authenticate requests > if (!auth_check("$fd", "subscriber", "1")) { > auth_challenge("$fd", "0"); > exit; > } > # user authenticated - remove auth header > if(!is_method("REGISTER|PUBLISH")) > consume_credentials(); > } > # if caller is not local subscriber, then check if it calls > # a local destination, otherwise deny, not an open relay here > if (from_uri!=myself && uri!=myself) { > sl_send_reply("403","Not relaying"); > exit; > } > > #!endif > return; > } > ======================================================================= > You'll need to add an xlog statement > http://kamailio.org/docs/modules/stable/modules/xlog.html#xlog.f.xlog > when auth_check is true. > > if(!auth_check...) { > } > else{ > xlog("Authenticated: $au"); > } > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users >
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users