Commit 073a173c authored by garciay's avatar garciay
Browse files

STF467 corrections:

- Add new component variable for emergency service (support of urn)
- Add new PIXIT for security algorithms
- Consideration for AKA algorithm in respect to Credential calculation function
- Consideration for urn support in respect to f_setHeadersOnReceiptOfResponse function
- Support of contact header field in f_RemoveRegistration
- Use of key attribute for m_media_dynPT
- Consideration of encrypted SDP in MessageBody
parent f4c612a0
Loading
Loading
Loading
Loading
+45 −32
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ group ParameterOperations {
	 * @param p_userprofile to get important parameters
	 * @return Credentials field
	 */
	function f_calculatecCredentials_empty(in SipUserProfile p_userprofile) return Credentials
	function f_calculatecCredentials_empty(in SipUserProfile p_userprofile, in boolean p_algorithm:=false) return Credentials
	{
	  var template Credentials v_result;
	      
@@ -94,6 +94,7 @@ group ParameterOperations {
	  var charstring v_response := "";
	 
	  // Construct credentials for an Authorization field of a request.
	  if (not p_algorithm) {
          v_result :=
          {
            digestResponse :=
@@ -104,6 +105,19 @@ group ParameterOperations {
              { id := "nonce=""""", paramValue := omit }, // already enclosed to " characters
              { id := "response=""""", paramValue := omit } // already enclosed to " characters
          }}; 
	  } else {
          v_result :=
          {
            digestResponse :=
            {
              { id := "username", paramValue := v_username },
              { id := "realm", paramValue := v_realm },
              { id := "uri", paramValue := v_uri },
              { id := "nonce=""""", paramValue := omit }, // already enclosed to " characters
              { id := "response=""""", paramValue := omit }, // already enclosed to " characters
              { id := "algorithm=""""", paramValue := PX_AUTH_ALGORITHM } // already enclosed to " characters
          }};
	  }
	      
	  return valueof(v_result);
	}
@@ -331,7 +345,7 @@ group ParameterOperations {
		{
		  { id := "realm", paramValue := v_realm },
		  { id := "nonce", paramValue := "0edff6c521cc3f407f2d9e01cf6ed82b"},
		  { id := "algorithm", paramValue := c_algorithm }, // algorithm is not enclosed with " characters
		  { id := "algorithm", paramValue := PX_AUTH_ALGORITHM/*TODO To be removed c_algorithm*/ }, // algorithm is not enclosed with " characters
		  { id := "ck", paramValue := "00112233445566778899aabbccddeeff" },
		  { id := "ik", paramValue := "ffeeddccbbaa99887766554433221100" }, // already enclosed to " characters
		  { id := "qop="""&v_qop&"""", paramValue := omit }//qop
@@ -1734,16 +1748,15 @@ group SetHeaders {
	   }
	   else
	   {
           if (ischosen(vc_to.addressField.addrSpecUnion.components.sip))
           {
	     if (ischosen(vc_to.addressField.addrSpecUnion.components.sip)) { // sip/sips call
		   vc_reqHostPort := vc_to.addressField.addrSpecUnion.components.sip.hostPort;
    		 vc_requestUri := vc_to.addressField.addrSpecUnion;
	     } else if (ischosen(vc_to.addressField.addrSpecUnion.components.urn)) { // Emergency call
		   vc_reqUrnUri := vc_to.addressField.addrSpecUnion.components.urn;
	     } else {
	       log ("f_setHeadersOnReceiptOfResponse: unsupported field: ", vc_to);
	       setverdict(fail);
	     }
           else
           {
		 vc_requestUri := vc_to.addressField.addrSpecUnion;
             log("vc_reqHostPort not set due to no contact header and due to To header which is either tel or urn type.");
           }
	   }
	 }
	 
@@ -3755,11 +3768,11 @@ group Registration {
	  {
		f_setHeaders_deREGISTER(p_cSeq);
//TODO:  1st option
//		v_request := m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg,
//		p_cSeq,  vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization, "0");
//TODO: 2nd option
        v_request := m_REGISTER_Request_Base(vc_requestUri, vc_callIdReg,
        p_cSeq,  vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization);
		v_request := m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg,
		p_cSeq,  vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization, "0");
//TODO@  2nd option
//        v_request := m_REGISTER_Request_Base(vc_requestUri, vc_callIdReg,
//        p_cSeq,  vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization);
		//v_request.msgHeader.route := f_route();
		
		f_SendREGISTER(v_request);
@@ -3776,11 +3789,11 @@ group Registration {
				  // set headers via, cseq and authorization
				  f_setHeaders_2ndREGISTER(p_cSeq);
//                TODO: 1st option
//					v_request := m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg,
//					p_cSeq,  vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization, "0");
					v_request := m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg,
					p_cSeq,  vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization, "0");
//                  TODO: 2nd option
                    v_request := m_REGISTER_Request_Base(vc_requestUri, vc_callIdReg,
                    p_cSeq,  vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization);
//                    v_request := m_REGISTER_Request_Base(vc_requestUri, vc_callIdReg,
//                    p_cSeq,  vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization);
					//v_request.msgHeader.route := f_route();
				  // Re-send protected REGISTER
				  f_SendREGISTER(v_request);//LibSip