asterisk: IMS: validate ICSI present in INVITE Contact header
Related: SYS#6984
Change-Id: I630f0aaef0436ea1c12e8fffef7a5c657cfcc35c
diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn
index 58ca87a..4f87f95 100644
--- a/asterisk/IMS_ConnectionHandler.ttcn
+++ b/asterisk/IMS_ConnectionHandler.ttcn
@@ -452,13 +452,16 @@
}
for (var integer i := 0; i < lengthof(caddrs); i := i + 1) {
var ContactAddress caddr := caddrs[i];
- /* "The UE must include the audio media feature tag, as defined in IETF RFC 3840,
- * in the Contact header field of the SIP INVITE request, and in the Contact header
- * field of the SIP response to the SIP INVITE request" */
if (not ispresent(caddr.contactParams)) {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
log2str(g_name & ": Received unexpected empty Contact attributes (omit)"));
}
+ /* GSMA FCM.01 3.2.3.3: "The INVITE request contains Within the Contact header [...] the IMS
+ * Communication Service Identifier's (ICSI) for IMS Multimedia Telephony" */
+ f_sip_param_match_value_or_fail(caddr.contactParams, "+g.3gpp.icsi-ref", "\"urn\\%3Aurn-7\\%3A3gpp-service.ims.icsi.mmtel\"");
+ /* "The UE must include the audio media feature tag, as defined in IETF RFC 3840,
+ * in the Contact header field of the SIP INVITE request, and in the Contact header
+ * field of the SIP response to the SIP INVITE request" */
f_sip_param_match_value_or_fail(caddr.contactParams, "audio", omit);
}
}