asterisk: Send P-Associated-URI in IMS Register Response

Change-Id: I4c163f34c052d0463baba799c44fecaaa15be394
diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn
index 56404da..72a4426 100644
--- a/library/SIP_Templates.ttcn
+++ b/library/SIP_Templates.ttcn
@@ -37,16 +37,18 @@
 }
 
 template (value) SipUrl ts_SipUrl(template (value) HostPort host_port,
-				  template (omit) UserInfo user_info := omit) := {
-	scheme := "sip",
+				  template (omit) UserInfo user_info := omit,
+				  template (value) charstring scheme := "sip") := {
+	scheme := scheme,
 	userInfo := user_info,
 	hostPort := host_port,
 	urlParameters := omit,
 	headers := omit
 }
 template (present) SipUrl tr_SipUrl(template (present) HostPort host_port := ?,
-				    template UserInfo user_info := *) := {
-	scheme := "sip",
+				    template UserInfo user_info := *,
+				    template (present) charstring scheme := "sip") := {
+	scheme := scheme,
 	userInfo := user_info,
 	hostPort := host_port,
 	urlParameters := *,
@@ -54,8 +56,9 @@
 }
 
 template (value) SipUrl ts_SipUrlHost(template (value) charstring host,
-				      template (omit) integer portField := omit)
-	:= ts_SipUrl(ts_HostPort(host, portField));
+				      template (omit) integer portField := omit,
+				      template (value) charstring scheme := "sip")
+	:= ts_SipUrl(ts_HostPort(host, portField), scheme := scheme);
 
 function ts_SipUrl_from_Addr_Union(template (value) Addr_Union au)
 return template (value) SipUrl {
@@ -241,6 +244,27 @@
 	access_net_specs := access_net_specs
 }
 
+// [RFC3455 4.1]
+template (present) P_Assoc_uri_spec tr_P_Assoc_uri_spec(template (present) NameAddr p_asso_uri := ?,
+							template SemicolonParam_List ai_params := *) := {
+	p_asso_uri := p_asso_uri,
+	ai_params := ai_params
+}
+template (value) P_Assoc_uri_spec ts_P_Assoc_uri_spec(template (value) NameAddr p_asso_uri,
+						      template (omit) SemicolonParam_List ai_params := omit) := {
+	p_asso_uri := p_asso_uri,
+	ai_params := ai_params
+}
+
+// [RFC3455 4.1]
+template (present) P_Associated_Uri tr_P_Associated_Uri(template (present) P_Assoc_uri_spec_list p_assoc_uris := ?) := {
+	fieldName := P_ASSOCIATED_URI,
+	p_assoc_uris := p_assoc_uris
+}
+template (value) P_Associated_Uri ts_P_Associated_Uri(template (value) P_Assoc_uri_spec_list p_assoc_uris := {}) := {
+	fieldName := P_ASSOCIATED_URI,
+	p_assoc_uris := p_assoc_uris
+}
 
 // [20.32]
 template (value) Require ts_Require(template (value) OptionTag_List optionsTags := {}) := {
@@ -588,6 +612,7 @@
 		template (omit)Authorization authorization := omit,
 		template (omit) Allow allow := ts_Allow(c_SIP_defaultMethods),
 		template (omit) Expires expires := omit,
+		template (omit) P_Associated_Uri p_associated_uri := omit,
 		template (omit) Require require := omit,
 		template (omit) Security_client security_client := omit,
 		template (omit) Security_server security_server := omit,
@@ -616,6 +641,7 @@
 		addressField := from_addr.addr,
 		fromParams := from_addr.params
 	},
+	p_associated_uri := p_associated_uri,
 	require := require,
 	security_client := security_client,
 	security_server := security_server,
@@ -644,6 +670,7 @@
 		template Allow allow := *,
 		template Authorization authorization := *,
 		template Expires expires := *,
+		template P_Associated_Uri p_associated_uri := *,
 		template Require require := *,
 		template Security_client security_client := *,
 		template Security_server security_server := *,
@@ -672,6 +699,7 @@
 		addressField := from_addr.addr,
 		fromParams := from_addr.params
 	},
+	p_associated_uri := p_associated_uri,
 	require := require,
 	security_client := security_client,
 	security_server := security_server,
@@ -864,6 +892,7 @@
 		charstring reason,
 		Via via,
 		template (omit) Allow allow := omit,
+		template (omit) P_Associated_Uri p_associated_uri := omit,
 		template (omit) Require require := omit,
 		template (omit) Server server := omit,
 		template (omit) Supported supported := omit,
@@ -875,6 +904,7 @@
 				     content_length := f_ContentLength(body),
 				     content_type := f_ContentTypeOrOmit(ts_CT_SDP, body),
 				     allow := allow,
+				     p_associated_uri := p_associated_uri,
 				     require := require,
 				     server := server,
 				     supported := supported,
@@ -936,6 +966,7 @@
 	integer seq_nr,
 	charstring method := "REGISTER",
 	template (omit) Allow allow := omit,
+	template (omit) P_Associated_Uri p_associated_uri := omit,
 	template (omit) Security_server security_server := omit,
 	template (omit) Server server := omit,
 	template (omit) Supported supported := omit,
@@ -947,6 +978,7 @@
 				     content_length := f_ContentLength(body),
 				     content_type := f_ContentTypeOrOmit(ts_CT_SDP, body),
 				     allow := allow,
+				     p_associated_uri := p_associated_uri,
 				     security_server := security_server,
 				     server := server,
 				     supported := supported,