SIP Via
SIP Via
INVITE sip:bob@biloxi.com SIP/2.0 Via: SIP/2.0/UDP proxy.stockholm.se:5060;branch=82.1 Via: SIP/2.0/UDP pc33.atlanta.com:5060;branch=z9hG4bK776asdhds To: Bob <sip:bob@biloxi.com> From: Alice <sip:alice@atlanta.com>;tag=1928301774 Call-ID: a84b4c76e66710 CSeq: 314159 INVITE Contact: <sip:alice@pc33.atlanta.com> Content-Type: application/sdp Content-Length: 142 (Alice’s SDP not shown)
Via headers show the path the request has taken in the SIP network
- A Via header is inserted by the User Agent that initiated the request (this will be last in the list of Via headers)
- Via headers are inserted above this by proxies in the path (i.e., this details the path taken by the request)
Via headers are used to route responses back the same way the request came
- this allows stateful proxies to see both the requests and responses
- each such proxy adds the protocol, hostname/IP address, and port number
The “branch” parameter is used to detect loops
Transcript
[slide131] When we look at these Via pointers, that basically shows us the path, the request was forwarded through this network of various parties along the way. This branch parameter here was introduced to avoid loops, because if we see that we've sent all that packet and it returns back to us, we should say, no, we're not going to forward it again. Nowadays, we do that a different way by limiting the number of hops.