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

[reSIProcate] how to get "char *sdp_string" from "SdpContents sdp"?


Hi all
I know I can get "SdpContents sdp" from "char *sdp_string" by 
    SdpContents* sdp;     
    HeaderFieldValue* hfv;      
    Data* txt;    
    char *sdp_string = "v=...\r\no=...\r\nc=...\r\n........";
    txt = new Data(sdp_string);
    hfv = new HeaderFieldValue(txt->data(), txt->size());
    Mime type("application", "sdp");
    sdp = new SdpContents(hfv, type);

Now, in 
InviteSessionHandler::onAnswer(InviteSessionHandle, const SipMessage& msg, 
const SdpContents& sdp)
{
.............
}     
how to get "char *sdp_string" from "SdpContents sdp" ?

Waiting for your answer online.
Thank you very much.

ZhengChang
Beijing, China