Re: [Sip] Codec Negotiation and renegotiataion

Paul Kyzivat <pkyzivat@alum.mit.edu> Wed, 13 July 2011 17:01 UTC

Return-Path: <pkyzivat@alum.mit.edu>
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 A7E2F11E8144 for <sip@ietfa.amsl.com>; Wed, 13 Jul 2011 10:01:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.532
X-Spam-Level:
X-Spam-Status: No, score=-2.532 tagged_above=-999 required=5 tests=[AWL=0.067, BAYES_00=-2.599]
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 RIJUeNHJS0S4 for <sip@ietfa.amsl.com>; Wed, 13 Jul 2011 10:01:47 -0700 (PDT)
Received: from qmta15.westchester.pa.mail.comcast.net (qmta15.westchester.pa.mail.comcast.net [76.96.59.228]) by ietfa.amsl.com (Postfix) with ESMTP id D362111E80BD for <sip@ietf.org>; Wed, 13 Jul 2011 10:01:46 -0700 (PDT)
Received: from omta24.westchester.pa.mail.comcast.net ([76.96.62.76]) by qmta15.westchester.pa.mail.comcast.net with comcast id 7Utc1h0021ei1Bg5FV1nuk; Wed, 13 Jul 2011 17:01:47 +0000
Received: from Paul-Kyzivats-MacBook-Pro.local ([24.62.109.41]) by omta24.westchester.pa.mail.comcast.net with comcast id 7V1l1h00J0tdiYw3kV1mQK; Wed, 13 Jul 2011 17:01:46 +0000
Message-ID: <4E1DCF77.2010806@alum.mit.edu>
Date: Wed, 13 Jul 2011 13:01:43 -0400
From: Paul Kyzivat <pkyzivat@alum.mit.edu>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
To: sip@ietf.org
References: <1310570980.43882.YahooMailClassic@web94802.mail.in2.yahoo.com>
In-Reply-To: <1310570980.43882.YahooMailClassic@web94802.mail.in2.yahoo.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Subject: Re: [Sip] Codec Negotiation and renegotiataion
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: Wed, 13 Jul 2011 17:01:47 -0000

On 7/13/11 11:29 AM, atul garg wrote:
> Hello All,
> I have very basic question regarding the codec negotiation in SIP, I
> will try to summarize my queries below -
> 1) If A is initiating the call and sending the supported codec list say
> (1,2,3)
> A --> INVITE (SDP-> audio 1 2 3) --> B ( B supports 1 , 3, 5)
> A <-- 200 OK ( SDP -> what will be here 1, 2 ,3 OR 1, 3, 5) <-- B
> if it is 1, 3, 5 then what will be the response to B ??

The answer could include 1; 1,3; 1,3,5; or I suppose 1,5; 3,5.

A doesn't "respond" to B.
If the answer contains both 1,3 then A could use either 1, 3, or both 
when sending to B, and B can use either 1, 3, or both when sending to A.
So if B only wants to use one codec it would be well advised to only 
mention one in the answer.

If B mentioned codec 5, it isn't really useful immediately. Its just an 
FYI for A. It could be treated as a hint, in case A does support 5 and 
just didn't mention it.

> 2) If A is initiating the call and sending the supported codec list say
> (1,2,3)
> A --> INVITE (SDP-> audio 1 2 3) --> B ( B supports 2 , 3, 5)
> A <-- 200 OK ( SDP -> what will be here 2 , 3 OR 2 , 3, 5) <-- B
> if it is 2 , 3 then what will be the response to B ??
> if it is 2 , 3, 5 then what will be the response to B ??

This isn't much different from (1).
B could answer with any of the things you say.

> 3) If A is initiating the call and sending the supported codec list say
> (1,2,3)
> A --> INVITE (SDP-> audio 1 2 3) --> B ( B supports 4, 5,6)
> A <-- 200 OK ( SDP -> what will be here ??) <-- B

Typically B would respond with 488.
If it wants, it could respond 200 and refuse the media stream (port 0).
That is probably not a good idea unless it has further plans - e.g. to 
make another offer of some sort.

> and what will be the d behaviour of A ....

If the response is 488, A gives up.
If response is 200 with refused media, it might want to wait and see 
what happens next. Or else it might as well send a BYE.

> 4) Re-Negotiation -
> If A is initiating the call and sending the supported codec list say (1,2,3)
> A --> INVITE (SDP-> audio 1 2 3) --> B ( B supports 1 , 2, 3)
> A <-- 200 OK ( SDP audio1, 2 ,3 <-- B
> A --> ACK --> B
> ( I guess the rtp will use codec 1)

rtp could be 1, 2, 3, or a combination.

> Now during the call say A wants to change the codec to 2, will it send
> the re-invite or SDP session has some provision for it( I just want to
> confirm, is it possible to change the codec without sending any SIP message)
> PS: I know i have made a lengthy mail, but it is very much required for
> me to understand some network behaviour and implementation.

If 1,2,3 negotiated, it can just start using 2.

But I think this will break a number of implementations that make 
unjustified assumptions. I know there are big vendors with products that 
can only support one codec and must renegotiate to switch, and assume 
the first one in the answer is the one to be used.

So you would be well advised to send a new offer with just 2 if that is 
the one you want to use.

	Thanks,
	Paul

> Regards
> Atul
>
>
>
> _______________________________________________
> Sip mailing list  https://www.ietf.org/mailman/listinfo/sip
> This list is essentially closed and only used for finishing old business.
> Use sip-implementors@cs.columbia.edu for questions on how to develop a SIP implementation.
> Use dispatch@ietf.org for new developments on the application of sip.
> Use sipcore@ietf.org for issues related to maintenance of the core SIP specifications.