Re: [Sip] SIP level bundeling

Iñaki Baz Castillo <ibc@aliax.net> Mon, 30 May 2011 10:35 UTC

Return-Path: <ibc@aliax.net>
X-Original-To: sip@ietfa.amsl.com
Delivered-To: sip@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 79635E0704 for <sip@ietfa.amsl.com>; Mon, 30 May 2011 03:35:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.334
X-Spam-Level:
X-Spam-Status: No, score=-2.334 tagged_above=-999 required=5 tests=[AWL=-0.257, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_42=0.6, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hrwXtjSXIcql for <sip@ietfa.amsl.com>; Mon, 30 May 2011 03:35:18 -0700 (PDT)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by ietfa.amsl.com (Postfix) with ESMTP id BD5F8E0789 for <sip@ietf.org>; Mon, 30 May 2011 03:35:18 -0700 (PDT)
Received: by qwc23 with SMTP id 23so2281900qwc.31 for <sip@ietf.org>; Mon, 30 May 2011 03:35:18 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.181.142 with SMTP id by14mr3328302qcb.247.1306751717722; Mon, 30 May 2011 03:35:17 -0700 (PDT)
Received: by 10.229.225.136 with HTTP; Mon, 30 May 2011 03:35:17 -0700 (PDT)
In-Reply-To: <677679.62685.qm@web94808.mail.in2.yahoo.com>
References: <677679.62685.qm@web94808.mail.in2.yahoo.com>
Date: Mon, 30 May 2011 12:35:17 +0200
Message-ID: <BANLkTinEqXJyLYw_canwOUkKNiUxoRRRTA@mail.gmail.com>
From: Iñaki Baz Castillo <ibc@aliax.net>
To: atul garg <shivalk_80@yahoo.co.in>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: sip@ietf.org
Subject: Re: [Sip] SIP level bundeling
X-BeenThere: sip@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Session Initiation Protocol <sip.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sip>, <mailto:sip-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/sip>
List-Post: <mailto:sip@ietf.org>
List-Help: <mailto:sip-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sip>, <mailto:sip-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 30 May 2011 10:35:19 -0000

2011/5/30 atul garg <shivalk_80@yahoo.co.in>
>
> Hello,
>
> I was supposed to do some implementation for the SIP message coming over TCP, I ahve few questions in following cases-

Hi, please ask this kind of questions in sip-implementors maillist
rather than here. Anyhow I reply below:


> 1) I read that many SIP messages can be bundelled into one TCP packet, -
>       a) In this case, does all message belong to same SIP call(ie. same call id) - if so then when practiacally it is possible???

Like in *any* protocol (or lot of) on top of TCP, multiple protocol
messages can arrive within same TCP stream. In fact, you could receive
even just incomplete fragments of a message and then must wait until
the rest arrives.

So, when a SIP message (request/response) arrives within a TCP stream
you MUST treat it as separate message and NEVER assume it belongs to
the same call/dialog as a previous message.

Imagine a TCP connection between two proxies. There can be multiple
dialogs/transactions over the same TCP connection at the same time.



>       b) If these sip messages are of different calls, then again what would be the scenario where IP and TCP level addresses are same but still messgaes are of different calls.( How UCA and UAS - multiple SIP session at same port ???)

Proxy A ----> Proxy B  is a good example.

Proxy ----> MediaServer  as well.

But in general you MUST NOT assume that a TCP connection just carries
a single dialog, that is a big fail.



> 2) In case of SIP fregmanmtion, I guess as TCP does not know the logical intelligence of SIP message, therefore sip message can be fregmented at any location even in between sip header, before call is ..... am i correct ...

Of course. TCP is not message boundary so the receiver must buffer the
received data until it becomes a valid SIP message (it could drop the
connection if it takes so long as it could be an attack).



--
Iñaki Baz Castillo
<ibc@aliax.net>