[Freeswitch-users] SDP with 2 m=audio lines

Sergey Okhapkin sos at sokhapkin.dyndns.org
Tue Feb 14 21:40:33 MSK 2012


But RFC 3388 says (in 1. Introduction):

   An SDP session description typically contains one or more media lines
   - they are commonly known as "m" lines.  When a session description
   contains more than one "m" line, SDP does not provide any means to
   express a particular relationship between two or more of them.  When
   an application receives an SDP session description with more than one
   "m" line, it is up to the application what to do with them.  SDP does
   not carry any information about grouping media streams.


On Tuesday 14 February 2012 11:40:40 Anthony Minessale wrote:
> The word undefined does not even appear in that RFC.
> 
> RFC 2327 (the one that actually describes SDP) is the relevant one:
> 
> " A session description may contain a number of media descriptions.
>    Each media description starts with an "m=" field, and is terminated
>    by either the next "m=" field or by the end of the session
>    description.  A media field also has several sub-fields: "
> 
> 
> The ptime attribute cannot be applied to a single codec mentioned in a
> m= line it must apply to all of them.
> Once you have 2 different ptimes in the same description you have no
> choice but to split it into different m= lines for each sep ptime.
> 
> If you dislike this behavior then set:
> 
> sdp_m_per_ptime=false
> 
> either globally in vars.xml or in your dialplan on a per leg basis.
> 
> 
> 
> 
> 
> 
> 
> On Tue, Feb 14, 2012 at 7:39 AM, Sergey Okhapkin
> 
> <sos at sokhapkin.dyndns.org> wrote:
> > I noticed that recent freeswitch versions could send SDP with 2 m=audio
> > lines. Per RFC 3388, the behavior is undefined this case. I don't know
> > how to reproduce the problem, I see such packets coming from my
> > customers. Here is an example:
> > 
> > INVITE sip:xxxxxxxxxxxx at sip.callwithus.com SIP/2.0
> > ...
> > User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-eeeaf41 2012-02-10
> > 17-27-50 -0600 ....
> > 
> > v=0
> > o=FreeSWITCH 1329167961 1329167962 IN IP4 xx.xx.xx.xx
> > s=FreeSWITCH
> > c=IN IP4 xx.xx.xx.xx
> > t=0 0
> > m=audio 24598 RTP/AVP 0 101 13
> > a=rtpmap:101 telephone-event/8000
> > a=fmtp:101 0-16
> > a=ptime:30
> > m=audio 24598 RTP/AVP 98 0 8 3 101 13
> > a=rtpmap:98 SILK/8000
> > a=fmtp:98 useinbandfec=1; usedtx=0
> > a=rtpmap:101 telephone-event/8000
> > a=fmtp:101 0-16
> > a=ptime:20
> > 
> > 
> > Hmm, I just realized that this SDP is buggy - 2 audio streams on the
> > same
> > port, with common codecs, but with different ptime :-)
> > 
> > ________________________________________________________________________
> > _
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org
> > http://www.freeswitchsolutions.com
> > 
> > 
> > 
> > 
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> > 
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list