Hey All,<div>I&#39;m doing simple dialog based topo hiding and I noticed that CANCELd dialogs are hanging around in state 5. They are starting to stack up. </div><div><br></div><div><div>Here&#39;s an example of one of the dialogs.. I kind of thought that when the timeout ran down, the dialog would disappear, but it&#39;s not:</div>

</div><div><br></div><div><p style="margin:0px;font-size:13px;font-family:Arial">dialog::  hash=1645:1160860947</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>state:: 5</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>user_flags:: 0</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>timestart:: 0</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>timeout:: 0</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>callid:: <a href="mailto:69126-1353462109-9996@1.2.3.4">69126-1353462109-9996@1.2.3.4</a></p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>from_uri:: <a href="http://sip:14387649628@1.2.3.4:5060">sip:14387649628@1.2.3.4:5060</a></p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>to_uri:: <a href="mailto:sip%3A50931111111@5.6.7.8">sip:50931111111@5.6.7.8</a></p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>caller_tag:: 201142122000875167015</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>caller_contact:: sip:1.2.3.4:5060;transport=udp</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>callee_cseq:: 0</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>caller_route_set:: </p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>caller_bind_addr:: udp:<a href="http://5.6.7.8:5060">5.6.7.8:5060</a></p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>callee_tag:: 2011411220122012615936129</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>callee_contact:: sip:9.8.7.6:5060;transport=udp</p>
<p style="margin:0px;font-size:13px;font-family:Arial"><span class="Apple-tab-span" style="white-space:pre">        </span>caller_cseq:: 1</p><p style="margin:0px;font-size:13px;font-family:Arial"><br></p><p style="margin:0px;font-size:13px;font-family:Arial">

This has been around for about 18 hours! SIP Trace looks pretty normal really. </p><p style="margin:0px;font-size:13px;font-family:Arial"><br></p><p style="margin:0px;font-size:13px;font-family:Arial">To properly support topo hiding, I&#39;ve got this at the top of the route processing:</p>

<p style="margin:0px;font-size:13px;font-family:Arial"><br></p><p style="margin:0px;font-size:13px;font-family:Arial"></p><p style="margin:0px">        if (has_totag()) {</p><p style="margin:0px">                if(is_method(&quot;INVITE|ACK|BYE|UPDATE|CANCEL&quot;)) {</p>

<p style="margin:0px">                        if(match_dialog()) {</p><p style="margin:0px">                                t_relay();</p><p style="margin:0px">                                exit;</p><p style="margin:0px">

                        }</p><p style="margin:0px">                }</p><p style="margin:0px"><br></p><p style="margin:0px">I originally didn&#39;t include CANCEL in the method check, but it caused CANCELs to be ignored by one of the endpoints. Granted, I know the endpoints are using switches that arn&#39;t known for being very compliant. When I added in CANCEL in this check, the sip traces now look proper and both sides are happy with the request being terminated, but the dialog persists in memory.</p>

<p style="margin:0px"><br></p><p style="margin:0px">Any ideas why these dialogs are not clearing out of opensips?</p><p></p><p style="margin:0px;font-size:13px;font-family:Arial"><br></p><p style="margin:0px;font-size:13px;font-family:Arial">

<br></p><p style="margin:0px;font-size:13px;font-family:Arial">Thanks,</p><p style="margin:0px;font-size:13px;font-family:Arial">Brett</p><p style="margin:0px;font-size:13px;font-family:Arial"><br></p></div>