El Monday 07 April 2008 14:03:39 Victor Cartes escribió:
Hello to all,
About SIP/UDP: Is there any way to specify the IP address for SIP
responses, in a similar fashion as port specified on top most Via HF?
RFC 3261:
http://tools.ietf.org/html/rfc3261#section-18.2.1
18.2.1 Receiving Requests
When the server transport receives a request over any transport, it
MUST examine the value of the "sent-by" parameter in the top Via
header field value. If the host portion of the "sent-by" parameter
contains a domain name, or if it contains an IP address that differs
from the packet source address, the server MUST add a "received"
parameter to that Via header field value. This parameter MUST
contain the source address from which the packet was received.
This is to assist the server transport layer in sending the response,
since it must be sent to the source IP address from which the request
came.
Consider a request received by the server transport which looks like,
in part:
INVITE sip:bob@Biloxi.com SIP/2.0
Via: SIP/2.0/UDP bobspc.biloxi.com:5060
The request is received with a source IP address of 192.0.2.4.
Before passing the request up, the transport adds a "received"
parameter, so that the request would look like, in part:
INVITE sip:bob@Biloxi.com SIP/2.0
Via: SIP/2.0/UDP bobspc.biloxi.com:5060;received=192.0.2.4
This means that ANY UAS or proxy (as OpenSer) must add "received" parameter to
the top mos VIA header in case the source IP is not the same as the indicated
in sent-by field fo top Via header. This is in UPD or TCP. And this is
already done by OpenSer (automatically).
Regards.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es