lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

July 2024

  • 1 participants
  • 1379 discussions
[S] Change in osmo-ttcn3-hacks[master]: asterisk: IMS: Validate Accept header in MO INVITE
by pespin 02 Jul '24

02 Jul '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37313?usp=email ) Change subject: asterisk: IMS: Validate Accept header in MO INVITE ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37313?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: I7e419ae1cde384590b54c87c198cc411640c4594 Gerrit-Change-Number: 37313 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jul 2024 12:49:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: asterisk: Set DedicatedBearerStatus to Down when call finishes
by pespin 02 Jul '24

02 Jul '24
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37312?usp=email ) Change subject: asterisk: Set DedicatedBearerStatus to Down when call finishes ...................................................................... Patch Set 2: Code-Review+2 (1 comment) File asterisk/IMS_ConnectionHandler.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37312/comment/da1a7863_f2cb… PS1, Line 169: > (unrelated whitespace) Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37312?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: Idf4d250e6edb830fe7e2d85dc15e0b3c4d8c3a8b Gerrit-Change-Number: 37312 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jul 2024 12:49:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: asterisk: Set DedicatedBearerStatus to Down when call finishes
by pespin 02 Jul '24

02 Jul '24
Attention is currently required from: neels, pespin. Hello Jenkins Builder, neels, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37312?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by neels, Verified+1 by Jenkins Builder Change subject: asterisk: Set DedicatedBearerStatus to Down when call finishes ...................................................................... asterisk: Set DedicatedBearerStatus to Down when call finishes Update the correct state so that asterisk doesn't believe the bearer is still up. Change-Id: Idf4d250e6edb830fe7e2d85dc15e0b3c4d8c3a8b --- M asterisk/Asterisk_Tests.ttcn 1 file changed, 33 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/37312/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37312?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: Idf4d250e6edb830fe7e2d85dc15e0b3c4d8c3a8b Gerrit-Change-Number: 37312 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: asterisk: IMS: Support validating Session-Expires and Min-SE during I...
by pespin 02 Jul '24

02 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37304?usp=email ) Change subject: asterisk: IMS: Support validating Session-Expires and Min-SE during INVITE ...................................................................... asterisk: IMS: Support validating Session-Expires and Min-SE during INVITE Related: SYS#6987 Change-Id: Ie0d19243578f6a5e2962216a869694f7df7ea9cd --- M asterisk/IMS_ConnectionHandler.ttcn M library/SIP_Templates.ttcn 2 files changed, 94 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve neels: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn index a46d62f..bb5223a 100644 --- a/asterisk/IMS_ConnectionHandler.ttcn +++ b/asterisk/IMS_ConnectionHandler.ttcn @@ -119,18 +119,32 @@ type record IMS_CallParsMO { /* Whether to COORD.send(IMS_COORD_CMD_CALL_TRYING) when receiving an INVITE from UE. */ - boolean tx_coord_cmd_invite_trying + boolean tx_coord_cmd_invite_trying, + /* Whether to announce "Support: timer" and Session-Expires header */ + boolean support_timer_enable, + integer support_timer_session_expires, + integer support_timer_exp_min_se } template (value) IMS_CallParsMO t_IMS_CallParsMO := { - tx_coord_cmd_invite_trying := false + tx_coord_cmd_invite_trying := false, + support_timer_enable := false, + support_timer_session_expires := 0, + support_timer_exp_min_se := 0 } type record IMS_CallParsMT { /* Whether to COORD.send(IMS_COORD_CMD_CALL_SESSION_PROGRESS) when receiving an 183 Session Progress from UE. */ - boolean tx_coord_cmd_session_progress + boolean tx_coord_cmd_session_progress, + /* Whether to announce "Support: timer" and Session-Expires header */ + boolean support_timer_enable, + integer support_timer_session_expires, + integer support_timer_min_se } template (value) IMS_CallParsMT t_IMS_CallParsMT := { - tx_coord_cmd_session_progress := false + tx_coord_cmd_session_progress := false, + support_timer_enable := false, + support_timer_session_expires := 0, + support_timer_min_se := 90 } type record IMS_CallPars { @@ -1104,7 +1118,10 @@ var template (present) To to_addr_exp; var Via via; var template (omit) Require require := omit; + var template (omit) Min_SE min_SE := omit; + var template (omit) Session_expires session_expires := omit; var template (omit) Supported supported := omit; + var OptionTag_List supported_list := {}; var charstring tx_sdp; var default d_trying, d_ringing; var charstring branch_value; @@ -1130,19 +1147,33 @@ if (g_pars.subscr.cp.support_precondition_ext) { /* indicate the support for "reliable provisional response" * and "preconditions mechanism" */ - supported := ts_Supported({ "100rel", "precondition" }); + supported_list := supported_list & { "100rel", "precondition" }; tx_sdp := f_gen_sdp(IMS_GEN_SDP_MO_INVITE); } else { /* Don't add any preconditions to SDP: */ tx_sdp := f_gen_sdp(IMS_GEN_SDP_None); } + if (g_pars.subscr.cp.mt.support_timer_enable) { + supported_list := supported_list & { "timer" }; + if (g_pars.subscr.cp.mt.support_timer_session_expires > 0) { + session_expires := ts_Session_expires(int2str(g_pars.subscr.cp.mt.support_timer_session_expires)); + min_SE := ts_Min_SE(int2str(g_pars.subscr.cp.mt.support_timer_min_se)); + } + } + + if (lengthof(supported_list) > 0) { + supported := ts_Supported(supported_list); + } + req := ts_SIP_INVITE(g_pars.subscr.cp.sip_call_id, g_pars.subscr.cp.from_addr, g_pars.subscr.cp.to_addr, via, calling_contact, g_pars.subscr.cp.sip_seq_nr, + min_SE := min_SE, + session_expires := session_expires, supported := supported, body := tx_sdp); @@ -1373,12 +1404,19 @@ tr_From(tr_Addr_Union_from_val(g_pars.subscr.cp.calling.addr), *), tr_To(tr_Addr_Union_from_val(g_pars.subscr.cp.called.addr), *), tr_Via_from(f_tr_HostPort(g_pars.subscr.remote_sip_host, g_pars.subscr.ipsec_remote_port_s)), - ?, ?); + ?, + supported := tr_Supported(superset("timer")), + body := ?); var charstring sip_expect_str := log2str(exp_req); [] SIP.receive(exp_req) -> value g_rx_sip_req { var template (value) PDU_SIP_Response tx_resp; var Via invite_via; + var template (omit) Require require := omit; + var template (omit) Session_expires session_expires := omit; + var template (omit) Supported supported := omit; + var OptionTag_List supported_list := {}; + var OptionTag_List require_list := {}; var template (omit) charstring tx_sdp; var integer invite_seq_nr; var boolean peer_support_precondition := match(g_rx_sip_req.msgHeader.supported.optionsTags, @@ -1394,6 +1432,29 @@ f_ims_validate_INVITE_Contact(g_rx_sip_req.msgHeader.contact); f_ims_validate_INVITE_SDP(g_pars.subscr.cp.peer_sdp); + if (g_pars.subscr.cp.mo.support_timer_enable) { + supported_list := supported_list & { "timer" }; + if (g_pars.subscr.cp.mo.support_timer_session_expires > 0) { + session_expires := ts_Session_expires(int2str(g_pars.subscr.cp.mo.support_timer_session_expires), + {ts_Param("refresher", "uac")}); + } + } + if (lengthof(supported_list) > 0) { + supported := ts_Supported(supported_list); + } + if (g_pars.subscr.cp.mo.support_timer_exp_min_se > 0) { + if (not ispresent(g_rx_sip_req.msgHeader.min_SE)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str(g_name & ": Missing 'Min_SE' header in INVITE: ", g_rx_sip_req)); + } + if (str2int(g_rx_sip_req.msgHeader.min_SE.deltaSec) != g_pars.subscr.cp.mo.support_timer_exp_min_se) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str(g_name & ": Received unexpected Min_SE := ", + g_rx_sip_req.msgHeader.min_SE.deltaSec, + "\nvs exp := ", g_pars.subscr.cp.mo.support_timer_exp_min_se)); + } + } + if (g_pars.subscr.cp.require_precondition_ext and not peer_support_precondition) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str(g_name & ": Missing '100rel,precondition' in INVITE Supported header: ", @@ -1479,7 +1540,8 @@ g_pars.subscr.cp.to_addr, f_tr_Via_response(invite_via), g_pars.subscr.cp.sip_seq_nr + 2, - require := tr_Require(superset("precondition")), + require := tr_Require(superset("sec-agree", "precondition")), + supported := tr_Supported(superset("100rel", "timer")), body := ?); as_SIP_expect_req(exp_req); @@ -1510,6 +1572,8 @@ g_pars.subscr.cp.sip_seq_nr + 2, "OK", g_rx_sip_req.msgHeader.via /* UPDATE's new branch */, + session_expires := session_expires, + supported := supported, body := tx_sdp); SIP.send(tx_resp); @@ -1541,6 +1605,13 @@ /* Tx 200 OK */ + if (g_pars.subscr.cp.mo.support_timer_enable) { + require_list := require_list & { "timer" }; + } + if (lengthof(require_list) > 0) { + require := ts_Require(require_list); + } + tx_sdp := f_gen_sdp(); tx_resp := ts_SIP_Response(g_pars.subscr.cp.sip_call_id, g_pars.subscr.cp.from_addr, @@ -1549,6 +1620,9 @@ invite_seq_nr, "OK", invite_via, + require := require, + session_expires := session_expires, + supported := supported, body := tx_sdp); SIP.send(tx_resp); diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn index f97e3b7..ffc4550 100644 --- a/library/SIP_Templates.ttcn +++ b/library/SIP_Templates.ttcn @@ -1060,12 +1060,14 @@ template Via via, template integer seq_nr, template Require require := *, + template Supported supported := *, template charstring body) := { requestLine := tr_SIP_ReqLine(UPDATE_E, uri), msgHeader := tr_SIP_msgh_std(call_id, from_addr, to_addr, *, via, "UPDATE", seq_nr, - require := require), + require := require, + supported := supported), messageBody := body, payload := omit } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37304?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: Ie0d19243578f6a5e2962216a869694f7df7ea9cd Gerrit-Change-Number: 37304 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: asterisk: Introduce test TC_ims_call_mo_session_timer
by pespin 02 Jul '24

02 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37310?usp=email ) Change subject: asterisk: Introduce test TC_ims_call_mo_session_timer ...................................................................... asterisk: Introduce test TC_ims_call_mo_session_timer Related: SYS#6987 Change-Id: Ia87feb6499283a7b51644c391c94a2259415bca2 --- M asterisk/Asterisk_Tests.ttcn M asterisk/IMS_ConnectionHandler.ttcn M asterisk/SIP_ConnectionHandler.ttcn M asterisk/expected-results.xml 4 files changed, 155 insertions(+), 38 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved neels: Looks good to me, but someone else must approve diff --git a/asterisk/Asterisk_Tests.ttcn b/asterisk/Asterisk_Tests.ttcn index 73e8183..f6b6b3e 100644 --- a/asterisk/Asterisk_Tests.ttcn +++ b/asterisk/Asterisk_Tests.ttcn @@ -215,6 +215,7 @@ COORD.receive(COORD_CMD_HANGUP); f_SIP_do_call_hangup(); + COORD.receive(COORD_CMD_UNREGISTER); f_SIP_unregister(); setverdict(pass); @@ -242,6 +243,8 @@ } as_SIP_exp_call_hangup(g_pars.cp.sip_seq_nr + 1); + COORD.send(COORD_CMD_CALL_FINISHED); + COORD.receive(COORD_CMD_UNREGISTER); f_SIP_unregister(); setverdict(pass); @@ -280,7 +283,10 @@ f_sleep(1.0); COORD.send(COORD_CMD_HANGUP) to vc_conn[0]; + COORD.receive(COORD_CMD_CALL_FINISHED) from vc_conn[1]; + COORD.send(COORD_CMD_UNREGISTER) to vc_conn[0]; + COORD.send(COORD_CMD_UNREGISTER) to vc_conn[1]; vc_conn[0].done; vc_conn[1].done; @@ -353,6 +359,12 @@ COORD.send(COORD_CMD_HANGUP) to vc_conn_list[vc_conn_mo_idx]; + COORD.receive(COORD_CMD_CALL_FINISHED) from vc_conn_list[vc_conn_mt_idx]; + + for (var integer i := 0; i < num_conns; i := i + 1) { + COORD.send(COORD_CMD_UNREGISTER) to vc_conn_list[i]; + } + for (var integer i := 0; i < num_conns; i := i + 1) { vc_conn_list[i].done; } @@ -656,34 +668,8 @@ f_shutdown(); } -/* Test IMS MO call emulating an MT which doesn't support precondition */ -private function f_TC_ims_call_mo_IMS_ConnHdlr(charstring id) runs on IMS_ConnHdlr { - f_create_sip_expect(valueof(ts_SipUrl_from_Addr_Union(g_pars.subscr.registrar_sip_record.addr))); - if (ispresent(g_pars.subscr.cp.called)) { - f_create_sip_expect(valueof(ts_SipUrl_from_Addr_Union(g_pars.subscr.cp.called.addr))); - } - as_IMS_register(); - setverdict(pass); - as_IMS_mo_call_accept(); - setverdict(pass); - COORD.send(COORD_CMD_CALL_ESTABLISHED); - as_IMS_exp_call_hangup(g_pars.subscr.cp.sip_seq_nr + 1); - setverdict(pass); - as_IMS_unregister(); -} -private function f_TC_ims_call_mo(boolean use_precondition_ext) runs on test_CT { - var SIPConnHdlrPars sip_pars; - var IMS_ConnHdlrPars ims_pars; - var SIPConnHdlr vc_conn_sip; - var IMS_ConnHdlr vc_conn_ims; - var AMI_Msg ami_msg; +private function f_ims_call_mo_configure(inout SIPConnHdlrPars sip_pars, inout IMS_ConnHdlrPars ims_pars) runs on test_CT { const charstring c_ext_msisdn := "90829"; - - f_init(); - - sip_pars := f_init_ConnHdlrPars(idx := 1); - ims_pars := f_init_IMS_ConnHdlrPars(); - sip_pars.cp.calling := sip_pars.registrar_sip_record; sip_pars.cp.called := valueof(ts_SipAddr(ts_HostPort(sip_pars.remote_sip_host), ts_UserInfo(c_ext_msisdn))); @@ -691,16 +677,10 @@ ts_UserInfo(ims_pars.subscr.msisdn))); ims_pars.subscr.cp.called := valueof(ts_SipAddr(ts_HostPort(ims_pars.realm), ts_UserInfo(c_ext_msisdn))); - ims_pars.subscr.cp.support_precondition_ext := use_precondition_ext; - ims_pars.subscr.cp.require_precondition_ext := use_precondition_ext; - ims_pars.subscr.cp.mo.tx_coord_cmd_invite_trying := true; +} - vc_conn_ims := f_start_handler_IMS(refers(f_TC_ims_call_mo_IMS_ConnHdlr), ims_pars); - vc_conn_sip := f_start_handler(refers(f_TC_internal_call_mo), sip_pars); - - COORD.receive(COORD_CMD_REGISTERED) from vc_conn_sip; - - f_AMI_IMS_register(ims_pars); +private function f_ims_call_mo_establish(inout SIPConnHdlr vc_conn_sip, inout IMS_ConnHdlr vc_conn_ims) runs on test_CT { + var AMI_Msg ami_msg; COORD.send(COORD_CMD_START) to vc_conn_sip; @@ -714,14 +694,84 @@ COORD.receive(COORD_CMD_CALL_ESTABLISHED) from vc_conn_sip; IMS_COORD.receive(COORD_CMD_CALL_ESTABLISHED) from vc_conn_ims; +} + +/* Test IMS MO call emulating an MT which doesn't support precondition */ +private function f_TC_ims_call_mo_IMS_ConnHdlr(charstring id) runs on IMS_ConnHdlr { + f_create_sip_expect(valueof(ts_SipUrl_from_Addr_Union(g_pars.subscr.registrar_sip_record.addr))); + if (ispresent(g_pars.subscr.cp.called)) { + f_create_sip_expect(valueof(ts_SipUrl_from_Addr_Union(g_pars.subscr.cp.called.addr))); + } + as_IMS_register(); + setverdict(pass); + as_IMS_mo_call_accept(); + setverdict(pass); + COORD.send(COORD_CMD_CALL_ESTABLISHED); + if (g_pars.subscr.cp.mo.support_timer_session_expires > 0) { + timer Trefresh; + Trefresh.start(int2float(g_pars.subscr.cp.mo.support_timer_session_expires)); + alt { + [] as_IMS_exp_call_refresh(); + [] Trefresh.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str(g_name & ": Timeout waiting for Session Refresh")); + } + } + Trefresh.stop; + /* Sleep to make sure response arrives to the peer */ + f_sleep(1.0); + COORD.send(IMS_COORD_CMD_CALL_SESSION_REFRESH); + } + as_IMS_exp_call_hangup(g_pars.subscr.cp.sip_seq_nr + 1); + COORD.send(IMS_COORD_CMD_CALL_FINISHED); + setverdict(pass); + as_IMS_unregister(); +} + +private function f_TC_ims_call_mo(boolean use_precondition_ext, boolean use_session_timer) runs on test_CT { + var SIPConnHdlrPars sip_pars; + var IMS_ConnHdlrPars ims_pars; + var SIPConnHdlr vc_conn_sip; + var IMS_ConnHdlr vc_conn_ims; + + f_init(); + + sip_pars := f_init_ConnHdlrPars(idx := 1); + ims_pars := f_init_IMS_ConnHdlrPars(); + + f_ims_call_mo_configure(sip_pars, ims_pars); + ims_pars.subscr.cp.support_precondition_ext := use_precondition_ext; + ims_pars.subscr.cp.require_precondition_ext := use_precondition_ext; + ims_pars.subscr.cp.mo.tx_coord_cmd_invite_trying := true; + ims_pars.subscr.cp.mo.support_timer_enable := use_session_timer; + if (use_session_timer) { + sip_pars.t_guard := 120.0; + ims_pars.t_guard := 120.0; + ims_pars.subscr.cp.mo.support_timer_exp_min_se := 90; + ims_pars.subscr.cp.mo.support_timer_session_expires := 90; + + } + + vc_conn_ims := f_start_handler_IMS(refers(f_TC_ims_call_mo_IMS_ConnHdlr), ims_pars); + vc_conn_sip := f_start_handler(refers(f_TC_internal_call_mo), sip_pars); + + COORD.receive(COORD_CMD_REGISTERED) from vc_conn_sip; + + f_AMI_IMS_register(ims_pars); + + f_ims_call_mo_establish(vc_conn_sip, vc_conn_ims); /* Call on-going */ + if (use_session_timer) { + IMS_COORD.receive(IMS_COORD_CMD_CALL_SESSION_REFRESH); + } f_sleep(1.0); COORD.send(COORD_CMD_HANGUP) to vc_conn_sip; + IMS_COORD.receive(IMS_COORD_CMD_CALL_FINISHED) from vc_conn_ims; /* Trigger unregistration: */ f_sleep(1.0); + COORD.send(COORD_CMD_UNREGISTER) to vc_conn_sip; AMI_CLIENT.clear; f_AMI_IMS_unregister(ims_pars); @@ -730,10 +780,13 @@ f_shutdown(); } testcase TC_ims_call_mo() runs on test_CT { - f_TC_ims_call_mo(true); + f_TC_ims_call_mo(true, false); +} +testcase TC_ims_call_mo_session_timer() runs on test_CT { + f_TC_ims_call_mo(true, true); } testcase TC_ims_call_mo_noprecondition() runs on test_CT { - f_TC_ims_call_mo(false); + f_TC_ims_call_mo(false, false); } /* Test SIP registration of local clients */ @@ -839,6 +892,7 @@ execute( TC_ims_registration_423_interval_too_brief() ); execute( TC_ims_reregistration() ); execute( TC_ims_call_mo() ); + execute( TC_ims_call_mo_session_timer() ); execute( TC_ims_call_mo_noprecondition() ); execute( TC_ims_call_mt() ); execute( TC_ims_call_mt_noprecondition() ); diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn index bb5223a..881240b 100644 --- a/asterisk/IMS_ConnectionHandler.ttcn +++ b/asterisk/IMS_ConnectionHandler.ttcn @@ -47,8 +47,10 @@ const charstring IMS_COORD_CMD_START := "IMS_COORD_CMD_START"; const charstring IMS_COORD_CMD_CALL_ESTABLISHED := "IMS_COORD_CMD_CALL_ESTABLISHED"; const charstring IMS_COORD_CMD_HANGUP := "IMS_COORD_CMD_HANGUP"; +const charstring IMS_COORD_CMD_CALL_FINISHED := "IMS_COORD_CMD_CALL_FINISHED"; const charstring IMS_COORD_CMD_CALL_TRYING := "IMS_COORD_CMD_CALL_TRYING"; const charstring IMS_COORD_CMD_CALL_SESSION_PROGRESS := "IMS_COORD_CMD_CALL_SESSION_PROGRESS"; +const charstring IMS_COORD_CMD_CALL_SESSION_REFRESH := "IMS_COORD_CMD_CALL_SESSION_REFRESH"; type component IMS_ConnHdlr extends SIP_ConnHdlr { var charstring g_name; @@ -1678,4 +1680,52 @@ [fail_others] as_SIP_fail_req(sip_expect_str); } +private function f_IMS_answer_call_refresh(PDU_SIP_Request req) runs on IMS_ConnHdlr { + var template (value) PDU_SIP_Response tx_resp; + /* Tx 200 OK response*/ + tx_resp := ts_SIP_Response(g_pars.subscr.cp.sip_call_id, + g_pars.subscr.cp.from_addr, + g_pars.subscr.cp.to_addr, + g_rx_sip_req.msgHeader.cSeq.method, 200, + g_rx_sip_req.msgHeader.cSeq.seqNumber, + "OK", + g_rx_sip_req.msgHeader.via, + session_expires := ts_Session_expires(int2str(g_pars.subscr.cp.mo.support_timer_session_expires), + {ts_Param("refresher", "uac")}), + supported := ts_Supported({"timer"}), + body := omit); + SIP.send(tx_resp); +} +/* Session Timer, RFC 4028 */ +altstep as_IMS_exp_call_refresh() runs on IMS_ConnHdlr +{ + /* RFC4028 section 7.4. It can be either INVITE or UPDATE: */ + var template (present) PDU_SIP_Request exp_req_invite := + tr_SIP_INVITE(f_tr_SipUrl_opt_defport(ts_SipUrl_from_Addr_Union(g_pars.subscr.cp.called.addr)), + ?, + tr_From(tr_Addr_Union_from_val(g_pars.subscr.cp.calling.addr), *), + tr_To(tr_Addr_Union_from_val(g_pars.subscr.cp.called.addr), *), + tr_Via_from(f_tr_HostPort(g_pars.subscr.remote_sip_host, g_pars.subscr.ipsec_remote_port_s)), + ?, + supported := tr_Supported(superset("timer")), + body := *); + + var template (present) PDU_SIP_Request exp_req_update := + tr_SIP_UPDATE(f_tr_SipUrl_opt_defport(ts_SipUrl_from_Addr_Union(g_pars.subscr.cp.called.addr)), + g_pars.subscr.cp.sip_call_id, + g_pars.subscr.cp.from_addr, + g_pars.subscr.cp.to_addr, + tr_Via_from(f_tr_HostPort(g_pars.subscr.remote_sip_host, g_pars.subscr.ipsec_remote_port_s)), + ?, + body := *); + + [] SIP.receive(exp_req_invite) -> value g_rx_sip_req { + f_IMS_answer_call_refresh(g_rx_sip_req); + g_pars.subscr.cp.sip_seq_nr := g_rx_sip_req.msgHeader.cSeq.seqNumber; + } + [] SIP.receive(exp_req_update) -> value g_rx_sip_req { + f_IMS_answer_call_refresh(g_rx_sip_req); + g_pars.subscr.cp.sip_seq_nr := g_rx_sip_req.msgHeader.cSeq.seqNumber; + } +} } diff --git a/asterisk/SIP_ConnectionHandler.ttcn b/asterisk/SIP_ConnectionHandler.ttcn index 5aa3773..3bc4f1d 100644 --- a/asterisk/SIP_ConnectionHandler.ttcn +++ b/asterisk/SIP_ConnectionHandler.ttcn @@ -34,6 +34,8 @@ const charstring COORD_CMD_CALL_ESTABLISHED := "COORD_CMD_CALL_ESTABLISHED"; const charstring COORD_CMD_CALL_CANCELLED := "COORD_CMD_CALL_CANCELLED"; const charstring COORD_CMD_HANGUP := "COORD_CMD_HANGUP"; +const charstring COORD_CMD_CALL_FINISHED := "COORD_CMD_CALL_FINISHED"; +const charstring COORD_CMD_UNREGISTER := "IMS_COORD_CMD_UNREGISTER"; type component SIPConnHdlr extends SIP_ConnHdlr { var charstring g_name; diff --git a/asterisk/expected-results.xml b/asterisk/expected-results.xml index 26c2fa4..179ee70 100644 --- a/asterisk/expected-results.xml +++ b/asterisk/expected-results.xml @@ -15,6 +15,7 @@ <testcase classname='Asterisk_Tests' name='TC_ims_registration_423_interval_too_brief' time='MASKED'/> <testcase classname='Asterisk_Tests' name='TC_ims_reregistration' time='MASKED'/> <testcase classname='Asterisk_Tests' name='TC_ims_call_mo' time='MASKED'/> + <testcase classname='Asterisk_Tests' name='TC_ims_call_mo_session_timer' time='MASKED'/> <testcase classname='Asterisk_Tests' name='TC_ims_call_mo_noprecondition' time='MASKED'/> <testcase classname='Asterisk_Tests' name='TC_ims_call_mt' time='MASKED'/> <testcase classname='Asterisk_Tests' name='TC_ims_call_mt_noprecondition' time='MASKED'/> -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37310?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: Ia87feb6499283a7b51644c391c94a2259415bca2 Gerrit-Change-Number: 37310 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: asterisk: Introduce test TC_ims_call_mo_session_timer
by pespin 02 Jul '24

02 Jul '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37310?usp=email ) Change subject: asterisk: Introduce test TC_ims_call_mo_session_timer ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37310?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: Ia87feb6499283a7b51644c391c94a2259415bca2 Gerrit-Change-Number: 37310 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jul 2024 12:46:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: asterisk: IMS: fix SDP precondition validation
by pespin 02 Jul '24

02 Jul '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37322?usp=email ) Change subject: asterisk: IMS: fix SDP precondition validation ...................................................................... asterisk: IMS: fix SDP precondition validation Change-Id: I8e22f76f7c0a8e6fda70252b330b1b174ca5c66f --- M asterisk/IMS_ConnectionHandler.ttcn M library/SDP_Templates.ttcn 2 files changed, 39 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/22/37322/1 diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn index 95f6852..3e2ca45 100644 --- a/asterisk/IMS_ConnectionHandler.ttcn +++ b/asterisk/IMS_ConnectionHandler.ttcn @@ -1201,9 +1201,12 @@ f_tr_Via_response(via), g_pars.subscr.cp.sip_seq_nr, "INVITE", require := tr_Require(superset("100rel", "precondition")), - rseq := tr_RSeq(?)); + rseq := tr_RSeq(?), + body := ?); alt { - [] SIP.receive(exp) -> value g_rx_sip_resp; + [] SIP.receive(exp) -> value g_rx_sip_resp { + f_SDP_decodeMessage(g_rx_sip_resp.messageBody, g_pars.subscr.cp.peer_sdp); + }; [] SIP.receive(tr_SIP_Response_Ringing(?, ?, ?)) -> value g_rx_sip_resp { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str(g_name & ": Expected 183 Session Progress instead of 180 Ringing: ", @@ -1224,11 +1227,11 @@ tr_SDP_des(c_SDP_PRECON_STRENGTH_TAG_mandatory, c_SDP_PRECON_STATUS_TYPE_local, c_SDP_PRECON_DIR_TAG_sendrecv), tr_SDP_des(c_SDP_PRECON_STRENGTH_TAG_mandatory, c_SDP_PRECON_STATUS_TYPE_remote, c_SDP_PRECON_DIR_TAG_sendrecv), tr_SDP_conf(c_SDP_PRECON_STATUS_TYPE_remote, c_SDP_PRECON_DIR_TAG_sendrecv)); - if (not ispresent(g_pars.subscr.cp.peer_sdp.attributes) or - not match(g_pars.subscr.cp.peer_sdp.attributes, preconds)) { + if (not ispresent(g_pars.subscr.cp.peer_sdp.media_list[0].attributes) or + not match(g_pars.subscr.cp.peer_sdp.media_list[0].attributes, preconds)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str(g_name & ": Unexpected precondition attrs in Session Progress : ", - g_pars.subscr.cp.peer_sdp.attributes)); + g_pars.subscr.cp.peer_sdp.media_list[0].attributes)); } /* Tx PRACK */ @@ -1295,11 +1298,11 @@ tr_SDP_curr(c_SDP_PRECON_STATUS_TYPE_remote, c_SDP_PRECON_DIR_TAG_sendrecv), tr_SDP_des(c_SDP_PRECON_STRENGTH_TAG_mandatory, c_SDP_PRECON_STATUS_TYPE_local, c_SDP_PRECON_DIR_TAG_sendrecv), tr_SDP_des(c_SDP_PRECON_STRENGTH_TAG_mandatory, c_SDP_PRECON_STATUS_TYPE_remote, c_SDP_PRECON_DIR_TAG_sendrecv)); - if (not ispresent(g_pars.subscr.cp.peer_sdp.attributes) or - not match(g_pars.subscr.cp.peer_sdp.attributes, preconds)) { + if (not ispresent(g_pars.subscr.cp.peer_sdp.media_list[0].attributes) or + not match(g_pars.subscr.cp.peer_sdp.media_list[0].attributes, preconds)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str(g_name & ": Unexpected precondition attrs in 200 OK (UPDATE): ", - g_pars.subscr.cp.peer_sdp.attributes)); + g_pars.subscr.cp.peer_sdp.media_list[0].attributes)); } g_pars.subscr.cp.sip_seq_nr := g_rx_sip_resp.msgHeader.cSeq.seqNumber + 1; @@ -1499,11 +1502,12 @@ tr_SDP_curr(c_SDP_PRECON_STATUS_TYPE_remote, c_SDP_PRECON_DIR_TAG_none), tr_SDP_des(c_SDP_PRECON_STRENGTH_TAG_mandatory, c_SDP_PRECON_STATUS_TYPE_local, c_SDP_PRECON_DIR_TAG_sendrecv), tr_SDP_des(c_SDP_PRECON_STRENGTH_TAG_optional, c_SDP_PRECON_STATUS_TYPE_remote, c_SDP_PRECON_DIR_TAG_sendrecv)); - if (not ispresent(g_pars.subscr.cp.peer_sdp.attributes) or - not match(g_pars.subscr.cp.peer_sdp.attributes, preconds)) { + if (not ispresent(g_pars.subscr.cp.peer_sdp.media_list[0].attributes) or + not match(g_pars.subscr.cp.peer_sdp.media_list[0].attributes, preconds)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str(g_name & ": Unexpected precondition attrs in INVITE : ", - g_pars.subscr.cp.peer_sdp.attributes)); + g_pars.subscr.cp.peer_sdp.media_list[0].attributes, + " vs exp: ", preconds)); } /* Tx 183 Session Progress */ @@ -1550,6 +1554,7 @@ supported := tr_Supported(superset("100rel", "timer")), body := ?); as_SIP_expect_req(exp_req); + f_SDP_decodeMessage(g_rx_sip_req.messageBody, g_pars.subscr.cp.peer_sdp); /* Validate SDP in UPDATE contains the preconditions: * a=curr:qos local sendrecv @@ -1562,11 +1567,12 @@ tr_SDP_curr(c_SDP_PRECON_STATUS_TYPE_remote, c_SDP_PRECON_DIR_TAG_none), tr_SDP_des(c_SDP_PRECON_STRENGTH_TAG_mandatory, c_SDP_PRECON_STATUS_TYPE_local, c_SDP_PRECON_DIR_TAG_sendrecv), tr_SDP_des(c_SDP_PRECON_STRENGTH_TAG_mandatory, c_SDP_PRECON_STATUS_TYPE_remote, c_SDP_PRECON_DIR_TAG_sendrecv)); - if (not ispresent(g_pars.subscr.cp.peer_sdp.attributes) or - not match(g_pars.subscr.cp.peer_sdp.attributes, preconds)) { + if (not ispresent(g_pars.subscr.cp.peer_sdp.media_list[0].attributes) or + not match(g_pars.subscr.cp.peer_sdp.media_list[0].attributes, preconds)) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str(g_name & ": Unexpected precondition attrs in UPDATE: ", - g_pars.subscr.cp.peer_sdp.attributes)); + g_pars.subscr.cp.peer_sdp.media_list[0].attributes, + "vs exp: ", preconds)); } /* Tx 200 OK (UPDATE) */ @@ -1589,13 +1595,13 @@ tx_sdp := omit; } else { /* Check no precondition is sent in SDP */ - if (ispresent(g_pars.subscr.cp.peer_sdp.attributes) and - match (g_pars.subscr.cp.peer_sdp.attributes, superset(tr_SDP_curr_present, - tr_SDP_des_present, - tr_SDP_conf_present))) { + if (ispresent(g_pars.subscr.cp.peer_sdp.media_list[0].attributes) and + match (g_pars.subscr.cp.peer_sdp.media_list[0].attributes, superset(tr_SDP_curr_present, + tr_SDP_des_present, + tr_SDP_conf_present))) { Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str(g_name & ": Unexpected precondition attrs in INVITE: ", - g_pars.subscr.cp.peer_sdp.attributes)); + g_pars.subscr.cp.peer_sdp.media_list[0].attributes)); } /* 200 OK (INVITE) has SDP if no precondition is used: */ tx_sdp := f_gen_sdp(); diff --git a/library/SDP_Templates.ttcn b/library/SDP_Templates.ttcn index ef91953..782c672 100644 --- a/library/SDP_Templates.ttcn +++ b/library/SDP_Templates.ttcn @@ -190,11 +190,11 @@ } } -template (present) SDP_attribute tr_SDP_des(charstring status_type, - charstring strength_tag, +template (present) SDP_attribute tr_SDP_des(charstring strength_tag, + charstring status_type, charstring dir_tag, charstring precondition_type := c_SDP_PRECON_TYPE_qos) := { - curr := { + des := { attr_value := precondition_type & " " & strength_tag & " " & status_type & " " & dir_tag } } @@ -203,8 +203,8 @@ attr_value := ? } } -template (value) SDP_attribute ts_SDP_des(charstring status_type, - charstring strength_tag, +template (value) SDP_attribute ts_SDP_des(charstring strength_tag, + charstring status_type, charstring dir_tag, charstring precondition_type := c_SDP_PRECON_TYPE_qos) := { des := { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37322?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: I8e22f76f7c0a8e6fda70252b330b1b174ca5c66f Gerrit-Change-Number: 37322 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: asterisk: IMS: Support validating Session-Expires and Min-SE during I...
by pespin 02 Jul '24

02 Jul '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37304?usp=email ) Change subject: asterisk: IMS: Support validating Session-Expires and Min-SE during INVITE ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37304?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: Ie0d19243578f6a5e2962216a869694f7df7ea9cd Gerrit-Change-Number: 37304 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jul 2024 12:46:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: asterisk: IMS: Support validating Session-Expires and Min-SE during I...
by daniel 02 Jul '24

02 Jul '24
Attention is currently required from: pespin. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37304?usp=email ) Change subject: asterisk: IMS: Support validating Session-Expires and Min-SE during INVITE ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37304?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: Ie0d19243578f6a5e2962216a869694f7df7ea9cd Gerrit-Change-Number: 37304 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 02 Jul 2024 11:14:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 135
  • 136
  • 137
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.