[OpenSIPS-Users] dlg_validate_dialog errors in loose_route

Jeff Pyle jpyle at fidelityvoice.com
Wed Apr 13 17:23:43 CEST 2011


Bogdan,

Don't hold back…let's hear how you really feel.    :)

I understand your position.  Unfortunately since there are UAs that do this, and they RFC compliant in their behavior, the validate_dialog() function is less useful in the real world.  I've had to remove it from my configs.

I'm fighting a similar situation regarding the behavior of the uac_replace_from function.  It seems that Acme SBCs replace the value of the From header (old To header) on new requests within a dialog, and this breaks the uac_replace_from function.  I've cited the second paragraph of section 12.2.1.1 of RFC 3261.  The carrier I'm fighting with now reads this "mandatory reflection" behavior as part of the old RFC 2543, not 3261.  They aren't willing to put any more time into configuring their Acme to maintain the headers.  I work with another carrier partner who also uses Acme who was able to make the change.  I'm trying to get the details from the second carrier so I can share them with the first.


- Jeff

From: Bogdan-Andrei Iancu <bogdan at opensips.org<mailto:bogdan at opensips.org>>
Reply-To: OpenSIPS users mailling list <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Date: Wed, 13 Apr 2011 10:54:00 -0400
To: "users at lists.opensips.org<mailto:users at lists.opensips.org>" <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] dlg_validate_dialog errors in loose_route

Hi Jeff,

Well, life sucks.....You see, the UA you use is re-ordering the URI params...This is perfectly allowed from RFC point of view, but is bullshit in real life. So your UA is compliant, but not fairplay :)....

The only solution to this is to extend the "SIP URI matching" from simple string comparison, to RFC-wise comp - parsing the URI, checking username, domain, params, etc.....I tried to avoid this as much as possible as it BS to me....

Regards,
Bogdan

On 04/13/2011 05:34 AM, Jeff Pyle wrote:
This thing is picky… The validation failed with the following values in the log entry:

req=[sip:<opensips IP>;lr;r2=on;ftag=gK0706089a;did=e17.bfb88ba7],
dlg=[sip:<opensips IP>;r2=on;lr;ftag=gK0706089a;did=e17.bfb88ba7]

Not quite sure what to say about this one.


- Jeff

From: Jeff Pyle <jpyle at fidelityvoice.com<mailto:jpyle at fidelityvoice.com>>
Reply-To: OpenSIPS users mailling list <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Date: Mon, 11 Apr 2011 10:15:11 -0400
To: OpenSIPS users mailling list <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] dlg_validate_dialog errors on BYE and ACK in loose_route

Indeed!  I hadn't noticed the difference in the dlg vs req sections of the debug message.

I shall try exactly as you suggest.  Thanks.


- Jeff

From: Vlad Paiu <vladpaiu at opensips.org<mailto:vladpaiu at opensips.org>>
Reply-To: OpenSIPS users mailling list <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Date: Mon, 11 Apr 2011 06:13:32 -0400
To: "users at lists.opensips.org<mailto:users at lists.opensips.org>" <users at lists.opensips.org<mailto:users at lists.opensips.org>>
Subject: Re: [OpenSIPS-Users] dlg_validate_dialog errors on BYE and ACK in loose_route

Hello Jeff,

It's not that the dialog is already torn down by the time the BYE gets to that particular portion of script.
It's complaining about the fact that at the dialog creation, the route had the "lr=on" parameter, and at BYE time, the parameter has been stripped and set
just to "lr".

This should not happen in a regular scenario, as other SIP entities should not explicitly modify the content of Route headers recorded at Invite time.
You could try to check the  enable_full_lr ( [1] ) parameter, and onlyattach "lr" instead of "lr=on", and see if this fixes the behavior.

[1] http://www.opensips.org/html/docs/modules/devel/rr.html#id250149

Regards,

--
Vlad Paiu
OpenSIPS Developer


On 04/09/2011 10:32 PM, Jeff Pyle wrote:
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 routenumber 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
Users at lists.opensips.org<mailto:Users at lists.opensips.org>http://lists.opensips.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110413/5c9604ca/attachment-0001.htm>


More information about the Users mailing list