[OpenSER-Devel] [ openser-Feature Requests-1793928 ] [rr] louse_roote() should import domains from domain module

SourceForge.net noreply at sourceforge.net
Tue Feb 12 14:06:15 CET 2008


Feature Requests item #1793928, was opened at 2007-09-13 09:56
Message generated for change (Comment added) made by john_riordan
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1793928&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: Open
Resolution: Postponed
Priority: 7
Private: No
Submitted By: Iñaki Baz (ibc_sf)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: [rr] louse_roote() should import domains from domain module

Initial Comment:
In the loose_route() documentatión there is:
"There is only one exception: If the request is out-of-dialog (no to-tag) and there is only one Route: header indicating the local proxy, then the Route: header is removed and the function returns FALSE."

The problem is that the URI domain is not matched with domains of "domain" module.

This causes a problem in SIP devices which include a "Route" header in REGISTER, so it produces an infinite loop in OpenSer if there is not "alias=URI_domain" or if URI_domain doesn't appear in /etc/hosts.

Obviosly, if I work with domain modules I just want to store domains in "domain" table, and not to add them manually in openser.cfg as "alias" or in /etc/hosts.

Could "loose_route()" consult domain module entries in order to know if the URI is local or not?

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

Comment By: John Riordan (john_riordan)
Date: 2008-02-12 08:06

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

For what it is worth, I was thinking about this some more and my opinion
has changed with regard to the "aliases" approach. Doing a database lookup
for every loose routed request would be miserable from a performance
standpoint, so the "aliases" approach sounds best.

John

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

Comment By: John Riordan (john_riordan)
Date: 2008-02-08 14:39

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

Hey, 

I have the exact same issue and so I'm lobbying to get the feature. I need
to the loose_route() to check the domain table. 

Perhaps checking the domain table could be optionally configured on/off as
a parameter in the record routing module? Doing a DNS lookup is not
necessary and would be a big performance hit. The idea of extending alias
support to allow a module to register additional aliases might be a bit
awkward for me because I am updating the domain table
(insert/delete/update) via an external application so I currently depend on
OpenSER doing a database lookup to query the current local domain set. I
don't like the idea of keeping my database and OpenSER in sync via an alias
registration process. I currently make heavy use of is_uri_host_local() out
of the domain module to handle hop-by-hop routing, but I can't properly
handle these domains when the show up in the Route: header as loose_route()
doesn't currently provide a provision to check the domain table. 

Anyway, it would be nice to have something like:
modparam("rr", "check_domain_local", 1)

Regards,
John



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

Comment By: Iñaki Baz (ibc_sf)
Date: 2007-11-14 04:22

Message:
Logged In: YES 
user_id=1844020
Originator: YES

Yes, finally this is what I meant: matching domain in "Route" header with
local domains, alias domains and entries in "domain" table.

In most of cases (no preloaded "Route") it will enough to match local or
alias domains, so it would a matching as it's now. In cases "Route" domain
doesn't match local or alias domains then would be a DB query against
"domain" table.
Could it be in this way?

Regards.

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

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2007-11-14 03:37

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

Dan, that is exactly what I was going for. I keep the current behaviour of
not doing DNS lookup to match the Route URI, but use only the "aliases"
list.
The idea is to extend the alias support to allow a module to register
additional aliases (except the ones from script).

Regards,
Bogdan

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

Comment By: Dan (dan_pascu)
Date: 2007-11-13 15:36

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

I do not think that we need to use DNS lookups on every loose_route call.
That would be very costly and unnecessary IMO. All we have to do is to
check the domains from the domains table in adition to aliases and local
IPs, because those domains are local to openser.

Otherwise it would require a SRV and/or A record lookup to determine if it
points to one of the proxy's IPs.


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

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2007-11-13 13:08

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

Hi,

In openser, to check if the domain is local or not is not done by
resolving via DNS to see if you end up to one of your IPs. How is done -
openser checks the domain against a list of know local domains. It is done
like this mainly because is faster and not in all the cases there is a
relation (as DNS) between the IP you use and the local SIP domain.

As the RFC makes possible the usage of names in Route (preloade route),
than we need to take this into account.

I will re-clasify this as a Feature request, rather than a bug in openser.
I would call it a bug in RFC :D...

Regards,
Bogdan

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

Comment By: Iñaki Baz (ibc_sf)
Date: 2007-11-03 20:56

Message:
Logged In: YES 
user_id=1844020
Originator: YES

Sorry but I reopen again this report.

In RFC 3261 into "16 Proxy Behavior" section we can read (page 102):

   "The URI placed in the Record-Route header field MUST resolve to
    the element inserting it (or a suitable stand-in) when the
    server location procedures of [4] are applied to it, so that
    subsequent requests reach the same SIP element."

And [4] refers to: "SIP: Locating SIP Servers" RFC 3263.

That means the "Route" header URI can be a hostname or a domain and it can
envolve a DNS query (SRV and A type).

Maybe I've understood wrongly the text above, but if not, shouldn't
"louse_roote()" do a DNS query for URI in "Route" header?

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

Comment By: Iñaki Baz (ibc_sf)
Date: 2007-10-02 12:27

Message:
Logged In: YES 
user_id=1844020
Originator: YES

In SIP_Forum's SIPconnect program to get SIP compliant devices and
services we can read:

"SIP Proxy Servers MUST use canonical hostnames in any 'Via:' and/or
'Route:' SIP header field that it inserts in the SIP message.":

 
http://www.zoomerang.com/web/SharedResults/SharedResultsSurveyResultsPage.aspx?ID=L234XRLBNYYH
(point 15)

So if that is true then OpenSer behaviour is correct and there is a bug in
oSIP stack because it shouldn't add a "Route" header with SIP domain value
in REGISTER messages.

Maybe this report could be closed then?

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

Comment By: Klaus Darilion (klaus_darilion)
Date: 2007-09-13 10:43

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

Are you sure? I think the rules for finding the IP address of the SIP URI
in the Route header is RFC 3263.

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

Comment By: Nobody/Anonymous (nobody)
Date: 2007-09-13 10:35

Message:
Logged In: NO 

this request is invalid.  route header contains hostnames or host
addresses, not domains.

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

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



More information about the Devel mailing list