LibSip_Templates.ttcn 68.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000
/*
 *	@author 	STF 346
 *  @version    $Id$
 *	@desc		This module provides the types used by the test component 
 *              for SIP-IMS tests. Module become from STF306 and STF334-336
 */

module LibSip_Templates
{
	//LibSip
	import from LibSip_SIPTypesAndValues all;
	import from LibSip_SDPTypes all;
	import from LibSip_Interface all;
	import from LibSip_PIXITS all;
	import from LibSip_XMLTypes all;
	

	group SubFields
	{

		template Addr_Union m_AddrUnion_NameAddr(template NameAddr p_nameAddr) :=
		{
		  nameAddr := p_nameAddr
		}

		template Addr_Union m_AddrUnion_DisplayAndSipUrl(template charstring p_displayName, template SipUrl p_addrSpec) :=
		{
		  nameAddr := m_CallingAddr(p_displayName, p_addrSpec)
		}
		
		template NameAddr m_CallingAddr(template charstring p_displayName, template SipUrl p_addrSpec) :=
		{
		  displayName := p_displayName,
		  addrSpec := p_addrSpec
		}		

		template CommaParam_List mw_digestResponse(in GenericParam p_genericParam) :=
		{
		  *,p_genericParam,* // c_Integrity_protected_yes
		}	

		template SemicolonParam_List m_cpc :=
		{{"cpc",PX_SIP_ISUP_CPC_VALUE}};

		template SemicolonParam_List m_ReasonParams
			(template charstring p_cause, template charstring p_text) :=
		{m_Cause(p_cause),m_Text(p_text)};
				
		template ReasonValue m_ReasonValue
			(template charstring p_cause, template charstring p_text) :=
		{		  
			token := "Q.850",
			reasonParams := m_ReasonParams(p_cause,p_text)
		};

		template RouteBody mw_routeBody (template SipUrl p_sipurl):=
		{
			nameAddr :=
			{
				displayName := *,
				addrSpec := p_sipurl
			},
			rrParam := *
		}

		template SentProtocol m_SentProtocol (charstring p_protocol) :=
		{protocolName := c_sipName,
		  protocolVersion:= c_sipVersion,
		  transport:= p_protocol};

		template SipUrl m_SipUrl_currDomain(in SipUserProfile p_userprofile) :=  	// SIP-URL of the test system on SIP side
		{
		  scheme := c_sipScheme,  		// contains "sip"
		  userInfo := 			// optional
		  {
			userOrTelephoneSubscriber := p_userprofile.publUsername,// charstring
			password := omit		// optional charstring
		  },
		  hostPort :=
		  {
			host := p_userprofile.homeDomain,	// hostname, IPv4 or IPv6 as a charstring
			portField := omit	//p_userprofile.currPort	//optional integer
		  },
		  urlParameters := omit,
		  headers := omit
		}

		template SipUrl m_SipUrl_contactIpaddr(in SipUserProfile p_userprofile) :=  	// SIP-URL of the test system on SIP side
		{
		  scheme := c_sipScheme,  		// contains "sip"
		  userInfo := 			// optional
		  {
			userOrTelephoneSubscriber := p_userprofile.publUsername,// charstring
			password := omit		// optional charstring
		  },
		  hostPort :=
		  {
			host := p_userprofile.contactIpaddr,	// hostname, IPv4 or IPv6 as a charstring
			portField := p_userprofile.contactPort	//optional integer
		  },
		  urlParameters := omit,
		  headers := omit
		}

		template SipUrl m_SipUrl_contactIpaddrAndCpc(in SipUserProfile p_userprofile) :=  	// SIP-URL of the test system on SIP side
		{
				scheme := c_sipScheme,  		// contains "sip"
				userInfo := 			// optional
				{
			userOrTelephoneSubscriber := p_userprofile.publUsername & "; cpc=" & PX_SIP_ISUP_CPC_VALUE,// charstring
			password := omit		// optional charstring
				},
				hostPort :=
				{
			host := p_userprofile.contactIpaddr,	// hostname, IPv4 or IPv6 as a charstring
			portField := p_userprofile.contactPort	//optional integer
				},
				urlParameters := omit,
				headers := omit
		}

		template SipUrl m_SipUrl_currIpaddr(in SipUserProfile p_userprofile) :=  	// SIP-URL of the test system on SIP side
		{
		  scheme := c_sipScheme,  		// contains "sip"
		  userInfo := 			// optional
		  {
			userOrTelephoneSubscriber := p_userprofile.publUsername,// charstring
			password := omit		// optional charstring
		  },
		  hostPort :=
		  {
			host := p_userprofile.currIpaddr,	// hostname, IPv4 or IPv6 as a charstring
			portField := p_userprofile.currPort	//optional integer
		  },
		  urlParameters := omit,
		  headers := omit
		} 
   
		template SipUrl m_SipUrl_Anonymous :=  	// SIP-URL with a calles party number
		{
		  scheme := c_sipScheme,  		// contains "sip"
		  userInfo := 			// optional
		  {
			userOrTelephoneSubscriber := "Anonymous",// charstring
			password := omit		// optional charstring
		  },
		  hostPort :=
		  {
			host := "Anonymous.invalid",	// hostname, IPv4 or IPv6 as a charstring
			portField := omit	//optional integer
		  },
		  urlParameters := omit,
		  headers := omit
		};
		
		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
		  },
		  urlParameters := omit,
		  headers := omit
		}

	
		template SipUrl mw_TelSip_unavailableInvalidUri :=
		{
				scheme  := (c_telScheme,c_sipScheme),
				userInfo := {userOrTelephoneSubscriber:="unavailable", password:=omit},
				hostPort := {host:="anonymous.invalid", portField:=c_defaultSipPort},
				urlParameters := omit,
				headers := omit
		};		

	
		template SipUrl mw_TelSip_unavailableUri (charstring p_host):=
		{
				scheme  := (c_telScheme,c_sipScheme),
				userInfo := {userOrTelephoneSubscriber:="unavailable", password:=omit},
				hostPort := {host:=p_host, portField:=c_defaultSipPort},
				urlParameters := omit,
				headers := omit
		};		

		template SipUrl mw_SipUrl_Number(charstring p_number) :=  	// SIP-URL with a calling party number
		{
		  scheme := c_sipScheme,  		// contains "sip"
		  userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
		  hostPort := ?,
		  urlParameters := *,
		  headers := *
		};

		template SipUrl mw_TelSipUrl_Number(template charstring p_number) :=  	// SIP-URL with a calling party number
		{
				scheme := (c_telScheme,c_sipScheme), // contains "sip" or "tel"
				userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*}, // nat or int format
				hostPort := ?,
				urlParameters := *,
				headers := *
		};
		
		template SipUrl mw_SipUrl_Host(charstring p_host) :=  	// SIP-URL with a calling party number
		{
				scheme := c_sipScheme,  		// contains "sip"
				userInfo:= {userOrTelephoneSubscriber:=?, password:=*},
				hostPort := {host:=p_host, portField:=*},
				urlParameters := *,
				headers := *
		};

		template SipUrl mw_SipUrl_Anonymous :=  	// SIP-URL with a calles party number
		{
		  scheme := c_sipScheme,  		// contains "sip"
		  userInfo := 			// optional
		  {
			userOrTelephoneSubscriber := "Anonymous",// charstring
			password := omit		// optional charstring
		  },
		  hostPort :=
		  {
			host := "anonymous.invalid",	// hostname, IPv4 or IPv6 as a charstring
			portField := *	//optional integer
		  },
		  urlParameters := *,
		  headers := *
		};

		template SipUrl mw_SipUrl_urlParam(template SemicolonParam_List p_urlParameters) :=  	// SIP-URL with a calling party number
		{
				scheme := c_sipScheme,  		// contains "sip"
				userInfo:= *,
				hostPort := *,
				urlParameters := p_urlParameters,
				headers := *
		};
		
		template ContactAddress mw_ContactAddress :=
		{
		  addressField  := ?,
		  contactParams := *
		};

		template HostPort mw_hostPort(template charstring p_host) :=
		{
		  host  := p_host,
		  portField := *
		};
		
		template StatusLine mw_statusLine1xx   := {sipVersion := c_sipNameVersion, statusCode := (100..199), reasonPhrase := ?};
		template StatusLine mw_statusLine4xx   := {sipVersion := c_sipNameVersion, statusCode := (400..499), reasonPhrase := ?};
		template StatusLine mw_statusLineFinal := {sipVersion := c_sipNameVersion, statusCode := (200..699), reasonPhrase := ?};

		template NameAddr mw_NameAddr_DispName_User_Host(template charstring p_dn, template charstring p_user, template charstring p_host) := 
		{
			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
				},
			urlParameters := {m_UserPhone},
			headers := *
			}
		}
		
		template Addr_Union mw_AddrUnion_Nameaddr(template charstring p_dn, template charstring p_user, template charstring p_host):=
		{
			nameAddr:=mw_NameAddr_DispName_User_Host(p_dn,p_user,p_host)
		}
		
		template SipUrl mw_SipUrl_User_Host(template charstring p_user, template charstring p_host) :=
		{
			scheme := c_sipScheme,  // contains "sip"
			userInfo := {userOrTelephoneSubscriber :=p_user,	password := *},
			hostPort :=
			{
				host := p_host,		// hostname, IPv4 or IPv6 as a charstring
				portField := *	//optional integer
			},
			urlParameters := {m_UserPhone},
			headers := *
		}
		template Addr_Union mw_AddrUnion_SipUrl(template charstring p_user, template charstring p_host):=
		{
			addrSpecUnion:=mw_SipUrl_User_Host(p_user,p_host)
		}
		

	} //end group Subfields





	group HeaderFieldTemplates {

		template GenericParam m_Cause (template charstring p_cause):=
			{id:="cause", paramValue:=p_cause}

		template Authorization m_Authorization (template Credentials p_Credentials):=
		{
		  fieldName := AUTHORIZATION_E,
		  body := p_Credentials
		}
		
		template Authorization m_Authorization_digest (template CommaParam_List p_CommaParam_List):=
		{
		  fieldName := AUTHORIZATION_E,
		  body := {digestResponse := p_CommaParam_List}
		}

		template Authorization m_add_Authorization_digest (in Authorization p_auth, template CommaParam_List p_CommaParam_List):=
		{
		  fieldName := AUTHORIZATION_E,
		  body := {digestResponse := f_merge_CommaParam_List(p_auth.body.digestResponse,valueof(p_CommaParam_List))}
		}

		template Authorization m_Authorization_other :=
		{
		  fieldName := AUTHORIZATION_E,
		  body := {otherResponse := ?}
		}

		template Contact m_Contact(template SipUrl p_sipUrl) :=
		{
		  fieldName := CONTACT_E,
		  contactBody :=
		  {
			contactAddresses :=
			{
			  {
				addressField := { addrSpecUnion := p_sipUrl},
				contactParams := omit
			  }
			}
		  } //end contactBody
		}//end m_Contact

		template Contact m_Contact_profile(in SipUserProfile p_userprofile) :=
		{
		  fieldName := CONTACT_E,
		  contactBody :=
		  {
			contactAddresses :=
			{
			  {
				addressField := { addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)},
				contactParams := omit
			  }
			}
		  } //end contactBody
		}//end m_Contact


		template Contact m_Contact_profile_expires(in SipUserProfile p_userprofile, in charstring p_expires) :=
		{
		  fieldName := CONTACT_E,
		  contactBody :=
		  {
			contactAddresses :=
			{
			  {
				addressField := { addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)},
				contactParams := {{"expires",p_expires}}
			  }
			}
		  } //end contactBody
		}//end m_Contact
		
		template From m_From(template NameAddr p_nameAddr, charstring p_tag_str) :=
		{
		  fieldName := FROM_E,
		  addressField :=
		  {nameAddr := p_nameAddr},//end addressField
		  fromParams := {{id := c_tagId, paramValue := p_tag_str}}
		};
		
		template From m_From_SipUrl(template SipUrl p_sipUrl) :=
		{
				fieldName := FROM_E,
				addressField :=
				{nameAddr := {
						displayName := omit, 	 			// optional charstring
						addrSpec := p_sipUrl		// SipUrl
				}},//end addressField
				fromParams := omit
		};

		template Event m_Event_conference := 
		{
			fieldName := EVENT_E,
			eventType := "conference",
			eventParams := omit
		};

		template Event m_Event_presence := 
		{
			fieldName := EVENT_E,
			eventType := "presence",
			eventParams := omit
		};

		template Event m_Event_reg := 
		{
			fieldName := EVENT_E,
			eventType := "reg",
			eventParams := omit
		};

		template Expires m_Expires_600000 := 
		{
			fieldName := EXPIRES_E,
			deltaSec := "600000"
		};

		template Expires m_Expires (charstring p_deltaSec):= 
		{
			fieldName := EXPIRES_E,
			deltaSec := p_deltaSec
		};

		template PAssertedID m_PAssertedID(template Addr_Union p_pAssertedIDValue) := 
		{
			fieldName := P_ASSERTED_ID_E,
			pAssertedIDValueList := {p_pAssertedIDValue}
		};

		template PAssertedID m_PAssertedID_2x(template Addr_Union p_pAssertedIDValue1, template Addr_Union p_pAssertedIDValue2) := 
		{
			fieldName := P_ASSERTED_ID_E,
			pAssertedIDValueList := {p_pAssertedIDValue1, p_pAssertedIDValue2}
		};
	
		template PAssertedID mw_PAssertedID(template PAssertedIDValue p_pAssertedIDValue) := 
		{
			fieldName := P_ASSERTED_ID_E,
			pAssertedIDValueList := {p_pAssertedIDValue}
		};

		template PAssertedIDValue mw_PAssertedIDValue(template SipUrl p_SipUrl) := 
		{
			addrSpecUnion := p_SipUrl
		};
		
		template PPreferredID m_PPreferredID(template Addr_Union p_pPreferredIDValue) := 
		{
			fieldName := P_PREFERRED_ID_E,
			pPreferredIDValueList := {p_pPreferredIDValue}
		};

		template Privacy m_Privacy(PrivacyValue p_privacy) := 
		{
			fieldName := PRIVACY_E,
			privValueList := {p_privacy}
		};
		
		template RAck m_RAck(integer p_responseNum, integer p_seqNumber, charstring p_method) :=
		{
		  	fieldName := RACK_E,
		  	responseNum := p_responseNum,
		  	seqNumber := p_seqNumber,
		  	method  := p_method
	  	};

		template Reason m_Reason(integer p_cause) :=
		{		  
			fieldName := REASON_E,
			reasonValues := {m_ReasonValue(int2str(p_cause),"dummy")}
		};

		template Reason m_Reason21 :=
		{		  
			fieldName := REASON_E,
			reasonValues := {m_ReasonValue(int2str(21),"call reject")}
		};

		template RecordRoute m_recordRoute_currIpAddr (in SipUserProfile p_userprofile):=
		{   
			fieldName := RECORD_ROUTE_E,
			routeBody := {{nameAddr := {displayName := omit, 
									   addrSpec := 	{scheme := c_sipScheme,  			// contains "sip"
													userInfo := omit,
													hostPort := {host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort},
													urlParameters := omit,
													headers := omit}
									   },
						  rrParam := omit}
		}};
	
		template ReferredBy m_ReferredBy_SipUrl(template SipUrl p_sipUrl) := 
		{
			fieldName := REFERRED_BY_E,
			nameAddr :={displayName := omit, addrSpec:=p_sipUrl},
			referredbyIdParams := omit
		}

		template ReferTo m_ReferTo_SipUrl(template SipUrl p_sipUrl) := 
		{
			fieldName := REFER_TO_E,
			nameAddr :={displayName := omit, addrSpec:=p_sipUrl},
			referToParams := {{id:="method",paramValue :="INVITE"}}
		}
		
		template Require m_Require_100rel :=
		{		  
			fieldName := REQUIRE_E,
			optionsTags := {c_tag100rel}
		};
		
		template Require m_Require_prec :=
		{		  
			fieldName := REQUIRE_E,
			optionsTags := {c_tagPrecond}
		};
		
		template Supported m_Supported_prec :=
		{
			fieldName:=SUPPORTED_E, 
			optionsTags:={c_tagPrecond}
		}
		
		template Supported m_Supported_100rel_prec :=
		{
			fieldName:=SUPPORTED_E, 
			optionsTags:={c_tag100rel, c_tagPrecond}
		}

		template GenericParam m_Text (template charstring p_text):=
			{id:="text", paramValue:=p_text}
		
		template GenericParam m_UserPhone :=
		{
			id := "user",
			paramValue := "phone"
		}
		
		template To m_To(template SipUrl p_sipUrl) :=
		{
		  fieldName := TO_E,
		  addressField :=
		  {nameAddr := {
			  displayName := "ETSI Tester", // optional charstring
			  addrSpec :=	p_sipUrl		// SipUrl
			}},//end addressField
		  toParams := omit
		};

		template To m_To_SipUrl(SipUrl p_sipUrl) :=
		{
		  fieldName := TO_E,
		  addressField :=
		  {nameAddr := {
			  displayName := omit, 	 			// optional charstring
			  addrSpec := p_sipUrl		// SipUrl
			}},//end addressField
		  toParams := omit
		};

		template To mw_To_NameAddr_SipUrl(template charstring p_dn, template charstring p_user, template charstring p_host) :=
		{
			fieldName := TO_E,
			addressField := (mw_AddrUnion_Nameaddr(p_dn,p_user,p_host),mw_AddrUnion_SipUrl(p_user,p_host)),
			toParams := omit
		}

		template From mw_From(template SipUrl p_sipUrl) := {
		  fieldName := FROM_E,
		  addressField := { addrSpecUnion := p_sipUrl},
		  fromParams:= *
		}

		template ViaBody m_ViaBody_currIpaddr(charstring branch_val,in SipUserProfile p_userprofile) :=
		{
		  sentProtocol := m_SentProtocol(PX_SIP_TRANSPORT),
		  sentBy:={host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort},
		  viaParams:={{id :=c_branchId,paramValue :=branch_val}}
		}
		
		template ViaBody mw_ViaBody_interface(HostPort p_hostport) :=
		{
		  sentProtocol := m_SentProtocol(PX_SIP_TRANSPORT),
		  sentBy:={host:=p_hostport.host, portField:= p_hostport.portField},
		  viaParams:=*
		}

		template Via mw_Via(template ViaBody p_viabody) :=
		{
		  fieldName := VIA_E,
		  viaBody:= ? // superset(p_viabody)
		}
		
		template CallId mw_CallId_any :=
		{
		  fieldName := CALL_ID_E,
		  callid := ?
		}

		template Privacy mw_Privacy_id := 
		{
			fieldName := PRIVACY_E,
			privValueList := {*,"id",*}
		};
		
		template Privacy mw_Privacy_notId := 
		{
			fieldName := PRIVACY_E,
			privValueList := complement ({*,"id",*})
		};

		template Privacy mw_Privacy_user := 
		{
			fieldName := PRIVACY_E,
			privValueList := {*,"user",*}
		};
		
		template Reason mw_Reason(integer p_cause) :=
		{		  
			fieldName := REASON_E,
			reasonValues := {m_ReasonValue(int2str(p_cause),?)}
		};

		template RecordRoute mw_recordroute (template RouteBody p_routeBody):=
		{   
			fieldName := RECORD_ROUTE_E,
			routeBody := ? // superset(p_routeBody)
		};
		
		template Route mw_route (template RouteBody_List p_routeBody):=
		{   
			fieldName := ROUTE_E,
			routeBody := p_routeBody
		};
		
	} // end of group HeaderFieldTemplates


group MessageTemplates {
group dummy_templates {
  group dummy_parameter_send {

	template RequestLine m_requestLine_dummy := 
	{
		method := ACK_E,
		requestUri := c_empty_RequestUri,
		sipVersion := c_sipNameVersion
	}

	template MessageHeader m_msgHeader_dummy := 
	{
		accept := omit,
		acceptContact := omit,
		acceptEncoding := omit,
		acceptLanguage := omit,
		alertInfo := omit,
		allow := omit,
		allowEvents := omit, // RFC3265
		authenticationInfo := omit,
		authorization := omit,
		callId := c_empty_CallId,
		callInfo := omit,
		contact := omit,
		contentDisposition := omit,
		contentEncoding := omit,
		contentLanguage := omit,
		contentLength := {fieldName := CONTENT_LENGTH_E, len:=  0},
		contentType := omit, //if message body present m, else not present
		cSeq := c_empty_cSeq,
		date := omit,
		errorInfo := omit,
		event := omit, // RFC3265
		expires := omit,
		fromField := c_empty_From,
		historyInfo := omit, // RFC4244
		inReplyTo := omit,
		maxForwards := c_maxForwards70,
		mimeVersion := omit,
		minExpires := omit,
		minSE := omit, // RFC4028
		organization := omit,
		pAccessNetworkInfo := omit, // RFC3455
		pAssertedID := omit,
		pAssertedService := omit,
		pAssociatedURI := omit,
		path := omit, // RFC3327
		pCalledPartyID := omit, // RFC3455
		pChargingFunctionAddresses := omit, // RFC3455
		pChargingVector := omit, // RFC3455
		pEarlyMedia := omit, // RFC5009
		pMediaAuthorization := omit, // RFC3313
		pPreferredID := omit,
		priority := omit,
		privacy := omit,
		proxyAuthenticate := omit,
		proxyAuthorization := omit,
		proxyRequire := omit,
		pVisitedNetworkID := omit, // RFC3455
		rAck := omit,
		rSeq := omit,
		reason := omit,
		recordRoute := omit,
		referredBy := omit, // RFC3892 - REFER method
		referTo := omit, // RFC3515 - REFER method
		replyTo := omit,
		require := omit,
		retryAfter := omit,
		route := omit,
		securityClient := omit, // RFC3329
		securityServer := omit, // RFC3329
		securityVerify := omit, // RFC3329
		server := omit,
		serviceRoute := omit, // RFC3608
		sessionExpires := omit, // RFC4028
		subject := omit,
		subscriptionState := omit, // RFC3265
		supported := omit,
		timestamp := omit,
		toField := c_empty_To,
		unsupported := omit,
		userAgent := omit,
		via := c_empty_Via,
		warning := omit,
		wwwAuthenticate := omit,
		undefinedHeader_List := omit
	}
  } // group dummy_parameter_send
  
  group dummy_parameter_receive {

	template RequestLine mw_requestLine_dummy := 
	{
		method := ACK_E,
		requestUri := ?,
		sipVersion := c_sipNameVersion
	}

	template MessageHeader mw_msgHeader_dummy := 
	{
		accept := *,
		acceptContact := *,
		acceptEncoding := *,
		acceptLanguage := *,
		alertInfo := *,
		allow := *,
		allowEvents := *, // RFC3265
		authenticationInfo := *,
		authorization := *,
		callId := ?,
		callInfo := *,
		contact := *,
		contentDisposition := *,
		contentEncoding := *,
		contentLanguage := *,
		contentLength := ?,
		contentType := *,
		cSeq := ?,
		date := *,
		errorInfo := *,
		event := *, // RFC3265
		expires := *,
		fromField := ?,
		historyInfo := *, // RFC4244
		inReplyTo := *,
		maxForwards := ?,
		mimeVersion := *,
		minExpires := *,
		minSE := *, // RFC4028
		organization := *,
		pAccessNetworkInfo := *, // RFC3455
		pAssertedID := *,
		pAssertedService := *,
		pAssociatedURI := *,
		path := *, // RFC3327
		pCalledPartyID := *, // RFC3455
		pChargingFunctionAddresses := *, // RFC3455
		pChargingVector := *, // RFC3455
		pEarlyMedia := *, // RFC5009
		pMediaAuthorization := *, // RFC3313
		pPreferredID := *,
		priority := *,
		privacy := *,
		proxyAuthenticate := *,
		proxyAuthorization := *,
		proxyRequire := *,
		pVisitedNetworkID := *, // RFC3455
		rAck := *,
		rSeq := *,
		reason := *,
		recordRoute := *,
		referredBy := *, // RFC3892 - REFER method
		referTo := *, // RFC3515 - REFER method
		replyTo := *,
		require := *,
		retryAfter := *,
		route := *,
		securityClient := *, // RFC3329
		securityServer := *, // RFC3329
		securityVerify := *, // RFC3329
		server := *,
		serviceRoute := *, // RFC3608
		sessionExpires := *, // RFC4028
		subject := *,
		subscriptionState := *, // RFC3265
		supported := *,
		timestamp := *,
		toField := ?,
		unsupported := *,
		userAgent := *,
		via := ?,
		warning := *,
		wwwAuthenticate := *,
		undefinedHeader_List := *
	}
  }//end group dummy_parameter_receive
  
  group dummy_request_templates_send {

	template ACK_Request m_ACK_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template BYE_Request m_BYE_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template CANCEL_Request m_CANCEL_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template INVITE_Request m_INVITE_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template MESSAGE_Request m_MESSAGE_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template NOTIFY_Request m_NOTIFY_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template PRACK_Request m_PRACK_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template PUBLISH_Request m_PUBLISH_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template REGISTER_Request m_REGISTER_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template REFER_Request m_REFER_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template SUBSCRIBE_Request m_SUBSCRIBE_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}

	template UPDATE_Request m_UPDATE_Dummy :=
	{
		requestLine	:= m_requestLine_dummy,
		msgHeader := m_msgHeader_dummy,
		messageBody := omit,
		payload := omit
	}
  }//end group dummy_request_templates_send
  group dummy_request_templates_receive{

	template ACK_Request mw_ACK_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template BYE_Request mw_BYE_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template CANCEL_Request mw_CANCEL_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template INFO_Request mw_INFO_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template INVITE_Request mw_INVITE_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template MESSAGE_Request mw_MESSAGE_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template NOTIFY_Request mw_NOTIFY_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template PRACK_Request mw_PRACK_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template PUBLISH_Request mw_PUBLISH_Dummy :=
	{
		requestLine	:= mw_requestLine_dummy,
		msgHeader := mw_msgHeader_dummy,
		messageBody := *,
		payload := *
	}

	template REFER_Request mw_REFER_Dummy :=