pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36796?usp=email )


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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/96/36796/1

diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn
index 9b3d188..0b5c9bf 100644
--- a/library/SIP_Templates.ttcn
+++ b/library/SIP_Templates.ttcn
@@ -242,6 +242,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,
@@ -541,6 +551,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,
@@ -571,12 +582,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
 }
@@ -596,6 +602,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,
@@ -625,7 +632,7 @@
                addressField := to_addr.addr,
                toParams := to_addr.params
        },
-       userAgent := *,
+       userAgent := userAgent,
        via := via,
        wwwAuthenticate := wwwAuthenticate
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36796?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib1e3e66b8fe46ad2626b07193dfcaa594f26352e
Gerrit-Change-Number: 36796
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to