Commit e4afc4d3 authored by rennoch's avatar rennoch
Browse files

update due to LibSipV2 types modifications

parent 83a59f6c
Loading
Loading
Loading
Loading
+195 −134
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ module LibSip_Templates
	import from LibSip_PIXITS all;
	import from LibSip_XMLTypes all;
    import from LibSip_SimpleMsgSummaryTypes all;
    import from LibSip_MessageBodyTypes all;    
	
    import from NoTargetNamespace language "XSD" all
    with {
@@ -131,6 +132,7 @@ module LibSip_Templates
		template SipUrl m_SipUrl_currDomain(in SipUserProfile p_userprofile) :=  	//*  SIP-URL of the test system on SIP side
		{
		  scheme := c_sipScheme,  		//*  contains "sip"
          components := {sip:={
        		  userInfo := 			//*  optional
        		  {
        			userOrTelephoneSubscriber := p_userprofile.publUsername,//*  charstring
@@ -140,7 +142,7 @@ module LibSip_Templates
        		  {
        			host := p_userprofile.homeDomain,	//*  hostname, IPv4 or IPv6 as a charstring
        			portField := omit	//* p_userprofile.currPort	//* optional integer
		  },
        		  }}},
		  urlParameters := omit,
		  headers := omit
		}
@@ -148,6 +150,7 @@ module LibSip_Templates
		template SipUrl m_SipUrl_contactIpaddr(in SipUserProfile p_userprofile) :=  	//*  SIP-URL of the test system on SIP side
		{
		  scheme := c_sipScheme,  		//*  contains "sip"
          components := {sip:={
            		  userInfo := 			//*  optional
            		  {
            			userOrTelephoneSubscriber := p_userprofile.publUsername,//*  charstring
@@ -157,7 +160,7 @@ module LibSip_Templates
            		  {
            			host := p_userprofile.contactIpaddr,	//*  hostname, IPv4 or IPv6 as a charstring
            			portField := p_userprofile.contactPort	//* optional integer
		  },
            		  }}},
		  urlParameters := omit,
		  headers := omit
		}
@@ -165,6 +168,7 @@ module LibSip_Templates
		template SipUrl m_SipUrl_contactIpaddrAndCpc(in SipUserProfile p_userprofile) :=  	//*  SIP-URL of the test system on SIP side
		{
				scheme := c_sipScheme,  		//*  contains "sip"
            	components := {sip:={
                				userInfo := 			//*  optional
                				{
                			userOrTelephoneSubscriber := p_userprofile.publUsername & "; cpc=" & PX_SIP_ISUP_CPC_VALUE,//*  charstring
@@ -174,7 +178,7 @@ module LibSip_Templates
                				{
                			host := p_userprofile.contactIpaddr,	//*  hostname, IPv4 or IPv6 as a charstring
                			portField := p_userprofile.contactPort	//* optional integer
				},
                				}}},
				urlParameters := omit,
				headers := omit
		}
@@ -182,6 +186,7 @@ module LibSip_Templates
		template SipUrl m_SipUrl_currIpaddr(in SipUserProfile p_userprofile) :=  	//*  SIP-URL of the test system on SIP side
		{
		  scheme := c_sipScheme,  		//*  contains "sip"
          components := {sip:={
            		  userInfo := 			//*  optional
            		  {
            			userOrTelephoneSubscriber := p_userprofile.publUsername,//*  charstring
@@ -191,7 +196,7 @@ module LibSip_Templates
            		  {
            			host := p_userprofile.currIpaddr,	//*  hostname, IPv4 or IPv6 as a charstring
            			portField := p_userprofile.currPort	//* optional integer
		  },
            		  }}},
		  urlParameters := omit,
		  headers := omit
		} 
@@ -199,6 +204,7 @@ module LibSip_Templates
		template SipUrl m_SipUrl_Anonymous :=  	//*  SIP-URL with a calles party number
		{
		  scheme := c_sipScheme,  		//*  contains "sip"
          components := {sip:={
                		  userInfo := 			//*  optional
                		  {
                			userOrTelephoneSubscriber := "Anonymous",//*  charstring
@@ -208,7 +214,7 @@ module LibSip_Templates
                		  {
                			host := "Anonymous.invalid",	//*  hostname, IPv4 or IPv6 as a charstring
                			portField := omit	//* optional integer
		  },
                		  }}},
		  urlParameters := omit,
		  headers := omit
		};
@@ -216,16 +222,9 @@ module LibSip_Templates
		template SipUrl m_TelUrl_publUser(in SipUserProfile p_userprofile) :=  	//*  SIP-URL of the test system on SIP side
		{
		  scheme := c_telScheme,  		//*  contains "tel"
		  userInfo := 			//*  optional
		  {
			userOrTelephoneSubscriber := p_userprofile.publUsername,//*  charstring
			password := omit		//*  optional charstring
		  },
		  hostPort :=
		  {
			host := omit,	//*  hostname, IPv4 or IPv6 as a charstring
			portField := omit	//* p_userprofile.currPort	//* optional integer
		  },
          components := {tel:={
    			          subscriber := p_userprofile.publUsername//*  charstring
            		  }},
		  urlParameters := omit,
		  headers := omit
		}
@@ -233,8 +232,8 @@ module LibSip_Templates
		template SipUrl mw_TelUrl :=
		{
    		scheme  := c_telScheme,
    		userInfo := *,
    		hostPort := ?,
            components := {tel:={
                			subscriber := ?}},
    		urlParameters := *,
    		headers := *
		};
@@ -242,27 +241,51 @@ module LibSip_Templates
		template SipUrl mw_SipUrl :=
		{
			scheme  := c_sipScheme,
            components := {sip:={
        			userInfo := *,
			hostPort := ?,
        			hostPort := ?}},
			urlParameters := *,
			headers := *
		};
	
		template SipUrl mw_TelSip_unavailableInvalidUri :=
		template SipUrl mw_TelSip_unavailableInvalidUri := (mw_TelSip_unavailableInvalidUri1,mw_TelSip_unavailableInvalidUri2);

        template SipUrl mw_TelSip_unavailableInvalidUri1 :=
        {
				scheme  := (c_telScheme,c_sipScheme),
                scheme  := c_sipScheme,
                components := {sip:={
                        userInfo := {userOrTelephoneSubscriber:="unavailable", password:=omit},
				hostPort := {host:="anonymous.invalid", portField:=c_defaultSipPort},
                        hostPort := {host:="anonymous.invalid", portField:=c_defaultSipPort}
                }},
                urlParameters := omit,
                headers := omit
        };	
        template SipUrl mw_TelSip_unavailableInvalidUri2 :=
        {
                scheme  := c_telScheme,
                components := {tel:={
                    	subscriber := "unavailable"
               		 }},
                urlParameters := omit,
                headers := omit
        };	        
	
		template SipUrl mw_TelSip_unavailableUri (charstring p_host):= (mw_TelSip_unavailableUri1 (p_host),mw_TelSip_unavailableUri2 (p_host));

		template SipUrl mw_TelSip_unavailableUri (charstring p_host):=
        template SipUrl mw_TelSip_unavailableUri1 (charstring p_host):=
        {
                scheme  := (c_telScheme),
                components := {tel:={
                    subscriber := "unavailable"}},
                urlParameters := omit,
                headers := omit
        };	
        template SipUrl mw_TelSip_unavailableUri2 (charstring p_host):=
        {
				scheme  := (c_telScheme,c_sipScheme),
                scheme  := (c_sipScheme),
                components := {sip:={
                        userInfo := {userOrTelephoneSubscriber:="unavailable", password:=omit},
				hostPort := {host:=p_host, portField:=c_defaultSipPort},
                        hostPort := {host:=p_host, portField:=c_defaultSipPort}}},
                urlParameters := omit,
                headers := omit
        };			
@@ -270,17 +293,36 @@ module LibSip_Templates
		template SipUrl mw_SipUrl_Number(charstring p_number) :=  	//*  SIP-URL with a calling party number
		{
		  scheme := c_sipScheme,  		//*  contains "sip"
          components := {sip:={
        		  userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
		  hostPort := ?,
        		  hostPort := ?}},
		  urlParameters := *,
		  headers := *
		};

		template SipUrl mw_TelSipUrl_Number(template charstring p_number) :=  	//*  SIP-URL with a calling party number
		template SipUrl mw_TelSipUrl_Number(template charstring p_number) := (mw_TelSipUrl_Number1(p_number),mw_TelSipUrl_Number2(p_number));
		
        template SipUrl mw_TelSipUrl_Number1(template charstring p_number) :=  	//*  SIP-URL with a calling party number
        {
				scheme := (c_telScheme,c_sipScheme), //*  contains "sip" or "tel"
                scheme := (c_sipScheme), //*  contains "sip" or "tel"
                components := {
            	    
                    sip:={
                        userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*}, //*  nat or int format
				hostPort := ?,
                        hostPort := ?}
            	
                },
                urlParameters := *,
                headers := *
        };       		
        template SipUrl mw_TelSipUrl_Number2(template charstring p_number) :=  	//*  SIP-URL with a calling party number
        {
                scheme := (c_telScheme), //*  contains "sip" or "tel"
                components := {
            	    
                    tel:={
                        subscriber:= p_number}            	
                },
                urlParameters := *,
                headers := *
        };
@@ -288,8 +330,9 @@ module LibSip_Templates
		template SipUrl mw_SipUrl_Host(template charstring p_host) :=  	//*  SIP-URL with a calling party number
		{
				scheme := c_sipScheme,  		//*  contains "sip"
            	components := {sip:={
    				userInfo:= *,
				hostPort := {host:=p_host, portField:=*},
    				hostPort := {host:=p_host, portField:=*}}},
				urlParameters := *,
				headers := *
		};
@@ -298,8 +341,9 @@ module LibSip_Templates
          template SipUrl mw_SipUrl_NumberHost(charstring p_number, charstring p_host) :=  	//*  SIP-URL with a calling party number
          {
            scheme := c_sipScheme,  		//*  contains "sip"
            components := {sip:={
                userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
            hostPort := {host:=p_host, portField:=*},
                hostPort := {host:=p_host, portField:=*}}},
            urlParameters := *,
            headers := *
          };
@@ -307,8 +351,9 @@ module LibSip_Templates
		template SipUrl mw_SipUrl_NumberHostParam(charstring p_number, charstring p_host, template SemicolonParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
		{
				scheme := c_sipScheme,  		//*  contains "sip"
            	components := {sip:={
    				userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
				hostPort := {host:=p_host, portField:=*},
    				hostPort := {host:=p_host, portField:=*}}},
				urlParameters := p_urlParameters,
				headers := *
		};
@@ -316,8 +361,9 @@ module LibSip_Templates
        template SipUrl m_SipUrl_NumberHostHeader(charstring p_number, charstring p_host, template AmpersandParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
        {
                scheme := c_sipScheme,  		//*  contains "sip"
            	components := {sip:={
                    userInfo:= {userOrTelephoneSubscriber:=p_number, password:=omit},
                hostPort := {host:=p_host, portField:=omit},
                    hostPort := {host:=p_host, portField:=omit}}},
                urlParameters := omit,
                headers := p_urlParameters
        };
@@ -325,8 +371,9 @@ module LibSip_Templates
        template SipUrl mw_SipUrl_NumberHostHeader(charstring p_number, charstring p_host, template AmpersandParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
        {
                scheme := c_sipScheme,  		//*  contains "sip"
           	    components := {sip:={
                    userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
                hostPort := {host:=p_host, portField:=*},
                    hostPort := {host:=p_host, portField:=*}}},
                urlParameters := *,
                headers := p_urlParameters
        };
@@ -334,8 +381,9 @@ module LibSip_Templates
		template SipUrl m_SipUrl_NumberHostParam(charstring p_number, charstring p_host, template SemicolonParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
		{
				scheme := c_sipScheme,  		//*  contains "sip"
            	components := {sip:={
    				userInfo:= {userOrTelephoneSubscriber:=p_number, password:=omit},
				hostPort := {host:=p_host, portField:=c_defaultSipPort},
    				hostPort := {host:=p_host, portField:=c_defaultSipPort}}},
				urlParameters := p_urlParameters,
				headers := omit
		};
@@ -343,8 +391,9 @@ module LibSip_Templates
        template SipUrl m_SipUrl_NumberHostParam_woPort(charstring p_number, charstring p_host, template SemicolonParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
        {
                scheme := c_sipScheme,  		//*  contains "sip"
                components := {sip:={                
                    userInfo:= {userOrTelephoneSubscriber:=p_number, password:=omit},
                hostPort := {host:=p_host, portField:=omit},
                    hostPort := {host:=p_host, portField:=omit}}},
                urlParameters := p_urlParameters,
                headers := omit
        };
@@ -352,6 +401,7 @@ module LibSip_Templates
		template SipUrl mw_SipUrl_Anonymous :=  	//*  SIP-URL with a calles party number
		{
		  scheme := c_sipScheme,  		//*  contains "sip"
          components := {sip:={
    		  userInfo := 			//*  optional
    		  {
    			userOrTelephoneSubscriber := pattern "[a,A][n,N][o,O][n,N][y,Y][m,M][o,O][u,U][s,s]",//*  charstring
@@ -361,7 +411,7 @@ module LibSip_Templates
    		  {
    			host := pattern "[a,A]nonymous.invalid",	//*  hostname, IPv4 or IPv6 as a charstring
    			portField := *	//* optional integer
		  },
    		  }}},
		  urlParameters := *,
		  headers := *
		};
@@ -369,8 +419,9 @@ module LibSip_Templates
		template SipUrl mw_SipUrl_urlParam(template SemicolonParam_List p_urlParameters) :=  	//*  SIP-URL with a calling party number
		{
				scheme := c_sipScheme,  		//*  contains "sip"
                components := {sip:={
    				userInfo:= *,
				hostPort := *,
    				hostPort := ?}},
				urlParameters := p_urlParameters,
				headers := *
		};
@@ -398,11 +449,13 @@ module LibSip_Templates
			addrSpec :=
			{
				scheme := c_sipScheme,  //*  contains "sip"
                components := { sip := {
            				userInfo := {userOrTelephoneSubscriber :=p_user,	password := *},
            				hostPort :=
            				{
            					host := p_host,		//*  hostname, IPv4 or IPv6 as a charstring
            					portField := *	//* optional integer
            				}}
                },
			urlParameters := {m_UserPhone},
			headers := *
@@ -417,12 +470,13 @@ module LibSip_Templates
		template SipUrl mw_SipUrl_User_Host(template charstring p_user, template charstring p_host) :=
		{
			scheme := c_sipScheme,  //*  contains "sip"
            components := {sip:={
    			userInfo := {userOrTelephoneSubscriber :=p_user,	password := *},
    			hostPort :=
    			{
    				host := p_host,		//*  hostname, IPv4 or IPv6 as a charstring
    				portField := *	//* optional integer
			},
    			}}},
			urlParameters := {m_UserPhone},
			headers := *
		}
@@ -697,8 +751,9 @@ module LibSip_Templates
			fieldName := RECORD_ROUTE_E,
			routeBody := {{nameAddr := {displayName := omit, 
									   addrSpec := 	{scheme := c_sipScheme,  			//*  contains "sip"
                                           			 components := { sip := {
            													userInfo := omit,
													hostPort := {host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort},
            													hostPort := {host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort}}},
													urlParameters := omit,
													headers := omit}
									   },
@@ -991,8 +1046,7 @@ module LibSip_Templates
                        displayName := *,
                        addrSpec := {
                            scheme := ?,  
                            userInfo := *,
                            hostPort := *,
                            components := ?,
                            urlParameters := {{"isfocus",*},*},
                            headers := *
                        }
@@ -1097,6 +1151,9 @@ group dummy_templates {
		server := omit,
		serviceRoute := omit, //*  RFC3608
		sessionExpires := omit, //*  RFC4028
        sessionId := omit,
        sipETag := omit,
        sipIfMatch := omit,
		subject := omit,
		subscriptionState := omit, //*  RFC3265
		supported := omit,
@@ -1191,6 +1248,9 @@ group dummy_templates {
		server := *,
		serviceRoute := *, //*  RFC3608
		sessionExpires := *, //*  RFC4028
		sessionId := *,
        sipETag := *,
        sipIfMatch := *,		
		subject := *,
		subscriptionState := *, //*  RFC3265
		supported := *,
@@ -2057,8 +2117,9 @@ group request_send {
			{
				method := NOTIFY_E,
				requestUri :=
				{
					hostPort:= p_requestUri.hostPort
				{	scheme := ?,
                    components := {sip:={userInfo := *,
                        hostPort:= p_requestUri.components.sip.hostPort}}
				}
			},
			msgHeader :=