Commit 247495c0 authored by rennoch's avatar rennoch
Browse files

consider omitted SDP direction attribute "sendrecv"

parent 6b440c23
Loading
Loading
Loading
Loading
+24 −6
Original line number Diff line number Diff line
@@ -2369,8 +2369,19 @@ group SDPOperations{
	function f_SIP_checksetSDPreqDirection(template SDP_attribute p_direction_in, template SDP_attribute p_direction_out) runs on SipComponent
	{	var template SDP_attribute v_direction_out := p_direction_out;
		// check incoming SDP attribute
		if (not (ispresent(vc_request.messageBody) and f_check_attribute(vc_request.messageBody.sdpMessageBody,p_direction_in))) 
			{setverdict(fail);};
		if (not (ispresent(vc_request.messageBody) and (f_check_attribute(vc_request.messageBody.sdpMessageBody,p_direction_in)
			))) 
			{if (
			    match(mw_attribute_sendrecv,p_direction_in) and
			    not(f_check_attribute(vc_request.messageBody.sdpMessageBody,mw_attribute_sendrecv) or
                 f_check_attribute(vc_request.messageBody.sdpMessageBody,mw_attribute_sendonly) or
                 f_check_attribute(vc_request.messageBody.sdpMessageBody,mw_attribute_recvonly) or
                 f_check_attribute(vc_request.messageBody.sdpMessageBody,mw_attribute_inactive)
			    )
			    ){
				log("no direction attributes with expectation: ", p_direction_in)			
				}
			    else {setverdict(fail);};};
  		if (match(omit,p_direction_out))//not isvalue(v_direction_out))//MRO
			{v_direction_out := f_get_attribute_answer(vc_request.messageBody.sdpMessageBody, p_direction_in);}
		f_SIP_modMediaDirection(1, v_direction_out); // handling of attribute in media description
@@ -2452,6 +2463,13 @@ group SDPOperations{
	*/
	function f_copy_SDP() runs on SipComponent
	{
		if (ispresent(vc_sdp_remote.connection))
				{vc_sdp_local.connection := vc_sdp_remote.connection}
			else {vc_sdp_local.connection := omit};
			
        vc_sdp_local.origin := vc_sdp_remote.origin;
        vc_sdp_local.session_name := vc_sdp_remote.session_name;
			
        if (ispresent(vc_sdp_remote.bandwidth))
                {vc_sdp_local.bandwidth := vc_sdp_remote.bandwidth}
            else {vc_sdp_local.bandwidth := {}};