Hi guys,<br><br>I wonder if someone could sanity check something for me.<br><br>I currently have a simple load balancer set up using algorithm 10 (call load distribution) from the dispatcher module. I&#39;m using Record-Routing so that I can clear down the call load record at the end of the call.<br>
Everything looked like it was working okay until I just spotted a problem that I think might be a bug. It&#39;s to do with ACKs to non-200 responses.<br><br>In a normal call, the flow goes:<br><span style="font-family:courier new,monospace">UAC                Proxy               UAS<br>
1     INVITE --&gt;<br>2                          INVITE--&gt;<br>3                         &lt;-- 200 OK<br>--- ds_load_update()<br>4     &lt;-- 200 OK<br>5      ACK --&gt;<br>6                           ACK --&gt;</span><br>
Now between step 3 and 4 the proxy runs ds_load_update which according to the documentation &quot;set internal state to confirmed for the call load&quot; entry in the internal call state store. This means the proxy knows where to send the ACK at step 5 because it is safely in the call state store so you can use ds_select_dst again on the ACK to get it to the right place. Works fine!<br>
<br>Now consider the non-200 case:<br><span style="font-family:courier new,monospace">UAC               Proxy               UAS<br>1     INVITE --&gt;<br>2                          INVITE--&gt;<br>3                      &lt;-- 603 Decline<br>
--- ds_load_unset()<br>4  &lt;-- 603 Decline<br>5      ACK --&gt;<br>6                           ACK --&gt; ???</span><br>Between step 3 and 4 the proxy is supposed to run ds_load_unset() which unconditionally removes the call from the call state store. Now when the ACK comes in at step 5, the proxy has no record of the call and so doesn&#39;t know where to send the ACK. This results in retried Declines and ACKs. Broken :-(<br>
<br>If the proxy doesn&#39;t run ds_load_unset() on the 603 response, is there some kind of timer that will cause the call to be removed from the call state store on unconfirmed calls?<br><br>I don&#39;t think I can run ds_load_unset on the ACK because there&#39;s nothing in the ACK that tells me it is because of a 603, rather than a 200.<br>
<br>Edit: actually there is! The Route header is present on the 200 ACK, but <b>not</b> on the 3xx to 6xx ACK. Maybe I can use loose_route... Anyway, any thoughts would be appreciated!<br><br>Cheers,<br>Richard<br>