<div dir="ltr">Hello all,<div><br></div><div>I hope somebody can give me a kind hint on what to do here.<br><div><br></div><div style>We have this piece of code for CANCEL handling:</div><div style><br></div><div style><div>

    # CANCEL processing</div><div>    if (is_method(&quot;CANCEL&quot;)) {</div><div>        if (t_check_trans()) {</div><div>            t_relay();</div><div>        }</div><div>        exit;</div><div>    }</div><div><br>

</div><div style>What happens is sometimes we take too long to process the INVITE due to some DB issues, and the UAC sends us a CANCEL before we relay the INVITE. </div><div style><br></div><div style>We don´t use t_newtran() because of this big warning in docs saying that &quot;<span style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:12px;text-align:justify">the changes on the request that are made after this function call will not be saved into transaction!!!</span>&quot;. We need to perform a lot of changes in the requests and I understand this wouldn´t be possible after calling t_newtran().</div>

<div style><br></div><div style>So our transaction is not created untill we relay the INVITE, which means that any CANCEL received before that will be dropped.</div><div style><br></div><div style>We also tried testing the CANCEL messages we´re receiving in these cases with has_totag() and loose_route(), but they won´t pass as well.</div>

<div style><br></div><div style>Is there any way to verify a CANCEL message in this scenario and relay it in case is belongs to a valid transaction?</div><div style><br></div><div style>Any help will be much appreciated.</div>

<div style><br></div><div style>Regards,</div><div style>Mariana.</div></div></div></div>