<div dir="ltr">i want to print user registration in  kamailio.log file  <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 9, 2016 at 10:40 PM, Shiv Patidar <span dir="ltr"><<a href="mailto:patidarshiv3@gmail.com" target="_blank">patidarshiv3@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">i did according to you then my log file print this but i want to print user registraction in kamailio.log what i do please help me<br><div><br>/usr/local/sbin/kamailio[25086]:INFO:<core>[main.c:798]:sig_usr():Signal 15 received<br>/usr/local/sbin/kamailio[15085]:INFO:<core>[main.c:798]:sig_usr():Signal 15 received<br>/usr/local/sbin/kamailio[15079]:INFO:<core>[sctp_core.c:53]:sctp_core_destroy():SCTP API not initialized<br>/usr/local/sbin/kamailio[15079]:INFO:<core>[sctp_core.c:75]:sctp_core_check_support():SCTP API not enabled-if you want to use it load sctp module<br>/usr/local/sbin/kamailio[23190]:INFO:rr[../outbound/api.h:54]:ob_load_api():failed to import bind_ob<br>/usr/local/sbin/kamailio[23190]:INFO:rr[rr-mod.c:174]:mod_init():outbound module not available<br>/usr/local/sbin/kamailio[23190]:INFO:usrloc[hslot.c:51]:ul_init_locks():locks aaray size 1024<br>/usr/local/sbin/kamailio[23190]:INFO:<core>[udp_server.c:150]:probe_max_receive_buffer():SO_RCVBUF is initially 163840<br>/usr/local/sbin/kamailio[23190]:INFO:<core>[udp_server.c:150]:probe_max_receive_buffer():SO_RCVBUF is finally 327680<br>/usr/local/sbin/kamailio[23198]:INFO:ctl[io_listener.c:210]:io_listen_loop():io_listen_loop:using epoll_1t as the io watch method (auto detected) <br></div></div><div class="HOEnZb"><div class="h5"><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>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" target="_blank">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>
</div></div></blockquote></div><br></div>