I am just beginning to implement SIP and am having some trouble
understanding the use of the port number in the VIA header  Please consider
the following two scenarios: 

1. Point-to-point SIP call, that does not go through a proxy: Consider the
case where my machine has multiple adapter and I can send and receive
messages on either one. However, I opt to do a listen on only one of the
adapters at a the default port. 

adapter A x.x.x.1 - listens on port 5060
adapter B x.x.x.2 - does not listen

Now if a sip call is placed, I would encode the VIA field to contain the IP
address of the adapter that I want the message to be received on. However,
if the message actually gets sent on the other adapter.Now the VIA header in
the INVITE is  
INVITE
..
VIA: x.x.x.1

The receiver adds the actual IP that the message was received from. The VIA
headers on the callee would look like this 
VIA: x.x.x.1, received:x.x.x.2

So now the response is going to get sent to a IP address and port combo,
that I am not listening on. 

My question is, how does SIP support a multiple adapter scenario such as
this, using the UDP as the transport? In this case, if the response was just
automatically sent to the IP and port that the request came from, it would
work. But the VIA header seems to add a level of confusion.

2. SIP call thru a proxy: If the caller is listening on a port other than
the default port, the port info is added to the VIA header.

Caller sends INVITE with VIA header
VIA: x.x.x.1: 5062

The proxy adds it own address to the VIA and send it to the Callee
VIA: y.y.y.y
VIA: x.x.x.x:5062

Now does the caller send the response to y.y.y.y:5062 or does he send it to
y.y.y.y and the default port? If the port sent to is 5062, and the proxy is
not listening on that port, we are again broken! Does this imply that the
proxy should start listening on all non-default ports that the callers use,
in order to work??

My interpretation of the protocol may be wrong. I would appreciate some
clarification on these issues.

Thanks
Mitu Aggarwal




_______________________________________________
Sip-implementors mailing list
[EMAIL PROTECTED]
http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors

Reply via email to