< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Resiprocate having trouble parsing this (legal) SDP


A remote host is sending me the following SDP in a sip message
(hereafter stored as SipMessage msg):

v=0
o=PVG 0 0 IN IP4 189.173.77.70
s=-
c=IN IP4 189.173.77.70
a=sqn: 0
a=cdsc: 1 audio RTP/AVP 8 0 116 18 13 101
a=cpar: a=rtpmap:116 AAL2-G726-32/8000
a=cpar: a=rtpmap:101 telephone-event/8000
a=cpar: a=fmtp:101 0-15
a=cpar: a=ptime:10
a=cpar: a=ptime:20
a=cpar: a=fmtp:18 annexb=yes
t=0 0
m=audio 54098 RTP/AVP 0 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20


But, if I do the following:

                        body = msg.getContents()->getBodyData();
                        body_sdp = (char *)body.c_str();

the variable body_sdp contains:

v=0
o=PVG 0 0 IN IP4 189.173.77.70
s=-
c=IN IP4 189.173.77.70
t=0 0
a=cpar: a=rtpmap:116 AAL2-G726-32/8000
a=cpar: a=rtpmap:101 telephone-event/8000
a=cpar: a=fmtp:101 0-15
a=cpar: a=ptime:10
a=cpar: a=ptime:20
a=cpar: a=fmtp:18 annexb=yes
a=cdsc: 1 audio RTP/AVP 8 0 116 18 13 101
a=sqn: 0

Note that the a= lines appear in reverse order, and everything after
the last one in a row in the original message is discarded.  In
particular, the m= line is not present, and that keeps me from
figuring out what the port is.  I'm not seeing any exceptions or
anything, but I may not be looking hard enough.

Any idea what is going on here?

thanks,
 Shaun