Commit edd9fda7 authored by pintar's avatar pintar
Browse files

changes done in week 10 2011 when validation was done on SUT Italtel AS

parent 4d2395d0
Loading
Loading
Loading
Loading
+1110 −725

File changed.

Preview size limit exceeded, changes collapsed.

+157 −58
Changes for CDIV/CDIV_Templates.ttcn: 157 added lines, 58 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@ module CDIV_Templates{
    
    import from LibSip_XMLTypes all;

    import from LibIms_SIPTypesAndValues {type ImsInterfaceProfile;}
    
    import from http_uri_etsi_org_ngn_params_xml_comm_div_info language "XSD" all
    with {
        extension "File:../xsd/CDIVN.xsd"
@@ -26,6 +28,7 @@ group MessageTemplates{
        To p_to, 
        Via p_via, 
        Contact p_contact,
        Route p_route,
        template HistoryInfo p_historyInfo,
        MessageBody p_mb
    ) modifies m_INVITE_Request_Base := {
@@ -38,7 +41,8 @@ group MessageTemplates{
                fieldName := CONTENT_TYPE_E, 
                mediaType :=  c_sdpAplication
            },
            historyInfo := p_historyInfo
            historyInfo := p_historyInfo,
            route := p_route
        },
        messageBody := p_mb
    }
@@ -51,6 +55,7 @@ group MessageTemplates{
        To p_to, 
        Via p_via, 
        Contact p_contact,
        Route p_route,
        template HistoryInfo p_historyInfo,
        template Privacy p_privacy,
        MessageBody p_mb
@@ -65,6 +70,7 @@ group MessageTemplates{
                mediaType :=  c_sdpAplication
            },
            historyInfo := p_historyInfo,
            route := p_route,
            privacy := p_privacy
        },
        messageBody := p_mb
@@ -78,6 +84,41 @@ group MessageTemplates{
        }
    }
    
    template INVITE_Request mw_INVITE_Request_ReqLineCause_CDIV(
            template GenericParam p_generic_param, template HistoryInfo p_historyInfo
    ) modifies mw_INVITE_Request_Base := {
        requestLine	:={
            requestUri := {
                scheme := c_sipScheme,  			// contains "sip"
                userInfo := *,
                hostPort := ?,
                urlParameters := {p_generic_param},
                headers := *
                }
            },
        msgHeader := {
            historyInfo := p_historyInfo
        }
    }
    
    template INVITE_Request mw_INVITE_Request_ReqLineCause_To_CDIV(
            template GenericParam p_generic_param, template charstring p_toNumber ,template charstring p_toHost, template HistoryInfo p_historyInfo
    ) modifies mw_INVITE_Request_Base := {
        requestLine	:={
            requestUri := {
                scheme := c_sipScheme,  			// contains "sip"
                userInfo := *,
                hostPort := ?,
                urlParameters := {p_generic_param},
                headers := *
                }
            },
        msgHeader := {
            toField := mw_To(mw_SipUrl_NumHost(p_toNumber,p_toHost,*)),
            historyInfo := p_historyInfo
        }
    }
    
    template MESSAGE_Request m_MESSAGE_Request_CDIV (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template HistoryInfo p_historyInfo) modifies m_MESSAGE_Request_Base :=
    {
        msgHeader :=
@@ -131,6 +172,23 @@ group MessageTemplates{
        }
    }
    
    template CANCEL_Request mw_CANCEL_Request_Reason(template CallId p_callId, template charstring p_cause) modifies mw_CANCEL_Request_Base :=
    {
        msgHeader :=
        {
            reason := {
                fieldName := REASON_E,
            	reasonValues := {{ 
                    token := "SIP",
                    reasonParams := {{
                        id:="cause", paramValue:=p_cause
                    }}
            		//mw_Reason(p_cause)
            	}}
            }
        }
    }
    
    template Response m_Response_history (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
      From p_from, To p_to, Via p_via, template HistoryInfo p_historyInfo) modifies m_Response_Base:=
    {
@@ -147,16 +205,46 @@ group MessageTemplates{
            }
    }
    
    template Response m_Response_history_mbody_pAsserted (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
    	From p_from, To p_to, Via p_via,  template Route p_route, template RecordRoute p_recordroute, template MessageBody p_mb, 
    	template HistoryInfo p_historyInfo, template PAssertedID p_pAssertedID) modifies m_Response_mbody:=
    template Response m_Response_history_pAsserted (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
        From p_from, To p_to, Via p_via, Contact p_contact, 
        template HistoryInfo p_historyInfo, template PAssertedID p_pAssertedID) modifies m_Response_Base:=
    {
        msgHeader :={
        msgHeader :=
            {
                contact		:= p_contact,
                maxForwards := omit,
                historyInfo := p_historyInfo,
                pAssertedID := p_pAssertedID
            }
    }
    
    template Response m_Response_history_mbody_pAsserted (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
        From p_from, To p_to, Via p_via, Contact p_contact, template RecordRoute p_recordRoute, template MessageBody p_mb, 
        template HistoryInfo p_historyInfo, template PAssertedID p_pAssertedID) modifies m_Response_Base:=
    {
        msgHeader :=
            {
                contact		:= p_contact,
                contentLength	:= {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
                contentType := {fieldName := CONTENT_TYPE_E, mediaType :=  c_sdpAplication},
                maxForwards := omit,
                recordRoute := p_recordRoute,//for INVITE response
                historyInfo := p_historyInfo,
                pAssertedID := p_pAssertedID
            },
            messageBody := p_mb
    }
    
//    template Response m_Response_history_mbody_pAsserted (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
//    	From p_from, To p_to, Via p_via,  template Route p_route, template RecordRoute p_recordroute, template MessageBody p_mb, 
//    	template HistoryInfo p_historyInfo, template PAssertedID p_pAssertedID) modifies m_Response_mbody:=
//    {
//        msgHeader :={
//            historyInfo := p_historyInfo,
//            pAssertedID := p_pAssertedID
//            }
//    }
    
    template Response mw_Response_CDIV(template StatusLine p_statusLine, template CallId p_callId,
    	template CSeq p_cSeq, template HistoryInfo p_historyInfo, template PAssertedID p_pAssertedID, template Privacy p_privacy
    ) modifies mw_Response_Base := {
@@ -167,14 +255,6 @@ group MessageTemplates{
        }
    }
    
    template Response m_Response_warning (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
      From p_from, To p_to, Via p_via, template Warning p_warning) modifies m_Response_Base:=
    {
        msgHeader :={
            warning 		:= p_warning
            }
    }
    
    template Response mw_Response_warning (template StatusLine p_statusLine, template CallId p_callId,
    	template CSeq p_cSeq, template Warning p_warning) modifies mw_Response_Base:=
	{
@@ -185,72 +265,91 @@ group MessageTemplates{
	}
}//end group MessageTemplates

    template Warning m_warning486 := {
      fieldName := WARNING_E,
      warningValue := {
    template ReferTo mw_ReferTo_SipUrl(template SipUrl p_sipUrl) := 
    {
          warnCode := 486,
          warnAgent := {
            hostPort := {
              host := "ETSI",
              portField := omit
            }
          },
          warnText := "Busy Here"
        }
      }
        fieldName := REFER_TO_E,
        nameAddr :={displayName := *, addrSpec:=p_sipUrl},
        referToParams := {{id:="method",paramValue :=*}}
    }
		
    template Warning m_warning480 := {
      fieldName := WARNING_E,
      warningValue := {
    template SipUrl m_SipUrl_NumHostParam(template charstring p_number, template charstring p_host, template SemicolonParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
    {
          warnCode := 480,
          warnAgent := {
            hostPort := {
              host := "ETSI",
              portField := omit
            }
            scheme := c_sipScheme,  		//*  contains "sip"
            userInfo:= {userOrTelephoneSubscriber:=p_number, password:=omit},
            hostPort := {host:=p_host, portField:=c_defaultSipPort},
            urlParameters := p_urlParameters,
            headers := omit
    };
			
    template GenericParam mw_Privacy_gen (template charstring p_privacy):=
        {id:="privacy", paramValue:= pattern "*{p_privacy}*"}
    

	
    template Route m_route_interface_CDIV (in ImsInterfaceProfile p_interfaceprofile,in SipUserProfile p_userprofile, charstring p_destination):=
    {   
        fieldName := ROUTE_E,
        routeBody := {{nameAddr := {displayName := omit, 
                                   addrSpec := 	{scheme := c_sipScheme,  			// contains "sip"
                                                userInfo := omit,
                                                hostPort := {host:=p_interfaceprofile.SUTHomeDomain, portField:= omit},
                                                urlParameters := {{"call",p_destination},{"lr",omit}},
                                                headers := omit}
                                   },
          warnText := "Temporary Unavailable"
        }
      }
    }
                      rrParam := omit},
                    {nameAddr := {displayName := omit, 
                                   addrSpec := 	{scheme := c_sipScheme,  			// contains "sip"
                                                userInfo := omit,
                                                hostPort := {host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort},
                                                urlParameters := {{"call",p_destination},{"lr",omit}},
                                                headers := omit}
                                               },
                      rrParam := omit}
    }};
    
    template Warning m_warning302 := {
      fieldName := WARNING_E,
      warningValue := {
    template NameAddr mw_NameAddr_DName_User_Host(template charstring p_dn, template charstring p_user, template charstring p_host) := 
    {
          warnCode := 302,
          warnAgent := {
            hostPort := {
              host := "ETSI",
              portField := omit
            }
        displayName := p_dn,
        addrSpec :=
        {
            scheme := c_sipScheme,  //*  contains "sip"
            userInfo := {userOrTelephoneSubscriber :=p_user,	password := *},
            hostPort :=
            {
                host := p_host,		//*  hostname, IPv4 or IPv6 as a charstring
                portField := *	//* optional integer
            },
          warnText := "Moved Temporary"
        }
        urlParameters := *,
        headers := *
        }
    }
		
    template ReferTo mw_ReferTo_SipUrl(template SipUrl p_sipUrl) := 
    template Addr_Union mw_AddrUnion_Nameaddr_CDIV(template charstring p_dn, template charstring p_user, template charstring p_host):=
    {
        fieldName := REFER_TO_E,
        nameAddr :={displayName := *, addrSpec:=p_sipUrl},
        referToParams := {{id:="method",paramValue :=*}}
        nameAddr:=mw_NameAddr_DName_User_Host(p_dn,p_user,p_host)
    }

    template SipUrl m_SipUrl_NumHostParam(template charstring p_number, template charstring p_host, template SemicolonParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
    template GenericParam mw_Cause_num (template charstring p_cause):=
        {id:="cause", paramValue:=p_cause}

		
    template SipUrl m_SipUrl_NumHost(template charstring p_number, template charstring p_host, template SemicolonParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
    {
            scheme := c_sipScheme,  		//*  contains "sip"
            userInfo:= {userOrTelephoneSubscriber:=p_number, password:=omit},
            hostPort := {host:=p_host, portField:=c_defaultSipPort},
            hostPort := {host:=p_host, portField:=omit},
            urlParameters := p_urlParameters,
            headers := omit
    };
		
    template GenericParam mw_Privacy_gen (template charstring p_privacy):=
        {id:="privacy", paramValue:= pattern "*{p_privacy}*"}
    template SipUrl mw_SipUrl_NumHost(template charstring p_number,template charstring p_host, template SemicolonParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
    {
            scheme := c_sipScheme,  		//*  contains "sip"
            userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
            hostPort := {host:=p_host, portField:=*},
            urlParameters := p_urlParameters,
            headers := *
    };
        
    group xmlTemplates
    {
+180 −54

File changed.

Preview size limit exceeded, changes collapsed.