Sim,
3261clearly states, that server transport adds a 'received' param if it find the
host part/IP in the via diff from the actual source (IP from where packet is being
received). Thus when responding to the request back this 'received' param IP add
(actual IP from where request came) is used to send the response back. So the response
will go back to the same add. from where the request came . Also i think (from below)
it says, this rule stays good independent/ irrespecitve of the transport.
-----18.2.1----
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:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP bobspc.biloxi.com:5060;received=192.0.2.4
-------
Rama
SiM <[EMAIL PROTECTED]> wrote:
Hi Nagaraj,
If the connection is TCP, then A might get the response from the
Proxy unless there is some kind of check.
The transaction structure may have maintained only the socket
descriptor for the TCP connection from A with the Proxy (@ the PROXY ) and hence i
feel the socket descriptor will be used blindly to send Responses (back to A) , but in
the case of UDP, the Responses might go to B, as the IP and port in the Via Header are
parsed and given to the Callback for sending messages in the stack (As this is
Connection-less). (In case of TCP, even if the IP and port are parsed from the Via
Header and passed, it might be ignored and the Socket Descriptor in the transaction
structure might be used directly to communicate with the UAC (i.e A ) as there is
already an Open connection with A)
The Proxy could detect these cases, by adding the received or sent-by or some field
which iam not sure of, Please refer Sec. 18 of 3261.
Feel free to correct me ,if iam wrong :-)
Cheers.
Simith
Nagaraj S <[EMAIL PROTECTED]> wrote: Hi,
I got it, I will explain the situation clearly,
1. Softphone 'A' sent a SIP REQUEST with a "via header field containing
a
IP address 'IP_B' other than the IP addres of softphone 'A' ".
2. A proxy 'P' received this Request and routed the request to the
destination Softphone say 'C'.
3. Softphone 'C' sent a response to this request. The response reached
our proxy 'P' safely.
4. Now the Proxy 'P' gets the IP address present in the via header field
of the response which
is not the IP address of softphone A which initiated this
transaction, but some other IP address 'IP_B'.
In this case, if the proxy 'P' is using a TCP connection for handling
the transaction initiated by 'A',
should it create a new TCP connection with the IP address 'IP_B' to
send the response or
should it identify this mismatch in the IP address being! used for this
transaction and the one mentioned in via
header field and treat the condition appropriately ?
hope i am not confusing u people...
----- Original Message -----
From: Markus Hofmann
To: Nagaraj S
Cc:
Sent: Friday, June 25, 2004 3:14 PM
Subject: Re: [Sip-implementors] Doubt in handling via ....
> "Nagaraj S" schrieb am 25.06.04 11:15:15:
>
> Hi , I have a doubt in handling "via and contact" header fields, AS
per the RFC 3261, "Via header field tells other elements where to send the
> response and the Contact header field tells other elements where to
send future requests." If a softphone A sends a INVITE message with a
"via header field containing the IP adress of some other softphone say B ,
then the response for this INVITE will be sent to B or not ?. ----
>
> No, t! here is a misunderstanding. Only A is able to stamp its address in
the via header or a proxy where the message is forwarded to. The response of
B will use the last via header and send back to this address. If this
address is a proxy, the proxy will remove its address and send to next via
header until a will reach.
>
> A will also set the contact header with its contact ([EMAIL PROTECTED] or
[EMAIL PROTECTED])
>
>
> Rgds
> Nagaraj S
> -----------------------------------------------------------------
> _______________________________________________Sip-implementors mailing
[EMAIL PROTECTED]://lists.cs.columbia.edu/mailman/lis
tinfo/sip-implementors
>
>
>
>
> _______________________________________________________
> WEB.DE Video-Mail - Die E-Mail der n�chsten Generation!
> Jetzt testen: http://freemail.web.de/?mc=021198
>
_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
Yahoo! India Matrimony: Find your partner
online._______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors