pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36796?usp=email )
(
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: SIP_Templates: Allow passing UserAgent field ......................................................................
SIP_Templates: Allow passing UserAgent field
This way it can be set to omit, since this field is not set by an IMS core.
Change-Id: Ib1e3e66b8fe46ad2626b07193dfcaa594f26352e --- M library/SIP_Templates.ttcn 1 file changed, 26 insertions(+), 7 deletions(-)
Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified
diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn index e1c9ec6..e6e8b53 100644 --- a/library/SIP_Templates.ttcn +++ b/library/SIP_Templates.ttcn @@ -228,6 +228,16 @@ optionsTags := optionsTags }
+// [20.41 RFC2616 14.43] +template (value) UserAgent ts_UserAgent(template (value) ServerVal_List userAgentBody := {}) := { + fieldName := USER_AGENT_E, + userAgentBody := userAgentBody +} +template (present) UserAgent tr_UserAgent(template (present) ServerVal_List userAgentBody := ?) := { + fieldName := USER_AGENT_E, + userAgentBody := userAgentBody +} +
template (value) SipAddr ts_SipAddr(template (value) HostPort host_port, template (omit) UserInfo user_info := omit, @@ -527,6 +537,7 @@ template (omit) Security_client security_client := omit, template (omit) Security_server security_server := omit, template (omit) Supported supported := omit, + template (omit) UserAgent userAgent := ts_UserAgent({ "osmo-ttcn3-hacks/0.23" }), template (omit) WwwAuthenticate wwwAuthenticate := omit ) modifies ts_SIP_msgHeader_empty := { allow := allow, @@ -557,12 +568,7 @@ addressField := to_addr.addr, toParams := to_addr.params }, - userAgent := { - fieldName := USER_AGENT_E, - userAgentBody := { - "osmo-ttcn3-hacks/0.23" - } - }, + userAgent := userAgent, via := via, wwwAuthenticate := wwwAuthenticate } @@ -582,6 +588,7 @@ template Security_client security_client := *, template Security_server security_server := *, template Supported supported := *, + template UserAgent userAgent := *, template WwwAuthenticate wwwAuthenticate := * ) modifies t_SIP_msgHeader_any := { allow := allow, @@ -611,7 +618,7 @@ addressField := to_addr.addr, toParams := to_addr.params }, - userAgent := *, + userAgent := userAgent, via := via, wwwAuthenticate := wwwAuthenticate }