<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    On 2/17/12 2:09 PM, Alexandr Dubovikov wrote:
    <blockquote cite="mid:4F3E5173.7010702@start4.info" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <br>
      Hi,<br>
      <br>
      If i got it also correct: <br>
      <br>
      Simpson is getting SIP messages from a raw socket in the
      sipcapture module and try to save all REGISTER messages to the
      location table through the userloc module. (user registration
      audit)<br>
    </blockquote>
    <br>
    so sipcapture is executing the request route block from the config
    even for packages received on the raw sockets. In this case it does
    not set the socket and its string representation...<br>
    <br>
    Not sure yet the best place where it should be fixed: in usrloc (to
    test for sock and sock_str) or in sipcapture, to set this fields as
    most of the other config function. The second will be safer overall,
    but might not be an usable socket for sending (if someone will
    attempt to do lookup location and relay).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <br>
    <blockquote cite="mid:4F3E5173.7010702@start4.info" type="cite"> <br>
      Wbr,<br>
      Alexandr<br>
      <br>
      17.02.2012 13:49, Daniel-Constantin Mierla wrote:
      <blockquote cite="mid:4F3E4CBE.6000703@gmail.com" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        Hello,<br>
        <br>
        On 2/17/12 1:11 PM, Alexandr Dubovikov wrote:
        <blockquote cite="mid:4F3E43E2.9000002@start4.info" type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          Hi Daniel,<br>
          <br>
          he use raw_socket in the sipcapture module and save all
          REGISTER messages to location. (something like fraud
          controling for registration). I think in this case he have to
          ignore socket listener.<br>
        </blockquote>
        <br>
        not sure I understood -- it is on the server that saves to
        homer's database? It gets the traffic over a raw socket and then
        executes the config file as usual with functions from other
        modules?<br>
        <br>
        Cheers,<br>
        Daniel<br>
        <br>
        <blockquote cite="mid:4F3E43E2.9000002@start4.info" type="cite">
          <br>
          Wbr,<br>
          Alexandr<br>
          <br>
          <br>
          <br>
          <br>
          17.02.2012 09:19, Daniel-Constantin Mierla wrote:
          <blockquote cite="mid:4F3E0DAF.8000500@gmail.com" type="cite">
            <meta content="text/html; charset=ISO-8859-1"
              http-equiv="Content-Type">
            Hello,<br>
            <br>
            looks like an invalid listen socket structure, quite
            strange... what version of kamailio do you have?<br>
            <br>
            Also, in gdb, frame 0, can you send the output of:<br>
            <br>
            p *_c<br>
            p *_c-&gt;sock<br>
            <br>
            You can replace sensitive data (like IP), if you wish.<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <br>
            On 2/16/12 10:52 PM, Simpson Chua wrote:
            <blockquote
              cite="mid:1329429136.89276.YahooMailNeo@web46003.mail.sp1.yahoo.com"
              type="cite">
              <div style="color:#000; background-color:#fff;
                font-family:verdana, helvetica,
                sans-serif;font-size:10pt">
                <div style="font-family: verdana, helvetica, sans-serif;
                  font-size: 10pt; ">Hi,</div>
                <div style="font-family: verdana, helvetica, sans-serif;
                  font-size: 10pt; "><br>
                </div>
                <div style="font-family: verdana, helvetica, sans-serif;
                  font-size: 10pt; ">Kamailio is exiting with a
                  segmentation fault when trying to do a
                  save("location"). Here is some information I gathered.</div>
                <div style="font-family: verdana, helvetica, sans-serif;
                  font-size: 10pt; "><br>
                </div>
                <div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2">Feb 16 15:30:19 ubuntu
                      /usr/local/sbin/kamailio[25721]: DEBUG:
                      &lt;core&gt; [parser/msg_parser.c:103]: found end
                      of header</font></div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2">Feb 16 15:30:19 ubuntu
                      /usr/local/sbin/kamailio[25721]: ERROR:
                      &lt;core&gt; [db.c:435]: invalid parameter value</font></div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2">Feb 16 15:30:19 ubuntu
                      /usr/local/sbin/kamailio[25721]: ERROR: usrloc
                      [udomain.c:564]: failed to use table location</font></div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2">Feb 16 15:30:19 ubuntu kernel:
                      [171540.056663] kamailio[25721]: segfault at 89 ip
                      00007fa1f9a41452 sp 00007fff971a3af0 error 4 in
                      usrloc.so[7fa1f9a37000+1f000]</font></div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2">Feb 16 15:30:19 ubuntu
                      /usr/local/sbin/kamailio[25708]: ALERT:
                      &lt;core&gt; [main.c:751]: child process 25720
                      exited by a signal 11</font></div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2">Feb 16 15:30:19 ubuntu
                      /usr/local/sbin/kamailio[25708]: ALERT:
                      &lt;core&gt; [main.c:754]: core was generated</font></div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2">Feb 16 15:30:19 ubuntu
                      /usr/local/sbin/kamailio[25708]: INFO:
                      &lt;core&gt; [main.c:766]: INFO: terminating due
                      to SIGCHLD</font></div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2"><br>
                    </font></div>
                  <div><font face="verdana, helvetica, sans-serif"
                      size="2">
                      <div>Core was generated by `kamailio -w
                        /home/core'.</div>
                      <div>Program terminated with signal 11,
                        Segmentation fault.</div>
                      <div>#0 &nbsp;db_insert_ucontact (_c=0x7f5f8f737eb0) at
                        ucontact.c:474</div>
                      <div>474 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vals[11].val.str_val
                        = _c-&gt;sock-&gt;sock_str;</div>
                      <div>(gdb) bt</div>
                      <div>#0 &nbsp;db_insert_ucontact (_c=0x7f5f8f737eb0) at
                        ucontact.c:474</div>
                      <div>#1 &nbsp;0x00007f5f916d9649 in insert_ucontact
                        (_r=&lt;optimized out&gt;,
                        _contact=&lt;optimized out&gt;,
                        _ci=&lt;optimized out&gt;, _c=0x7fff52bbeb88) at
                        urecord.c:473</div>
                      <div>#2 &nbsp;0x00007f5f914b785f in insert_contacts
                        (_m=0x7f5f93d7f458, _d=0x7f5f8f72f680,
                        _a=0x7fff52bbec00) at save.c:428</div>
                      <div>#3 &nbsp;0x00007f5f914b8d10 in add_contacts
                        (_mode=1, _a=0x7fff52bbec00, _d=0x7f5f8f72f680,
                        _m=0x7f5f93d7f458) at save.c:737</div>
                      <div>#4 &nbsp;save (_m=0x7f5f93d7f458,
                        _d=0x7f5f8f72f680, _cflags=4) at save.c:790</div>
                      <div>#5 &nbsp;0x000000000041ba87 in do_action
                        (h=0x7fff52bbf5d0, a=0x7f5f93d7f238,
                        msg=0x7f5f93d7f458) at action.c:1128</div>
                      <div>#6 &nbsp;0x000000000041abe2 in run_actions
                        (h=0x7fff52bbf5d0, a=0x7f5f93d7f238,
                        msg=0x7f5f93d7f458) at action.c:1610</div>
                      <div>#7 &nbsp;0x000000000041c05b in do_action
                        (h=0x7fff52bbf5d0, a=0x7f5f93d7fe08,
                        msg=0x7f5f93d7f458) at action.c:1107</div>
                      <div>#8 &nbsp;0x000000000041abe2 in run_actions
                        (h=0x7fff52bbf5d0, a=0x7f5f93d7fe08,
                        msg=0x7f5f93d7f458) at action.c:1610</div>
                      <div>#9 &nbsp;0x0000000000422fa2 in run_top_route
                        (a=0x7f5f93d7fe08, msg=0x7f5f93d7f458,
                        c=&lt;optimized out&gt;) at action.c:1683</div>
                      <div>#10 0x00000000004b061e in receive_msg
                        (buf=&lt;optimized out&gt;, len=&lt;optimized
                        out&gt;, rcv_info=&lt;optimized out&gt;) at
                        receive.c:207</div>
                      <div>#11 0x00007f5f91b038b0 in
                        raw_capture_rcv_loop (rsock=5, port1=5060,
                        port2=8933, ipip=0) at sipcapture.c:1518</div>
                      <div>#12 0x00007f5f91b03e1f in
                        init_rawsock_children () at sipcapture.c:572</div>
                      <div>#13 0x00007f5f91b04033 in child_init
                        (rank=&lt;optimized out&gt;) at sipcapture.c:542</div>
                      <div>#14 0x0000000000507a0f in init_mod_child
                        (m=0x7f5f93d7b2b0, rank=0) at sr_module.c:886</div>
                      <div>#15 0x0000000000507974 in init_mod_child
                        (m=0x7f5f93d7b668, rank=0) at sr_module.c:883</div>
                      <div>#16 0x0000000000507974 in init_mod_child
                        (m=0x7f5f93d7c178, rank=0) at sr_module.c:883</div>
                      <div>#17 0x0000000000507974 in init_mod_child
                        (m=0x7f5f93d7c4b0, rank=0) at sr_module.c:883</div>
                      <div>#18 0x0000000000476149 in main_loop () at
                        main.c:1661</div>
                      <div>#19 0x000000000041a940 in main
                        (argc=&lt;optimized out&gt;,
                        argv=0x7fff52bbfd68) at main.c:2475</div>
                      <div><br>
                      </div>
                      <div>Any idea why this is happening? Is there
                        something in the REGISTER message that is
                        causing this?</div>
                      <div><br>
                      </div>
                      <div>Thanks,</div>
                      <div>Simpson</div>
                    </font></div>
                </div>
              </div>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
            </blockquote>
            <br>
            <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
            <br>
            <fieldset class="mimeAttachmentHeader"></fieldset>
            <br>
            <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
          </blockquote>
          <br>
        </blockquote>
        <br>
        <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
      <br>
      <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
    </blockquote>
  </body>
</html>