SessionDescriptor { public void exclude(MediaType mediaType, Format fmt) { for (int i = 0; i < count; i++) { if (md[i].getMediaType() == mediaType) { md[i].exclude(fmt); } } } SessionDescriptor(String sdp);  SessionDescriptor(String sdp, boolean processMandatoryFields);  SessionDescriptor(); String getVersion(); Origin getOrigin(); String getSession(); void setSession(String session); Connection getConnection(); int getMediaTypeCount(); MediaDescriptor getMediaDescriptor(int i); MediaDescriptor getMediaDescriptor(MediaType mediaType); void createOrigin(String name, String sessionID,
            String sessionVersion, String networkType, String addressType,
            String address); void createConnection(String networkType, String addressType,
            String address); MediaDescriptor addMedia(MediaType mediaType, int port); void exclude(MediaType mediaType, Format fmt); void exclude(String formatName); boolean contains(String encoding); boolean containsMedia(String mediaType); @Override String toString();  }
@Test public void testExclude() { String sdp = "v=0\n" + "o=- 16410075 16410075 IN IP4 127.0.0.1\n" + "s=Mobicents Media Server\n" + "c=IN IP4 127.0.0.1\n" + "t=0 0\n" + "m=audio 1186 RTP/AVP 0 101\n" + "a=rtpmap:0 pcmu/8000\n" + "a=rtpmap:101 telephone-event/8000\n" + "a=fmtp:101 0-15\n" + "a=control:audio\n" + "a=silenceSupp:off\n"; SessionDescriptor sd = new SessionDescriptor(sdp); sd.exclude(MediaType.AUDIO, AVProfile.DTMF); String s = sd.toString(); System.out.println(s); assertEquals(-1, s.indexOf("101")); assertEquals(-1, s.indexOf("telephone-event")); }