asterisk: Use Action PJSIPAccessNetworkInfo

Validate P-Access-Network-Info should only be present in 2nd REGISTER
sent over ipsec.

Change-Id: I2759d12caeaca81a9224997a29541c325d65fe30
diff --git a/asterisk/AMI_Functions.ttcn b/asterisk/AMI_Functions.ttcn
index 9fbe973..4969905 100644
--- a/asterisk/AMI_Functions.ttcn
+++ b/asterisk/AMI_Functions.ttcn
@@ -28,6 +28,7 @@
 const charstring AMI_FIELD_ACTION := "Action";
 const charstring AMI_FIELD_ACTION_ID := "ActionID";
 const charstring AMI_FIELD_EVENT := "Event";
+const charstring AMI_FIELD_INFO := "Info";
 const charstring AMI_FIELD_USERNAME := "Username";
 const charstring AMI_FIELD_SECRET := "Secret";
 const charstring AMI_FIELD_RESPONSE := "Response";
@@ -79,6 +80,8 @@
 template (value) AMI_Field
 ts_AMI_Field_Event(template (value) charstring val) := ts_AMI_Field(AMI_FIELD_EVENT, val);
 template (value) AMI_Field
+ts_AMI_Field_Info(template (value) charstring val) := ts_AMI_Field(AMI_FIELD_INFO, val);
+template (value) AMI_Field
 ts_AMI_Field_Username(template (value) charstring val) := ts_AMI_Field(AMI_FIELD_USERNAME, val);
 template (value) AMI_Field
 ts_AMI_Field_Secret(template (value) charstring val) := ts_AMI_Field(AMI_FIELD_SECRET, val);
@@ -93,6 +96,8 @@
 template (present) AMI_Field
 tr_AMI_Field_Event(template (present) charstring val := ?) := tr_AMI_Field(pattern @nocase AMI_FIELD_EVENT, val);
 template (present) AMI_Field
+tr_AMI_Field_Info(template (present) charstring val := ?) := tr_AMI_Field(pattern @nocase AMI_FIELD_INFO, val);
+template (present) AMI_Field
 tr_AMI_Field_Username(template (present) charstring val := ?) := tr_AMI_Field(pattern @nocase AMI_FIELD_USERNAME, val);
 template (present) AMI_Field
 tr_AMI_Field_Secret(template (present) charstring val := ?) := tr_AMI_Field(pattern @nocase AMI_FIELD_SECRET, val);
@@ -139,6 +144,23 @@
 	tr_AMI_Field_Secret(secret)
 );
 
+/* Action: PJSIPAccessNetworkInfo
+ * Registration: volte_ims
+ * Info: 3GPP-E-UTRAN-FDD; utran-cell-id-3gpp=2380100010000101
+ */
+template (value) AMI_Msg
+ts_AMI_Action_PJSIPAccessNetworkInfo(template (value) charstring registration := "volte_ims",
+				     template (value) charstring info := "",
+				     template (value) charstring action_id := "0001") := {
+	ts_AMI_Field_Action("PJSIPAccessNetworkInfo"),
+	ts_AMI_Field_ActionId(action_id),
+	ts_AMI_Field_Registration(registration),
+	ts_AMI_Field_Info(info)
+};
+function f_ami_gen_PJSIPAccessNetworkInfo_Info_EUTRAN(charstring uli_str) return charstring {
+	return "3GPP-E-UTRAN-FDD; utran-cell-id-3gpp=" & uli_str;
+}
+
 /* Action: PJSIPRegister
  * ActionID: <value>
  * Registration: volte_ims
@@ -508,6 +530,13 @@
 	f_ami_transceive_match_response_success(pt, ts_AMI_Action_Login(username, secret, reg_action_id));
 }
 
+function f_ami_action_PJSIPAccessNetworkInfo(AMI_Msg_PT pt,
+					     template (value) charstring registration,
+					     template (value) charstring info) {
+	var charstring reg_action_id := f_gen_action_id();
+	f_ami_transceive_match_response_success(pt, ts_AMI_Action_PJSIPAccessNetworkInfo(registration, info, reg_action_id));
+}
+
 function f_ami_action_PJSIPRegister(AMI_Msg_PT pt, charstring register) {
 	var charstring reg_action_id := f_gen_action_id();
 	f_ami_transceive_match_response_success(pt, ts_AMI_Action_PJSIPRegister(register, reg_action_id));