<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Scratch the "only on BYE and ACK" theory. &nbsp;I extended the if-statement to not fire on ACKs and BYEs, and I saw an error on an INVITE.</div><div><br></div><div>I see the documentation for the <a href="http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id285525">$DLG_status</a> variable and the <a href="http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id284396">validate_dialog()</a> function. &nbsp;The $DLG_status variable as used in the loose_route if-statement seems to confirm the existence of the dialog in Opensips. &nbsp;By what mechanism does it determine the existence of the dialog? &nbsp;The validate_dialog() doc says, "The performed tests are related to CSEQ sequence checking and routing information checking (contact and route set)." &nbsp;What are the specific conditions?</div><div><br></div><div><br></div><div>- Jeff</div><div><br></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Jeff Pyle &lt;<a href="mailto:jpyle@fidelityvoice.com">jpyle@fidelityvoice.com</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> OpenSIPS users mailling list &lt;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&gt;<br><span style="font-weight:bold">Date: </span> Sat, 9 Apr 2011 15:32:50 -0400<br><span style="font-weight:bold">To: </span> OpenSIPS users mailling list &lt;<a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a>&gt;<br><span style="font-weight:bold">Subject: </span> [OpenSIPS-Users] dlg_validate_dialog errors on BYE and ACK in loose_route<br></div><div><br></div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Hello,</div><div><br></div><div>I'm trying a new chunklet of config in loose_route(). &nbsp;I believe this came from a documentation page somewhere, so I don't pretend to take credit for the concept.</div><div><br></div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Clean up dialog data if necessary</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ($DLG_status!=NULL &amp;&amp; !validate_dialog()) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xlog("L_INFO", "Unable to validate dialog, fixing - $hdr(CSeq) on $ci\n");</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fix_route_dialog();</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div></div><div><br></div><div>I send the first batch of pseudo-production traffic through this config today and I ended up with a metric ton of:</div><div>&nbsp;&nbsp;ERROR:dialog:dlg_validate_dialog: Check failed for route number 0. req=[sip:&lt;opensips-IP?;lr;ftag=23ddd50-0-13c4-1f179b-78884527-1f179b;did=45b.b972314],dlg=[sip:&lt;opensips-IP&gt;;lr=on;ftag=23ddd50-0-13c4-1f179b-78884527-1f179b;did=45b.b972314]</div><div><br></div><div>And, the xlogs from the above line:</div><div>&nbsp;&nbsp;Unable to validate dialog, fixing - 3 BYE on &lt;callid&gt;</div><div><br></div><div>It showed up on a number of BYEs and ACKs. &nbsp;My dialog module config is as follows:</div><div><br></div><div><div># ----- dialog params -----</div><div>modparam("dialog", "dlg_flag", 4)</div><div>modparam("dialog", "bye_on_timeout_flag", 4)</div><div>modparam("dialog", "default_timeout", 21600)</div><div>modparam("dialog|sst", "timeout_avp", "$avp(s:dialog_timeout)")</div><div>modparam("dialog", "dlg_extra_hdrs", "Hint: dialog expired\r\n")</div><div>modparam("dialog", "dlg_match_mode", 1) &nbsp;# 0 = DID_ONLY; 1 = DID first, SIP second; 2 = SIP only</div><div>modparam("dialog", "db_url", "mysql://osuer:ospass@dbcluster/osdb")</div><div>modparam("dialog", "table_name", "dialog_1")</div><div>modparam("dialog", "db_mode", 1) &nbsp;# 1 = Realtime to DB; 2 = delayed; 3 = on shutdown</div><div>modparam("dialog", "profiles_with_value", "711calls; 729calls; calls")</div></div><div><br></div><div>create_dialog() runs on all initial INVITEs.</div><div><br></div><div>Is this type of behavior anything close to normal? &nbsp;What might cause it? &nbsp;My immediate fix is to simply comment out this portion of the config, but I'm afraid I might be masking a larger issue. &nbsp;Any suggestions would be great.</div><div><br></div><div>Just had a thought as I was about to send this email. &nbsp;Perhaps this is because by the time the BYE gets to this portion of the script, the dialog is already torn down? &nbsp;Could it be that simple, just add "if !(is_method("BYE") || is_method("ACK"))" to the top line of this config portion?</div><div><br></div><div><br></div><div>- Jeff</div><div><br></div></div></div></span></body></html>