[Serusers] Loose Routing / Record-Route/Route Qeustions

Andrei Pelinescu-Onciul pelinescu-onciul at fokus.fraunhofer.de
Wed Jul 14 16:59:18 CEST 2004


On Jul 14, 2004 at 16:34, Arnd Vehling <av at nethead.de> wrote:
> Hello,
> 
> i am currently trying to understand what exactly "loose routing"
> is and what exactly "loose_route" does.
> 
> According to the admin manual and several postings from iptel.org
> members on this this piece of code should be at the very top of
> every routing script right after the sanity checks:
> 
>         # subsequent messages within a dialog should take the
>         # path determined by record-routing
>         if ( loose_route() ) {
>                 t_relay();
>                 break;
>         };
> 
> AFAIK a proxy determines if a request should be "loose routed" by
> looking at the "Record-Route"/"lr=on" option.

Not Record-Route but Route.
> 
> Questions:
> 
> If i have this statement bevore any authentication checks, dont i risk
> to have an open relay? Its easy to append a "lr=on" to every request.

Yes, you should make some checks before t_relay (depending on what are
you trying to avoid and what's your site policy, typically you should
 check for local address in from, pre-loaded routes to your pstn gw
 a.s.o).

> 
> When exactly is "loose_route == TRUE" I cant find any real info about this
> either in the admin doc, nor in the according modules README file.

When the message is going to be forwarded acording to the Route headers
and not acording to the uri, i.e. the message has valid Route headers.
> 
> I did understood what "Record-Route:" does, but what does "Route:" do i.e.
> wheres the difference between both?!

Record-Route  is used to record the route through which the message
goes. When a dialog is established the Record-Routes are used to
establish the route set (the Route headers that will be added to
 all the subsequent messages in the dialog). One side will use the
 content of Record-Route as is, the other will revert the order.
> 
> Does every "subsequent" message belonging to a (statefull) sip call
> get evaluatet in SERs main route block? (As long as its record-routed
> off course and the proxy "sees" it).

No, most of them will get "caught" in the loose_route block.
After the dialog is established (200 Ok received), all the subsequent
messages will have Routes, so they wil go through loose_route.


Andrei




More information about the sr-users mailing list