[OpenSER-Devel] [ openser-Bugs-1857644 ] [CPL] could "contains" be allowed with no "subfield"?

SourceForge.net noreply at sourceforge.net
Tue Feb 12 14:41:28 CET 2008


Bugs item #1857644, was opened at 2007-12-24 19:44
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1857644&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Iñaki Baz (ibc_sf)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: [CPL] could "contains" be allowed with no "subfield"?

Initial Comment:
If I set a CPL like this:

   <address-switch field="origin">
      <address contains="user at domain">

I get this error:

-------------------------
WARNING:cpl-c:run_address_switch: operator CONTAINS applies only to DISPLAY -> ignored
-------------------------


But I'm not sure about it, RFC says:

-----------------------------------
4.1.1.  Usage of "address-switch" with SIP

[...]

If no subfield is specified for addresses in SIP messages, the string matched is the URI part of the address.  For "is" matches, standard SIP URI matching rules are used; **for "contains" matches, the URI is used verbatim**.
-----------------------------------

I read nothing about if "contains" is not allowed when not "subfield" exists...

Anyway I read too:

-----------------------------------
contains: This match operator applies only for the subfield "display".
-----------------------------------

So sincerely I'm not sure about it.

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-01-29 13:18

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Inaki,

Chapter 4.1 says:

          Node:  "address-switch"
       Outputs:  "address"         Specific addresses to match
    Parameters:  "field"           "origin", "destination",
                                   or "original-destination"
                 "subfield"        "address-type", "user", "host",
                                   "port", "tel", or "display"
                                   (also: "password" and "alias-type")

        Output:  "address"
    Parameters:  "is"              Exact match
                 "contains"        Substring match (for "display" only)
                 "subdomain-of"    Sub-domain match (for "host", "tel")

So, the "contains" parameter may be used only with the "display"
subfield.

And also the RFC says:

"If no subfield is specified, the "entire" address is matched"

so "contains" works only if "display" is explicitly present.

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-01-15 19:22

Message:
Logged In: YES 
user_id=1275325
Originator: NO

I think this original limitation comes from the old CPL draft. I will
check again with the RFC.

Thanks,
bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1857644&group_id=139143



More information about the Devel mailing list