def upgradeSDP(currentSession, newSDP): "Read the media description from the new SDP and update the current session by removing the current media." sdp = SDP(currentSession) if newSDP.ipaddr: c = (newSDP.nettype, newSDP.addrfamily, newSDP.ipaddr) sdp.nettype, sdp.addrfamily, sdp.ipaddr = c sdp.mediaDescriptions = newSDP.mediaDescriptions sdp._o_version = str(int(sdp._o_version) + 1) return sdp