现在的位置: 首页 > 综合 > 正文

如何改写一个SIP Message中的SDP内容

2013年08月15日 ⁄ 综合 ⁄ 共 1126字 ⁄ 字号 评论关闭

The message here is either a Request or a Response.

The sample code is as below:

 

if(message.getContentLength() > 0)

{

       String contentType = message.getContentType();

       message.setContentType("text/plain"); //The SIP Container only can realize this type

       String sdpContent = message.getContent().toString();

       ......// OK,now it just need some operation on String,as the code below

        

       message.setContent(sdpContent,"text/plain");

       message.setContentType(contentType);

}

 

抱歉!评论已关闭.