[SIPForum-discussion] strict and loose routing differences

Nitin Kapoor nitinkapoorr at gmail.com
Sat Nov 13 12:42:55 UTC 2010


Hi Kunal,

Please find the attached docs for LOOSE routing vs STRICT routing.

Thanks,
Nitin Kapoor

On 12 November 2010 20:01, kunal nayak <kunalnayak007 at gmail.com> wrote:

> hi All,
> i want to know the difference between strict and loose routing.it is
> written that in strict routing request uri is rewritten  to the field in the
> route header field and forworded.and in loose routing the request is
> forwarded to the uri in the route header field.so where is the
> difference?
>
>
>
>
>
>
> thanks,
> kunal
>
>
> _______________________________________________
> This is the SIP Forum discussion mailing list
> TO UNSUBSCRIBE, or edit your delivery options, please visit
> http://sipforum.org/mailman/listinfo/discussion
> Post to the list at discussion at sipforum.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20101113/3f5795b5/attachment-0002.html>
-------------- next part --------------
LOOSE ROUTING TECHNIQUE:

The flow of Loose Routing goes like this:

	UA1			Proxy			UA2

	|			|			|
	|			|			|
	|			|	REGISTRAR (M1)	|
	|			|<----------------------|
	|			|Contact: Ua2 at a2.com;lr	|
	|	INVITE(M2)	|			|
	|---------------------->| 			|
	|			|	INVITE(M3)	|
	|			|---------------------->|	
	|			|			|	
	|			|			|	
	|			|			|
	|			|	200 OK(M4)	|
	|			|<----------------------|
	|			| Contact:		|
	|			|<Ua2 at a2.com;lr>	|
	|			|			|
	|			|			|
	|	 200 OK	(M5)	|			|      
	|<----------------------|			|
	|  Record-Route:	| 			|
	|  <Proxy at p.com;lr>	|			|
	|  Contact:		|  			|
	| <Ua2 at a2.com>		|  			|
	|			|  			|
	|	ACK(M6)		|                       |
	|---------------------->|			|
	|  RURI:		|			|
	|  <Ua2 at a2.com>		|			|
	|			|			|
	|  Route: 		|			|
	|  <Proxy at p.com;lr>;	|			|
        |  			|			|
        |   Contact:		|			|
        |  <Ua1 at a1.com>		|			|
        |			|	ACK (M7)	|
	|			|---------------------->| 
	|			|RURI:			|
	|			|<Ua2 at a2.com>		| 
	|			|Contact:		|
	|			|<Ua1 at a1.com>		| 
	|			|			|	
	|			|			|		
Explanation:

When a User Agent wants to adopt Loose Routing, it means that the User Agent does not require the intermediate proxy to change the Request-URI of the incoming messages. To explain this scenario:

M1: UA2 in domain a2.com, decides to use loose routing technique. Hence, registers with the proxy using "lr" parameter in its Contact address.

Proxy registers the UA2 with Loose Router parameter (lr). Hence, whenever routing any messages from UA2 to any other User agents, Proxy adds a Record Route header and includes "lr" parameter in Record Route header.

M2 and M3 : Proxy receives an INVITE from UA1, at a1.com domain. 
Proxy notes that this INVITE needs to be forwarded to UA2 and hence,send INVITE to UA2.

M4: UA2 responds to proxy with 200 OK to the INVITE and provides its address in the Contact header for direct communication of ACK from UA1 to UA2.

M5: Proxy adds the Record Route header to 200 OK message containing "lr" parameter. 

M6: UA1 responds with an ACK message. As there was "lr" parameter in the Record Route header of the 200 OK UA1 applies the following logic to create the ACK message:
	
Suppose received ACK contains:
Record Route : <Proxy at p.com;lr>
Contact : <UA2 at a2.com>

Then:
R-URI : <UA2 at a2.com>s
Route : <Proxy at p.com;lr>
Contact : <UA1 at a1.com>

M7: The Proxy receives the ACK message and removes its address from the Route header and forward the ACK message to the UA2. 

To explain the Loose Routing in nutshell, when Proxy receives a message intended to reach UA2, R-URI of the received message (address of the UA2 agent)will not be changed by Proxy.

/*****************************/********************************/**************************************/

STRICT ROUTING TECHNIQUE:

The flow of Strict Routing goes like this:

	UA1			Proxy			UA2

	|			|			|
	|			|			|
	|			|	REGISTRAR (M1)	|
	|			|<----------------------|
	|			|Contact: Ua2 at a2.com	|
	|	INVITE(M2)	|			|
	|---------------------->| 			|
	|			|	INVITE(M3)	|
	|			|---------------------->|	
	|			|			|	
	|			|			|	
	|			|			|
	|			|	200 OK(M4)	|
	|			|<----------------------|
	|			| Contact:		|
	|			|<Ua2 at a2.com;lr>	|
	|			|			|
	|			|			|
	|	 200 OK	(M5)	|			|      
	|<----------------------|			|
	|  Record-Route:	| 			|
	|  <Proxy at p.com>	|			|
	|  Contact:		|  			|
	| <Ua2 at a2.com>		|  			|
	|			|  			|
	|	ACK(M6)		|                       |
	|---------------------->|			|
	|  RURI:		|			|
	|  <Proxy at p.com>	|			|
	|  Route: 		|			|
	|  <Ua2 at a2.com>		|			|
        |   Contact:		|			|
        |  <Ua1 at a1.com>		|			|
        |			|	ACK (M7)	|
	|			|---------------------->| 
	|			|RURI:			|
	|			|<Ua2 at a2.com>		| 
	|  			|Route:			|
	|			|<Ua2 at a2.com>		|
	|			|Contact:		|
	|			|<Ua1 at a1.com>		| 
	|			|			|	
	|			|			|		
Explanation:

When a User Agent wants to adopt Strict Routing, it means that the User Agent requires the intermediate proxy to change the Request-URI of the incoming messages. This is applicable to the scenarios where the URI of the UA2 is not exposed to UA1.

To explain this scenario:

M1: UA2 in domain a2.com, decides to use strict routing technique. Hence, registers with the proxy without "lr" parameter in its Contact address.

M2 and M3 : Proxy receives an INVITE from UA1, at a1.com domain. 
Proxy notes that this INVITE needs to be forwarded to UA2 and hence,send INVITE to UA2.

M4: UA2 responds to proxy with 200 OK to the INVITE and provides its address in the Contact header for direct communication of ACK from UA1 to UA2.

M5: Proxy adds the Record Route header to 200 OK message. Note that there is no "lr" parameter in the Record Route. 

M6: UA1 responds with an ACK message. As there was no "lr" parameter in the Record Route header of the 200 OK UA1 applies the following logic to create the ACK message:
	
Suppose received ACK contains:
Record Route : <Proxy at p.com>
Contact : <UA2 at a2.com>

Then:
R-URI : <Proxy at p.com>
Route : <UA2 at a2.com>
Contact : <UA1 at a1.com>

M7: The Proxy receives the ACK message and removes its address from the Route header and forward the ACK message to the UA2. 

To explain the Strict Routing in nutshell, when proxy receives a message intended to reach UA2, R-URI of the received message (address of the UA2 agent) will be changed by Proxy and the correct URI of the UA2 message will be added in the R-URI. Proxy then forward this message to UA2.







More information about the discussion mailing list