pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36782?usp=email )
Change subject: SIP_Templates: Allow passing Require,Security-client,Supported fields to REGISTER templates ......................................................................
SIP_Templates: Allow passing Require,Security-client,Supported fields to REGISTER templates
These fields are used in IMS.
Change-Id: I20a0df5633db8c0e7732659c1316b85e63317afc --- M library/SIP_Templates.ttcn 1 file changed, 84 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/82/36782/1
diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn index 2498f49..7e33b3b 100644 --- a/library/SIP_Templates.ttcn +++ b/library/SIP_Templates.ttcn @@ -197,6 +197,28 @@ deltaSec := deltaSec }
+ +// [20.32] +template (value) Require ts_Require(template (value) OptionTag_List optionsTags := {}) := { + fieldName := REQUIRE_E, + optionsTags := optionsTags +} +template (present) Require tr_Require(template (present) OptionTag_List optionsTags := ?) := { + fieldName := REQUIRE_E, + optionsTags := optionsTags +} + +// [20.37] +template (value) Supported ts_Supported(template (value) OptionTag_List optionsTags := {}) := { + fieldName := SUPPORTED_E, + optionsTags := optionsTags +} +template (present) Supported tr_Supported(template (present) OptionTag_List optionsTags := ?) := { + fieldName := SUPPORTED_E, + optionsTags := optionsTags +} + + template (value) SipAddr ts_SipAddr(template (value) HostPort host_port, template (omit) UserInfo user_info := omit, template (omit) charstring displayName := omit, @@ -442,6 +464,31 @@ challenge := challenge }
+// RFC3329 +template (present) Security_client +tr_Security_client(template (present) Security_mechanism_list sec_mechanism_list := ?) := { + fieldName := SECURITY_CLIENT_E, + sec_mechanism_list := sec_mechanism_list +} +template (value) Security_client +ts_Security_client(template (value) Security_mechanism_list sec_mechanism_list) := { + fieldName := SECURITY_CLIENT_E, + sec_mechanism_list := sec_mechanism_list +} + +template (present) Security_mechanism +tr_Security_mechanism(template (present) charstring name := ?, + template SemicolonParam_List params := *) := { + mechanism_name := name, + mechanism_params := params +} +template (value) Security_mechanism +ts_Security_mechanism(template (value) charstring name, + template (omit) SemicolonParam_List params := omit) := { + mechanism_name := name, + mechanism_params := params +} + template (value) MessageHeader ts_SIP_msgHeader_empty := c_SIP_msgHeader_empty; template (value) MessageHeader ts_SIP_msgh_std(template (value) CallidString call_id, @@ -455,6 +502,9 @@ template (omit)Authorization authorization := omit, template (value) Method_List allow_methods := c_SIP_defaultMethods, template (omit) Expires expires := omit, + template (omit) Require require := omit, + template (omit) Security_client security_client := omit, + template (omit) Supported supported := omit, template (omit) WwwAuthenticate wwwAuthenticate := omit ) modifies ts_SIP_msgHeader_empty := { allow := { @@ -479,6 +529,9 @@ addressField := from_addr.addr, fromParams := from_addr.params }, + require := require, + security_client := security_client, + supported := supported, toField := { fieldName := TO_E, addressField := to_addr.addr, @@ -520,6 +573,9 @@ template integer seq_nr := ?, template Method_List allow_methods := *, template Expires expires := *, + template Require require := *, + template Security_client security_client := *, + template Supported supported := *, template WwwAuthenticate wwwAuthenticate := * ) modifies t_SIP_msgHeader_any := { allow := tr_AllowMethods(allow_methods), @@ -540,6 +596,9 @@ addressField := from_addr.addr, fromParams := from_addr.params }, + require := require, + security_client := security_client, + supported := supported, toField := { fieldName := TO_E, addressField := to_addr.addr, @@ -561,13 +620,19 @@ template (omit) Contact contact, template (omit) Expires expires, template (omit) Authorization authorization := omit, + template (omit) Require require := omit, + template (omit) Security_client security_client := omit, + template (omit) Supported supported := omit, template (omit) charstring body := omit) := { requestLine := ts_SIP_ReqLine(REGISTER_E, sip_url_host_port), msgHeader := ts_SIP_msgh_std(call_id, from_addr, to_addr, contact, "REGISTER", seq_nr, via, f_ContentTypeOrOmit(ts_CT_SDP, body), authorization := authorization, - expires := expires), + expires := expires, + require := require, + security_client := security_client, + supported := supported), messageBody := body, payload := omit } @@ -580,11 +645,17 @@ template integer seq_nr := *, template Contact contact := *, template Expires expires := *, + template Require require := *, + template Security_client security_client := *, + template Supported supported := *, template charstring body := *) := { requestLine := tr_SIP_ReqLine(REGISTER_E, sip_url_host_port), msgHeader := tr_SIP_msgh_std(call_id, from_addr, to_addr, contact, via, "REGISTER", *, seq_nr, - expires := expires), + expires := expires, + require := require, + security_client := security_client, + supported := supported), messageBody := body, payload := omit }