Suppose this simply scenario: 3 SIP phones A,B,C.
On B is set a redirection (moved temporarily) direct to C. 
On C is set a redirection (moved temporarily) direct to B.

 If A calls B and B replies with moved temporarily to C.

A   INVITE B
A ---------à B

B   “Moved temporarily to C”
A ß--------- B


A calls C and B replies with moved temporarily to B.

A   INVITE C
A ---------à C

C   “Moved temporarily to B”
A ß--------- C

A calls B 
A   INVITE B
 ---------à B

so it generates an endless loop. 

How can I detect and avoid this endless loops?

Does the INVITE contain an header field, analogous to the “Max Forwards”, that I can see to identify a loop and consequently refuse the INVITE?

Thanks for your help

Daniele