pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36780?usp=email )
Change subject: SIP_Templates: Allow setting transport in Via templates
......................................................................
SIP_Templates: Allow setting transport in Via templates
This is needed when using IMS, since TCP is used.
Change-Id: Id45491615bcb5c074ef4fc298cbb24b2e034972d
---
M asterisk/SIP_ConnectionHandler.ttcn
M library/SIP_Templates.ttcn
2 files changed, 17 insertions(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/asterisk/SIP_ConnectionHandler.ttcn b/asterisk/SIP_ConnectionHandler.ttcn
index 13b5f04..9c7cca5 100644
--- a/asterisk/SIP_ConnectionHandler.ttcn
+++ b/asterisk/SIP_ConnectionHandler.ttcn
@@ -178,6 +178,7 @@
{ id := "received", paramValue := g_pars.remote_sip_host }
}; */
return tr_Via_from(via_req.viaBody[0].sentBy,
+ via_req.viaBody[0].sentProtocol.transport,
via_resp_params);
}
diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn
index 3492dc4..e22646c 100644
--- a/library/SIP_Templates.ttcn
+++ b/library/SIP_Templates.ttcn
@@ -372,22 +372,24 @@
mediaType := "application/sdp"
};
-template (value) Via ts_Via_from(template (value) HostPort addr) := {
+template (value) Via ts_Via_from(template (value) HostPort addr,
+ template (value) charstring transport := "UDP") := {
fieldName := VIA_E,
viaBody := {
{
- sentProtocol := { "SIP", "2.0", "UDP" },
+ sentProtocol := { "SIP", "2.0", transport },
sentBy := addr,
viaParams := omit
}
}
}
template (present) Via tr_Via_from(template (present) HostPort host_port := ?,
+ template (present) charstring transport := ?,
template SemicolonParam_List viaParams := *) := {
fieldName := VIA_E,
viaBody := {
{
- sentProtocol := { "SIP", "2.0", "UDP" },
+ sentProtocol := { "SIP", "2.0", ? },
sentBy := host_port,
viaParams := viaParams
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36780?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: Id45491615bcb5c074ef4fc298cbb24b2e034972d
Gerrit-Change-Number: 36780
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged