[reSIProcate] SDP Parsing issue
Scott Godin
slgodin at icescape.com
Wed Aug 31 07:54:52 CDT 2005
Here is a note from RFC2327. t= line before c= line is not valid.
Some lines in each description are required and some
are optional but all must appear in exactly the order given here (the
fixed order greatly enhances error detection and allows for a simple
parser). Optional items are marked with a `*'.
Session description
v= (protocol version)
o= (owner/creator and session identifier).
s= (session name)
i=* (session information)
u=* (URI of description)
e=* (email address)
p=* (phone number)
c=* (connection information - not required if included in all
media)
b=* (bandwidth information)
One or more time descriptions (see below)
z=* (time zone adjustments)
k=* (encryption key)
a=* (zero or more session attribute lines)
Zero or more media descriptions (see below)
Time description
t= (time the session is active)
r=* (zero or more repeat times)
Media description
m= (media name and transport address)
i=* (media title)
c=* (connection information - optional if included at
session-level)
b=* (bandwidth information)
k=* (encryption key)
a=* (zero or more media attribute lines)
________________________________
From: resiprocate-devel-bounces at list.sipfoundry.org
[mailto:resiprocate-devel-bounces at list.sipfoundry.org] On Behalf Of
shailesh
Sent: Wednesday, August 31, 2005 8:27 AM
To: resiprocate-devel at list.sipfoundry.org
Subject: [reSIProcate] SDP Parsing issue
Hi,
I am using resiprocate-0.9.0-5019.
I have created a SDP in the following way.
Data = txt( "v=0\r\n"
"o=9050 10552817 10552817 IN IP4 192.168.0.158\r\n"
"s=NIRAJ\r\n"
"t=0 0\r\n"
"c=IN IP4 192.168.0.158\r\n"
"m=audio 8500 RTP/AVP 0 101\r\n"
"a=rtpmap:0 PCMU/8000\r\n"
"a=rtpmap:101 telephone-event/8000\r\n"
"a=fmtp:101 0-15\r\n"
"a=sendrecv\r\n");
HeaderFieldValue hfv(txt.data(), txt.size());
Mime type("application", "sdp");
SdpContents sdp(&hfv, type);
When i am trying to print connection address
CritLog(<<sdp.session().connection().getAddress());
It returns empty.
Now i have changed the sequence and replaced c= and t= each other so new
SDP is
Data = txt( "v=0\r\n"
"o=9050 10552817 10552817 IN IP4 192.168.0.158\r\n"
"s=NIRAJ\r\n"
"c=IN IP4 192.168.0.158\r\n"
"t=0 0\r\n"
"m=audio 8500 RTP/AVP 0 101\r\n"
"a=rtpmap:0 PCMU/8000\r\n"
"a=rtpmap:101 telephone-event/8000\r\n"
"a=fmtp:101 0-15\r\n"
"a=sendrecv\r\n");
Now doing
CritLog(<<sdp.session().connection().getAddress());
gives "192.168.0.158".
Can anybody tell me why..Resiprocate behaves in this way ??
Any guess ???
Regards,
Niraj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20050831/8ecd5d99/attachment.htm>
More information about the resiprocate-devel
mailing list