<p class="MsoNormal">Hi all</p>

<p class="MsoNormal"><br></p><p class="MsoNormal">OpenSIPs seems to be sending a 491 Request Pending when a lot of RE-INVITES are received.</p><p class="MsoNormal"><br></p>


<p class="MsoNormal">I found out the following threads regarding this problem: 


</p><p class="MsoNormal"><a href="http://opensips.org/pipermail/users/2010-May/012724.html">http://opensips.org/pipermail/users/2010-May/012724.html</a></p>


<p class="MsoNormal"><a href="http://www.mentby.com/Group/opensips-users/re-invite-problem-gt-491-request-pending.html">http://www.mentby.com/Group/opensips-users/re-invite-problem-gt-491-request-pending.html</a></p>


<p class="MsoNormal"> </p><br><p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Courrier New&quot;">So, it seems that I could get rid of that
error by adding a t_newtran()  before t_relay() when I handle an ACK: 
</span></p>

<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Courrier New&quot;"><a href="http://www.opensips.org/html/docs/modules/1.6.2/tm.html#id294024">http://www.opensips.org/html/docs/modules/1.6.2/tm.html#id294024</a></span></p>


<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Courrier New&quot;"> </span></p>

<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Courrier New&quot;">Like
this:</span></p>

<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Courrier New&quot;"> </span></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">        if (
is_method(&quot;ACK&quot;) ) {<span style="color:#303030;background:black;
mso-highlight:black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">               
if ( t_check_trans() ) {<span style="color:#303030;background:black;mso-highlight:
black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">                       
# non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404
from upstream server<span style="color:#303030;background:black;mso-highlight:
black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">                       
<span style="background:yellow;mso-highlight:yellow">t_newtran();<span style="color:#303030"></span></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">                       
t_relay();<span style="color:#303030;background:black;mso-highlight:black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">                       
exit;<span style="color:#303030;background:black;mso-highlight:black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">               
} else {<span style="color:#303030;background:black;mso-highlight:black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">                       
# ACK without matching transaction ... ignore and discard.\n&quot;);<span style="color:#303030;background:black;mso-highlight:black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">                       
xlog(&quot;L_WARN&quot;, &quot;[$mi] discarding ACK\n&quot;);<span style="color:#303030;background:black;mso-highlight:black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">                       
exit;<span style="color:#303030;background:black;mso-highlight:black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">               
};<span style="color:#303030;background:black;mso-highlight:black"></span></span></i></p>

<p class="MsoNormal" style="text-autospace:none"><i><span style="font-size:12.0pt;
font-family:&quot;Courrier New&quot;">        };<span style="color:#303030;background:black;mso-highlight:black"></span></span></i></p>

<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Courrier New&quot;;
mso-ansi-language:ES-CO" lang="ES-CO"> </span></p>

<br>But I&#39;m not sure if this is correct. I&#39;d appreciate any comments to see if I missed something before testing live.<br><br><br>Thank you and best regards,<br><br><br clear="all">Alejandro Rios Peņa<br><font size="1"><br>
<br><br><br>DISCLAIMER: The opinions expressed are my own, and not necessarily those of my employer.</font><br>