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

[reSIProcate] SDP Parsing issue


Hi,

   I am using resiprocate-0.9.0-5019.

   I have created a SDP in the following way.

 Data = "" "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 = "" "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