Scratch the "only on BYE and ACK" theory.  I extended the if-statement to not 
fire on ACKs and BYEs, and I saw an error on an INVITE.

I see the documentation for the 
$DLG_status<http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id285525>
 variable and the 
validate_dialog()<http://www.opensips.org/html/docs/modules/1.6.x/dialog.html#id284396>
 function.  The $DLG_status variable as used in the loose_route if-statement 
seems to confirm the existence of the dialog in Opensips.  By what mechanism 
does it determine the existence of the dialog?  The validate_dialog() doc says, 
"The performed tests are related to CSEQ sequence checking and routing 
information checking (contact and route set)."  What are the specific 
conditions?


- Jeff


From: Jeff Pyle <[email protected]<mailto:[email protected]>>
Reply-To: OpenSIPS users mailling list 
<[email protected]<mailto:[email protected]>>
Date: Sat, 9 Apr 2011 15:32:50 -0400
To: OpenSIPS users mailling list 
<[email protected]<mailto:[email protected]>>
Subject: [OpenSIPS-Users] dlg_validate_dialog errors on BYE and ACK in 
loose_route

Hello,

I'm trying a new chunklet of config in loose_route().  I believe this came from 
a documentation page somewhere, so I don't pretend to take credit for the 
concept.

                        # Clean up dialog data if necessary
                        if ($DLG_status!=NULL && !validate_dialog()) {
                                xlog("L_INFO", "Unable to validate dialog, 
fixing - $hdr(CSeq) on $ci\n");
                                fix_route_dialog();
                        }

I send the first batch of pseudo-production traffic through this config today 
and I ended up with a metric ton of:
  ERROR:dialog:dlg_validate_dialog: Check failed for route number 0. 
req=[sip:<opensips-IP?;lr;ftag=23ddd50-0-13c4-1f179b-78884527-1f179b;did=45b.b972314],dlg=[sip:<opensips-IP>;lr=on;ftag=23ddd50-0-13c4-1f179b-78884527-1f179b;did=45b.b972314]

And, the xlogs from the above line:
  Unable to validate dialog, fixing - 3 BYE on <callid>

It showed up on a number of BYEs and ACKs.  My dialog module config is as 
follows:

# ----- dialog params -----
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "bye_on_timeout_flag", 4)
modparam("dialog", "default_timeout", 21600)
modparam("dialog|sst", "timeout_avp", "$avp(s:dialog_timeout)")
modparam("dialog", "dlg_extra_hdrs", "Hint: dialog expired\r\n")
modparam("dialog", "dlg_match_mode", 1)  # 0 = DID_ONLY; 1 = DID first, SIP 
second; 2 = SIP only
modparam("dialog", "db_url", "mysql://osuer:ospass@dbcluster/osdb")
modparam("dialog", "table_name", "dialog_1")
modparam("dialog", "db_mode", 1)  # 1 = Realtime to DB; 2 = delayed; 3 = on 
shutdown
modparam("dialog", "profiles_with_value", "711calls; 729calls; calls")

create_dialog() runs on all initial INVITEs.

Is this type of behavior anything close to normal?  What might cause it?  My 
immediate fix is to simply comment out this portion of the config, but I'm 
afraid I might be masking a larger issue.  Any suggestions would be great.

Just had a thought as I was about to send this email.  Perhaps this is because 
by the time the BYE gets to this portion of the script, the dialog is already 
torn down?  Could it be that simple, just add "if !(is_method("BYE") || 
is_method("ACK"))" to the top line of this config portion?


- Jeff

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to