<div dir="auto">Hi Daniel, I appreciate the follow-up, good to know that this is the right solution.<div dir="auto"><br></div><div dir="auto">Indeed I will complete this MR soon, it will be valuable to always be able to generate a complete ACC event with locally generated replies to be matches to a trace etc.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 4, 2020, 01:16 Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <p>Hello,</p>
    <p>when the reply is generated locally, then the acc callback
      function does not get a real sip reply structure, relying on
      request attributes.</p>
    <p>I noticed you started a pull request to get the generated local
      to-tag in such case, that is the way to make it work as you want,
      so let's continue there for further discussions.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div>On 31.07.20 08:51, Julien Chavanton
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>
          <pre style="box-sizing:inherit;margin:4px 0px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border-radius:4px;color:rgb(29,28,29);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:verdana,sans-serif">Hi, considering this example :
</span>

modparam("acc_json", "acc_missed_flag", 6)

failure_route[test] {
    setflag(6); // MISSED_ACC, the failure will be recorded by ACC
    t_flush_flags(); // This will set the flags in the newly created transaction
    t_reply("500", "Service Unavailable");
}

<span style="font-family:verdana,sans-serif">This does generate an ACC event, however the to-tag is not populated, my guess this is because the TM callback is done before the to-tag is generated.
</span></pre>
          <pre style="box-sizing:inherit;margin:4px 0px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;border-radius:4px;color:rgb(29,28,29);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:verdana,sans-serif">I wonder if there is a way to populate the to-tag immediately ?

</span></pre>
          <pre style="box-sizing:inherit;margin:4px 0px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;border-radius:4px;color:rgb(29,28,29);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:verdana,sans-serif">I will dig it further, but maybe there is a trick I am missing </span>
</pre>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" rel="noreferrer">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" rel="noreferrer">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" rel="noreferrer">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" rel="noreferrer">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" rel="noreferrer">https://www.paypal.me/dcmierla</a></pre>
  </div>

</blockquote></div>