I agree, it's not very efficient.

I think the way to avoid it would be to make
it STANDARD to always use the same TCP connection
for the duration of the call.  It seems that some
implementations use a separate TCP connection
for each transaction (and some for each SIP message)
but I don't think this is necessary.
I might be wrong - maybe it is necessary (to use
so many TCP connections) but I would like to hear
someone explain why.

And another question is - how should forking be
handled?

I think that all the forks should use the same
TCP socket as used by the original INVITE.
Otherwise this gets very complicated.

Attila

<http://www.vegastream.com>
VegaStream : A World of difference for your Integrated Communications



> -----Original Message-----
> From: James Ford [mailto:[EMAIL PROTECTED]]
> Sent: 23 January 2003 11:30
> To: [EMAIL PROTECTED]
> Subject: RE: [Sip-implementors] Closing TCP connections
> 
> 
> To my understanding this means that persistent connection can 
> be used for a 
> limited amount of time since the server can close it if it 
> wishes. A UA will 
> not be able to keep a connection open since the server can 
> close it after 
> the transaction terminates.
> If for example TLS is used to talk to an outbound proxy, each 
> call will have 
> to repeat the handshake process. I think this is not very 
> efficient. Is 
> there a way to avoid it?
> James
> 
> 
> 
> 
> 
> 
> >From: Attila Sipos <[EMAIL PROTECTED]>
> >To: 'Christian Stredicke' <[EMAIL PROTECTED]>, 
> >[EMAIL PROTECTED]
> >CC: 'Prithi Shetty' <[EMAIL PROTECTED]>, 'James Ford' 
> ><[EMAIL PROTECTED]>
> >Subject: RE: [Sip-implementors] Closing TCP connections
> >Date: Wed, 22 Jan 2003 09:08:38 -0000
> >
> > > > > Does the SIP standard specify who is responsible for
> > > > > closing tcp connections (client/server)?
> >
> >I don't think so.  It seems to me that, given some of
> >the implementations I've seen, anyone can close a
> >socket whenever they want.
> >
> >For example, one implementation I have seen would receive
> >an INVITE on one TCP connection, would close the socket
> >and open a new one to send the response!!  This is
> >very efficient (and maybe even illegal) I think.  Why
> >don't isn't the original TCP socket to send the INVITE
> >response?  Anyway, we handle this by replacing
> >the original TCP connection with the new one.
> >
> >For me, I can't see any reason to close a
> >socket until really necessary (like when the call is
> >over or when the other UA closes it or if the TCP
> >connection really is idle).  Each time a socket is
> >closed and opened, there is extra use of bandwidth
> >and processor time because the TCP layer has to close
> >or make the TCP connection.
> >
> >Anyway, we are still developing SIP over TCP and so
> >would welcome some more responses on this thread.
> >
> >Attila Sipos
> >
> ><http://www.vegastream.com>
> >VegaStream : A World of difference for your Integrated Communications
> >
> >
> > > -----Original Message-----
> > > From: Christian Stredicke [mailto:[EMAIL PROTECTED]]
> > > Sent: 22 January 2003 08:32
> > > To: [EMAIL PROTECTED]
> > > Cc: 'Prithi Shetty'; 'James Ford'
> > > Subject: Re: [Sip-implementors] Closing TCP connections
> > >
> > >
> > > We just keep the connection open for a little time (30 
> seconds or so).
> > > In many cases a new transaction to the same destination needs
> > > to be done
> > > and then it's already open. This speeds up communication 
> and causes
> > > little headache.
> > >
> > > CS
> > > --
> > > Dr.-Ing. Christian Stredicke
> > > sip:[EMAIL PROTECTED]
> > >
> > > > -----Urspr�ngliche Nachricht-----
> > > > Von: [EMAIL PROTECTED]
> > > [mailto:sip-implementors-
> > > > [EMAIL PROTECTED]] Im Auftrag von Prithi Shetty
> > > > Gesendet: Mittwoch, 22. Januar 2003 08:00
> > > > An: James Ford; [EMAIL PROTECTED]
> > > > Betreff: Re: [Sip-implementors] Closing TCP connections
> > > >
> > > > Hi James,
> > > >
> > > > TCP std does specify about connection closing, called
> > > > "four-way close connection".
> > > > Here, side X sends a FIN, to indicate that he has
> > > > nothing to send. The other guy Y receives this FIN and
> > > > sends an ACK. X sends an ACK on receiving Y's ACK.
> > > > Thats when  the connection actually closes
> > > >
> > > > TCP provides the ability for one end of the connection
> > > > to terminate its output, while still recving data from
> > > > the other end. This is called a half-close.
> > > > In case of client-server scenario, if client sends
> > > > FIN, and server still has data to be sent, then server
> > > > sends an ACK and continues to send the data. After
> > > > server is done with transmitting data, it sends a FIN
> > > > and waits for ACK. When client sends the ACK,
> > > > connection is closed.
> > > >
> > > >      Client             Server
> > > >         |               |
> > > >         |-----FIN------>|
> > > >         |               |
> > > >         |<----ACK-------|
> > > >         |               |
> > > >         |               |
> > > >         |<----DATA------|
> > > >         |               |
> > > >         |               |
> > > >         |<----FIN-------|
> > > >         |               |
> > > >         |-----ACK------>|
> > > >         |               |
> > > >
> > > > In case, server wants to close, it sends FIN and waits
> > > > for ACK. Since client has nothing else to do, it
> > > > replies an ACK, sends FIN and waits for the ACK. Upon
> > > > client receiving ACK, connection is finally closed.
> > > >
> > > > So now the SIP programming interface must provide a
> > > > way for the appln to say "I am done sending data,so
> > > > sending FIN to the other end. But I still want to recv
> > > > data from the other end, until it sends me FIN".
> > > >
> > > > Regards,
> > > > Prithi.
> > > >
> > > > --- James Ford <[EMAIL PROTECTED]> wrote:
> > > > > Hi,
> > > > > Does the SIP standard specify who is responsible for
> > > > > closing tcp connections
> > > > > (client/server)?
> > > > > To be more specific if a server transaction closes
> > > > > its TCP connection before
> > > > > termination it will be
> > > > > impossible to keep a persistent connection open to
> > > > > an outbound proxy for
> > > > > example.
> > > > > Thanks,
> > > > > James.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > 
> _________________________________________________________________
> > > > > The new MSN 8 is here: Try it free* for 2 months
> > > > > http://join.msn.com/?page=dept/dialup
> > > > >
> > > > > _______________________________________________
> > > > > Sip-implementors mailing list
> > > > > [EMAIL PROTECTED]
> > > > >
> > > > http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
> > > >
> > > >
> > > > __________________________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > > > http://mailplus.yahoo.com
> > > > _______________________________________________
> > > > Sip-implementors mailing list
> > > > [EMAIL PROTECTED]
> > > > http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
> > >
> > >
> > > _______________________________________________
> > > Sip-implementors mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
> > >
> 
> 
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> _______________________________________________
> Sip-implementors mailing list
> [EMAIL PROTECTED]
> http://lists.cs.columbia.edu/mailman/listinfo/sip-implementors
> 

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

Reply via email to