Subject: [SIP] Setting Via field in Responses

From: "David Israel" <[email-masked]>
Date: Wed, 3 Jan 2001 10:39:38 -0800

The spec says that the Via field in a Response is to be set to the client or
proxy processing the message. So if you are sending the response back to the
proxy you received the request from, you would just copy over the top-most
Via field from the Request to the Response. But what happens if there is a
Contact field in the Request, and you are sending the Response to the URI
from the Contact field? Does the Via field in the Response in this case have
the URI from the Contact in the Request?

Thank you,
David

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 4 Jan 2001 01:48:01 -0500

> -----Original Message-----
> From: David Israel [mailto:[email-masked]]
> Sent: Wednesday, January 03, 2001 1:40 PM
> To: [email-masked]
> Subject: [SIP] Setting Via field in Responses
> 
> 
> 
> proxy processing the message. 

No, the Via field in the response is copied from the via field in the
request:

>6.47.4 User Agent and Redirect Servers
>A UAS or redirect server copies the Via header fields into the response,
without changing 
>their order, and
>uses the top (first) Via element as the destination, as described in the
next section.

> So if you are sending the 
> response back to the
> Via field from the Request to the Response. 

No, you copy all of them.

> But what happens 
> if there is a
> Contact field in the Request,

They are mandatory in rfc2543bis now.

> and you are sending the 
> Response to the URI
> from the Contact field? 

You wouldn't do that. Section 6.47.5 is quite clear and says nothing about
Contact header for forwarding responses. The response is ALWAYS SENT TO THE
IP ADDRESS THE REQUEST CAME FROM, AT THE PORT IN THE TOPMOST VIA. That rule
is for UAs, proxies, redirect servers alike.

-Jonathan R.
---
Jonathan D. Rosenberg                       72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.cs.columbia.edu/~jdrosen         PHONE: (973) 952-5000
http://www.dynamicsoft.com