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

来源:互联网 发布:家居装修 淘宝 编辑:程序博客网 时间:2024/05/16 13:05

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);

}

 

原创粉丝点击