[asterisk-dev] [Code Review] Properly route responses according to the Via headers in the request
Alex Hermann
alex at speakup.nl
Mon Dec 20 08:38:14 UTC 2010
On Thursday 16 December 2010, Matthew Nicholson wrote:
> This patch makes asterisk respect the Via headers in a request when
> responding to it. This is necessary in the even that a stateless proxy
> is in between asterisk and the requester. Without this patch, the
> response is simply routed back to the address we received the initial
> request from.
Where is the distinction between initial and in-dialog responses made? It
seems the patch affects all responses.
Nevertheless, responses are part of a transaction, and rfc3261 doesn't make
any distincion in sending a response to an initial or an in-dialog response.
Responses are _always_ sent to the addres where the request was received
from (section 18.2) and the port number in the Via sent-by value (unless
rfc3581's rport is present, in which case it is sent back to the port the
request was received from).
In your patch i fail to see where the destination for the response is set to
the address the request was received from. It seems the response is sent tot
the sent-by value from the Via header.
Alex.
More information about the asterisk-dev
mailing list