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