<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 05/02/16 09:16, smititelu wrote:<br>
    </div>
    <blockquote cite="mid:56B45A57.4010409@1and1.ro" type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      On 21.12.2015 10:48, Daniel-Constantin Mierla wrote:<br>
      <blockquote cite="mid:5677BCD3.9010600@gmail.com" type="cite">
        <meta http-equiv="Context-Type" content="text/html;
          charset=windows-1252">
        Hello,<br>
        <br>
        in failure route the sip message is cloned in shared memory,
        with many references to shared memory buffer, as well as shorter
        size (just to fit the sip message) of the buffer storing the
        message (the core used a private memory buffer to max capacity
        configured for message size).<br>
      </blockquote>
      <br>
      I'm not sure where to I start working on this. Can you give some
      tips on the places/functions to look on and try to extend for
      failure routes?<br>
    </blockquote>
    <br>
    First to look at is how the transaction structure is created -- see
    t_newtran() as a starting point. Updating the content of the sip
    request requires to do changes in the 'uas' structure of the
    transaction.<br>
    <br>
    It may simplify by allocating more than the message buffer for the
    clone in shared memory for transaction and then be sure that updated
    request doesn't exceed the allocated buffer. Still, some other
    fields need to be updated as well, as they point to the values
    inside the previous sip message content.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://miconda.eu">http://miconda.eu</a></pre>
  </body>
</html>