<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 06/11/2014 04:17 PM, Roberto Fichera
      wrote:<br>
      <br>
      Hi Daniel,<br>
      <br>
      do you have an idea why I'm getting the issue below?<br>
      <br>
      Cheers,<br>
      Roberto Fichera.<br>
      <br>
    </div>
    <blockquote cite="mid:539864F9.5010905@tekno-soft.it" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">On 06/10/2014 12:40 PM, Roberto
        Fichera wrote:<br>
        <br>
        Hi,<br>
        <br>
      </div>
      <blockquote cite="mid:5396E09B.4010103@tekno-soft.it" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">On 06/10/2014 12:22 PM,
          Daniel-Constantin Mierla wrote:<br>
          <br>
          Hi,<br>
          <br>
        </div>
        <blockquote cite="mid:5396DC7E.2030906@gmail.com" type="cite">
          <meta content="text/html; charset=ISO-8859-1"
            http-equiv="Content-Type">
          <br>
          <div class="moz-cite-prefix">On 10/06/14 10:37, Roberto
            Fichera wrote:<br>
          </div>
          <blockquote cite="mid:5396C3AF.8080509@tekno-soft.it"
            type="cite">
            <meta content="text/html; charset=ISO-8859-1"
              http-equiv="Content-Type">
            [..]<br>
            <blockquote cite="mid:5396BFB4.9030105@gmail.com"
              type="cite"> the parse from error don't seem to be from
              parse_msg().<br>
              <br>
              Can you print the uac buffer and send it over here to see
              if it is something wrong there?<br>
            </blockquote>
            <br>
            Jun 10 09:32:29 ip-10-227-0-26.localdomain
            /usr/sbin/kamailio[29663]: DEBUG: msilo [msilo.c:1403]:
            m_tm_callback_on_delivered_event():
            t->uac[0].request.buffer: MESSAGE <a
              moz-do-not-send="true" class="moz-txt-link-abbreviated"
              href="mailto:sip:test1@test.com">sip:test1@test.com</a>
            SIP/2.0<br>
            <br>
            I've used LM_DBG()  to print it.<br>
          </blockquote>
          Can you paste here the full LM_DBG line? It prints only the
          first line. Maybe you can print also the length of the buffer
          which is a special field just to see its value.<br>
        </blockquote>
        <br>
        this is what journalctl -xfa is printing out. Likely it is
        truncating the output.<br>
      </blockquote>
      <br>
      This is what the t->uac[0].request.buffer has in the callback:<br>
      <br>
      MESSAGE <a moz-do-not-send="true"
        class="moz-txt-link-abbreviated"
        href="mailto:sip:test1@test.com">sip:test1@test.com</a> SIP/2.0<br>
      Via: SIP/2.0/UDP
      xx.xx.xx.xx:5060;branch=z9hG4bK6c43.66304147000000000000000000000000.0<br>
      To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
        href="mailto:sip:test1@test.com"><sip:test1@test.com></a><br>
      From: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
        href="mailto:sip:test2@test.com"><sip:test2@test.com></a>;tag=90a2f67ea18c2dbc1dd6d5c5f690acb0-5ca3<br>
      CSeq: 10 MESSAGE<br>
      Call-ID: <a moz-do-not-send="true"
        class="moz-txt-link-abbreviated"
        href="mailto:3f7b9fdc-4789@10.227.0.26">3f7b9fdc-4789@10.227.0.26</a><br>
      Max-Forwards: 70<br>
      Content-Length: 18<br>
      User-Agent: kamailio (4.1.3 (i386/linux))<br>
      Date: Wed, 11 Jun 2014 13:59:48 GMT<br>
      Content-Type: text/chat<br>
      DICE-Msg-Id: 332a0c12-82c5-4bac-ab3f-80626ebfa108<br>
      MSILO: true<br>
      <br>
      test message<br>
      <br>
      <br>
      while the log shown:<br>
      <br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core>
      [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [<a
        moz-do-not-send="true" class="moz-txt-link-rfc2396E"
        href="mailto:sip:test1@test.com"><sip:test1@test.com></a>]<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core>
      [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq
      <CSeq>: <10> <MESSAGE><br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:949]:
      t_reply_matching(): DEBUG: t_reply_matching: hash 59261 label 0
      branch 0<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:1004]:
      t_reply_matching(): DEBUG: t_reply_matching: reply matched
      (T=0xb2fc5bfc)!<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_lookup.c:1141]:
      t_check_msg(): DEBUG: t_check_msg: msg id=1 global id=1 T
      end=0xb2fc5bfc<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2206]:
      reply_received(): DEBUG: reply_received: org. status uas=0,
      uac[0]=0 local=2 is_invite=0)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:1304]:
      t_should_relay_response(): ->>>>>>>>>
      T_code=0, new_code=200<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2086]:
      local_reply(): DEBUG: local_reply: branch=0, save=0, winner=0<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:2123]:
      local_reply(): DEBUG: local transaction completed<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_hooks.c:288]:
      run_trans_callbacks_internal(): DBG: trans=0xb2fc5bfc, callback
      type 1024, id 0 entered<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1378]:
      m_tm_callback_on_delivered_event(): >>>>>>>
      msilo_notification_event 0xb30a4e14<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1380]:
      m_tm_callback_on_delivered_event(): completed with status 200
      [mid: 157]<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1393]:
      m_tm_callback_on_delivered_event(): message <157> was sent
      successfully<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: msilo [ms_msg_list.c:236]:
      msg_list_set_flag(): mid:157 fl:4<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core>
      [parser/msg_parser.c:623]: parse_msg(): SIP Request:<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core>
      [parser/msg_parser.c:625]: parse_msg():  method:  <MESSAGE><br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core>
      [parser/msg_parser.c:627]: parse_msg():  uri:     <a
        moz-do-not-send="true" class="moz-txt-link-rfc2396E"
        href="mailto:sip:test1@test.com"><sip:test1@test.com></a><br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core>
      [parser/msg_parser.c:629]: parse_msg():  version: <SIP/2.0><br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1412]:
      m_tm_callback_on_delivered_event(): executing
      event_route[msilo:on-delivered] (1)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: msilo [msilo.c:1419]:
      m_tm_callback_on_delivered_event():
      event_route[msilo:on-delivered] req=0xbfcbbdd0)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: ERROR: <core>
      [parser/parse_from.c:58]: parse_from_header():
      ERROR:parse_from_header: bad msg or missing FROM header<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: ERROR: pv [pv_core.c:449]:
      pv_get_from_attr(): cannot parse From header<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: INFO: <script>: MSILO event
      on-delivered <<null>> to <a moz-do-not-send="true"
        class="moz-txt-link-rfc2396E" href="mailto:sip:test1@test.com"><sip:test1@test.com></a><br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: INFO: <script>:
      AVP(MSILO)=<null><br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: INFO: <script>:
      AVP(DICE-Msg-Id)=<null><br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: tm [t_reply.c:1663]:
      cleanup_uac_timers(): DEBUG: cleanup_uac_timers: RETR/FR timers
      reset<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core> [usr_avp.c:644]:
      destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core> [usr_avp.c:644]:
      destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core> [usr_avp.c:644]:
      destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core> [usr_avp.c:644]:
      destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core> [usr_avp.c:644]:
      destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core> [usr_avp.c:644]:
      destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core> [xavp.c:448]:
      xavp_destroy_list(): destroying xavp list (nil)<br>
      Jun 11 15:06:24 ip-10-227-0-26.localdomain
      /usr/sbin/kamailio[4895]: DEBUG: <core> [receive.c:296]:
      receive_msg(): receive_msg: cleaning up<br>
      <br>
      <br>
      Cheers,<br>
      Roberto Fichera.<br>
      <br>
      <blockquote cite="mid:5396E09B.4010103@tekno-soft.it" type="cite">
        <br>
        <blockquote cite="mid:5396DC7E.2030906@gmail.com" type="cite"> <br>
          Cheers,<br>
          Daniel<br>
          <br>
          <blockquote cite="mid:5396C3AF.8080509@tekno-soft.it"
            type="cite"> <br>
            <blockquote cite="mid:5396BFB4.9030105@gmail.com"
              type="cite"> You get a crash as well, very likely due to
              the shm free at the end.<br>
            </blockquote>
            <br>
            The rest of the code hasn't changed, so I kept all the
            shm_malloc(), actually I do not expect <br>
            them to fail.<br>
            <br>
            Cheers,<br>
            Roberto Fichera.<br>
          </blockquote>
          <br>
        </blockquote>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>