*** sdp.c	Mon Apr 28 17:46:41 2014
--- /usr/src/opensipg/trunk/src/rtpengine/daemon/sdp.c	Tue Apr 29 22:15:26 2014
***************
*** 1670,1680 ****
  			}
  		}
  
! 		if (session->origin.parsed && flags->replace_origin) {
  			if (replace_network_address(chop, &session->origin.address, ps, flags))
  				goto error;
  		}
! 		if (session->connection.parsed && sess_conn) {
  			if (replace_network_address(chop, &session->connection.address, ps, flags))
  				goto error;
  		}
--- 1670,1682 ----
  			}
  		}
  
! 		if (session->origin.parsed && flags->replace_origin &&
! 		    !flags->ice_force_relay) {
  			if (replace_network_address(chop, &session->origin.address, ps, flags))
  				goto error;
  		}
! 		if (session->connection.parsed && sess_conn &&
! 		    !flags->ice_force_relay) {
  			if (replace_network_address(chop, &session->connection.address, ps, flags))
  				goto error;
  		}
***************
*** 1703,1718 ****
  				goto error;
  			ps = j->data;
  
! 			if (replace_media_port(chop, sdp_media, ps))
! 				goto error;
! 			if (replace_consecutive_port_count(chop, sdp_media, ps, j))
! 				goto error;
! 			if (replace_transport_protocol(chop, sdp_media, call_media))
! 				goto error;
! 
! 			if (sdp_media->connection.parsed) {
! 				if (replace_network_address(chop, &sdp_media->connection.address, ps, flags))
! 					goto error;
  			}
  
  			if (process_media_attributes(chop, sdp_media, flags, call_media))
--- 1705,1722 ----
  				goto error;
  			ps = j->data;
  
! 			if (!flags->ice_force_relay) {
!   			        if (replace_media_port(chop, sdp_media, ps))
! 				        goto error;
!       			        if (replace_consecutive_port_count(chop, sdp_media, ps, j))
! 				        goto error;
! 				if (replace_transport_protocol(chop, sdp_media, call_media))
! 				        goto error;
! 
! 				if (sdp_media->connection.parsed) {
! 				        if (replace_network_address(chop, &sdp_media->connection.address, ps, flags))
! 					        goto error;
! 				}
  			}
  
  			if (process_media_attributes(chop, sdp_media, flags, call_media))
