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

Anthony Minessale anthony.minessale at gmail.com
Tue Feb 14 20:40:40 MSK 2012


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



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



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