Commit c317aadf authored by rennoch's avatar rennoch
Browse files

update of reason header field type and templates etc.

parent ff6f7ad1
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1122,7 +1122,11 @@ import from LibCommon_VerdictControl all;
		  { 
			TResp.stop;
			if (ispresent(v_Response.msgHeader.reason) and (loc_cause > 0))
				{if (v_Response.msgHeader.reason.cause != loc_cause) {setverdict(fail);}};		
				{if ( not ispresent(v_Response.msgHeader.reason.reasonValues[0].reasonParams[0].paramValue) or
					  (v_Response.msgHeader.reason.reasonValues[0].reasonParams[0].paramValue != int2char(loc_cause))
					) 
					{setverdict(fail);}
				};		

			f_setHeadersOnReceiptOfResponse(v_CSeq, v_Response); 
			if (doAck) {f_sendACK(v_CSeq);};
@@ -1210,7 +1214,11 @@ import from LibCommon_VerdictControl all;
		  { 
			TResp.stop;
			if (ispresent(v_Response.msgHeader.reason) and (loc_cause > 0))
				{if (v_Response.msgHeader.reason.cause != loc_cause) {setverdict(fail);}};		
			{if ( not ispresent(v_Response.msgHeader.reason.reasonValues[0].reasonParams[0].paramValue) or
						(v_Response.msgHeader.reason.reasonValues[0].reasonParams[0].paramValue != int2char(loc_cause))
				) 
				{setverdict(fail);}
			};	

			f_setHeadersOnReceiptOfResponse(v_CSeq, v_Response); 
			if (doAck) {f_sendACK(v_CSeq);};
+40 −10
Original line number Diff line number Diff line
@@ -532,20 +532,49 @@ group Headers
	  viaParams:={{id :=BRANCH_ID,paramValue :=branch_val}}
	}

//	template Reason m_Reason(integer loc_cause) :=
//		{		  
//			fieldName := REASON_E,
//			protocol := "Q.850",
//			cause := loc_cause,
//			reasonText := ""
//		}; // axr: this was according to the old Reason type
	
	template GenericParam m_Cause (template charstring loc_cause):=
		{id:="cause", paramValue:=loc_cause}

	template GenericParam m_Text (template charstring loc_text):=
		{id:="text", paramValue:=loc_text}

	template SemicolonParam_List m_ReasonParams
			(template charstring loc_cause, template charstring loc_text) :=
		{m_Cause(loc_cause),m_Text(loc_text)};

	template ReasonValue m_ReasonValue
			(template charstring loc_cause, template charstring loc_text) :=
		{		  
			token := "Q.850",
			reasonParams := m_ReasonParams(loc_cause,loc_text)
		};
		
	template Reason m_Reason(integer loc_cause) :=
		{		  
			fieldName := REASON_E,
			protocol := "Q.850",
			cause := loc_cause,
			reasonText := ""
			reasonValues := {m_ReasonValue(int2str(loc_cause),"dummy")}
		};
		
//	template Reason mw_Reason(integer loc_cause) :=
//		{		  
//			fieldName := REASON_E,
//			protocol := "Q.850",
//			cause := loc_cause,
//			reasonText := ?
//		}; // axr: this was according to the old Reason type
		
	template Reason mw_Reason(integer loc_cause) :=
		{		  
			fieldName := REASON_E,
			protocol := "Q.850",
			cause := loc_cause,
			reasonText := ?
			reasonValues := {m_ReasonValue(int2str(loc_cause),?)}
		};
				
	template CallId mw_any_CallId :=
@@ -3250,9 +3279,10 @@ group Responses
		statusLine := {sipVersion := SIP_NAME_VERSION, statusCode := 603, reasonPhrase := "Decline"},
		msgHeader := {reason := 		{		  
			fieldName := REASON_E,
			protocol := "Q.850",
			cause := 21,
			reasonText := "call reject"
			reasonValues := {m_ReasonValue(int2str(21),"call reject")}
//			protocol := "Q.850",
//			cause := 21,
//			reasonText := "call reject"
			}
		}
	}
+19 −7
Original line number Diff line number Diff line
@@ -896,12 +896,24 @@ group SubTypes{// Subtypes
		  charstring method
	  }

	  // [3326] //note-axr: to be refined
//	  // [3326] //note-axr: to be refined
//	  type record Reason {
//		  FieldName fieldName(REASON_E),
//		  charstring protocol,
//		  integer cause,
//		  charstring reasonText
//	  }
	  
		type record of ReasonValue ReasonValues;
  
		type record ReasonValue {
		charstring token,
		SemicolonParam_List reasonParams optional
				} 	  
  
		type record Reason {
		FieldName fieldName(REASON_E),
		  charstring protocol,
		  integer cause,
		  charstring reasonText
		ReasonValues reasonValues
		} 

	  // [3325] //note-axr: to be refined