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: Increate timeout waiting for AMI event FullyBooted
by pespin 10 Jul '24

10 Jul '24
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37455?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: asterisk: Increate timeout waiting for AMI event FullyBooted ...................................................................... asterisk: Increate timeout waiting for AMI event FullyBooted Change-Id: Ibd2bbdc4b916b5baca01407bac3cc5e9a99500e3 --- M asterisk/Asterisk_Tests.ttcn 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/55/37455/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37455?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: Ibd2bbdc4b916b5baca01407bac3cc5e9a99500e3 Gerrit-Change-Number: 37455 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: asterisk: Increate timeout waiting for AMI event FullyBooted
by pespin 10 Jul '24

10 Jul '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37455?usp=email ) Change subject: asterisk: Increate timeout waiting for AMI event FullyBooted ...................................................................... asterisk: Increate timeout waiting for AMI event FullyBooted Change-Id: Ibd2bbdc4b916b5baca01407bac3cc5e9a99500e3 --- M asterisk/Asterisk_Tests.ttcn 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/55/37455/1 diff --git a/asterisk/Asterisk_Tests.ttcn b/asterisk/Asterisk_Tests.ttcn index 0796d99..34dad58 100644 --- a/asterisk/Asterisk_Tests.ttcn +++ b/asterisk/Asterisk_Tests.ttcn @@ -112,8 +112,10 @@ f_ami_action_login(AMI_CLIENT, mp_ami_user, mp_ami_secret); + /* It can sometimes take up to ~30s for Asterisk to finish startup and + * sending the FullyBooted event... */ timer tReady; - tReady.start(10.0); + tReady.start(30.0); alt { [] AMI_CLIENT.receive(tr_AMI_Event_FullyBooted); [] as_ami_rx_ignore(AMI_CLIENT); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37455?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: Ibd2bbdc4b916b5baca01407bac3cc5e9a99500e3 Gerrit-Change-Number: 37455 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in pysim[master]: WIP: global_platform: LOAD and INSTALL [for load] support
by laforge 10 Jul '24

10 Jul '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37454?usp=email ) Change subject: WIP: global_platform: LOAD and INSTALL [for load] support ...................................................................... WIP: global_platform: LOAD and INSTALL [for load] support Change-Id: I924aaeecbb3a72bdb65eefbff6135e4e9570579e --- M pySim/global_platform/__init__.py 1 file changed, 83 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/37454/1 diff --git a/pySim/global_platform/__init__.py b/pySim/global_platform/__init__.py index 0be316b..ab454a5 100644 --- a/pySim/global_platform/__init__.py +++ b/pySim/global_platform/__init__.py @@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. """ +import io from copy import deepcopy from typing import Optional, List, Dict, Tuple from construct import Optional as COptional @@ -435,6 +436,23 @@ ExecutableModuleAID, AssociatedSecurityDomainAID]): pass + +# Section 11.6.2.3 / Table 11-58 +class SecurityDomainAid(BER_TLV_IE, tag=0x4f): + _construct = GreedyBytes +class LoadFileDataBlockSignature(BER_TLV_IE, tag=0xc3): + _construct = GreedyBytes +class DapBlock(BER_TLV_IE, tag=0xe2, nested=[SecurityDomainAid, LoadFileDataBlockSignature]): + pass +class LoadFileDataBlock(BER_TLV_IE, tag=0xc4): + _construct = GreedyBytes +class Icv(BER_TLV_IE, tag=0xd3): + _construct = GreedyBytes +class CipheredLoadFileDataBlock(BER_TLV_IE, tag=0xd4): + _construct = GreedyBytes +class LoadFile(TLV_IE_Collection, nested=[DapBlock, LoadFileDataBlock, Icv, CipheredLoadFileDataBlock]): + pass + # Application Dedicated File of a Security Domain class ADF_SD(CardADF): StoreData = BitStruct('last_block'/Flag, @@ -676,6 +694,31 @@ ifi_bytes = build_construct(InstallForInstallCD, decoded) self.install(p1, 0x00, b2h(ifi_bytes)) + inst_load_parser = argparse.ArgumentParser() + inst_load_parser.add_argument('--load-file-aid', type=is_hexstr, required=True, + help='AID of the loded file') + inst_load_parser.add_argument('--security-domain-aid', type=is_hexstr, default='', + help='AID of the Security Domain into which the file shalle be added') + inst_load_parser.add_argument('--load-file-hash', type=is_hexstr, default='', + help='Load File Data Block Hash') + inst_inst_parser.add_argument('--load-parameters', type=is_hexstr, default='', + help='Load Token (Section GPCS C.4.1)') + inst_inst_parser.add_argument('--load-token', type=is_hexstr, default='', + help='Load Token (Section GPCS C.4.1)') + + @cmd2.with_argparser(inst_load_parser) + def do_install_for_load(self, opts): + """Perform GlobalPlatform INSTALL [for load] command.""" + if opts.load_token != '' and opts.load_file_hash == '': + raise ValueError('Load File Data Block Hash is mandatory if a Load Token is present') + InstallForLoadCD = Struct('load_file_aid'/HexAdapter(Prefixed(Int8ub, GreedyBytes)), + 'security_domain_aid'/HexAdapter(Prefixed(Int8ub, GreedyBytes)), + 'load_file_hash'/HexAdapter(Prefixed(Int8ub, GreedyBytes)), + 'load_parameters'/HexAdapter(Prefixed(Int8ub, GreedyBytes)), + 'load_token'/HexAdapter(Prefixed(Int8ub, GreedyBytes))) + ifl_bytes = build_construct(InstallForLoadCD, vars(opts)) + self.install(0x02, 0x00, b2h(ifl_bytes)) + def install(self, p1:int, p2:int, data:Hexstr) -> ResTuple: cmd_hex = "80E6%02x%02x%02x%s" % (p1, p2, len(data)//2, data) return self._cmd.lchan.scc.send_apdu_checksw(cmd_hex) @@ -719,6 +762,37 @@ cmd_hex = "80E4%02x%02x%02x%s" % (p1, p2, len(data)//2, data) return self._cmd.lchan.scc.send_apdu_checksw(cmd_hex) + load_parser = argparse.ArgumentParser() + # we make this a required --optional argument now, so we can later have other sources for load data + load_parser.add_argument('--from-file', required=True) + + @cmd2.with_argparser(load_parser) + def do_load(self, opts): + """Perform a GlobalPlatform LOAD command. We currently only support loading without DAP and + without ciphering.""" + with open(opts.from_file, 'rb') as f: + self.load(f) + + def load(self, stream: io.RawIOBase, chunk_len:int = 240): + # we might want to tune chunk_len based on the overhead of the used SCP? + contents = stream.readall() + # build TLV according to 11.6.2.3 / Table 11-58 for unencrypted case + remainder = b'\xC4' + bertlv_encode_len(len(contents)) + contents + # transfer this in vaious chunks to the card + total_size = len(remainder) + block_nr = 0 + while len(remainder): + block = remainder[:chunk_len] + remainder = remainder[chunk_len:] + # build LOAD command APDU according to 11.6.2 / Table 11-56 + p1 = 0x80 if len(remainder) else 0x00 + p2 = block_nr % 256 + block_nr += 1 + cmd_hex = "80E8%02x%02x%02x%s" % (p1, p2, len(block), b2h(block)) + _rsp_hex, _sw = self._cmd.lchan.scc.send_apdu_checksw(cmd_hex) + self._cmd.poutput("Loaded a total of %u bytes in %u blocks. Don't forget install_for_load now!" % (total_size, block_nr)) + + est_scp02_parser = argparse.ArgumentParser() est_scp02_parser.add_argument('--key-ver', type=auto_uint8, required=True, help='Key Version Number (KVN)') est_scp02_parser.add_argument('--host-challenge', type=is_hexstr, -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37454?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I924aaeecbb3a72bdb65eefbff6135e4e9570579e Gerrit-Change-Number: 37454 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: WIP: New SGP.31 specific add_initial_eim command for eUICC
by laforge 10 Jul '24

10 Jul '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37453?usp=email ) Change subject: WIP: New SGP.31 specific add_initial_eim command for eUICC ...................................................................... WIP: New SGP.31 specific add_initial_eim command for eUICC Change-Id: Iab7afd8b380bf411870206c06aecd02220732447 --- M pySim/euicc.py 1 file changed, 44 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/53/37453/1 diff --git a/pySim/euicc.py b/pySim/euicc.py index ddfe939..9fcf3d7 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -31,7 +31,7 @@ from pySim.tlv import * from pySim.construct import * from pySim.commands import SimCardCommands -from pySim.utils import Hexstr, SwHexstr, SwMatchstr +from pySim.utils import Hexstr, SwHexstr, SwMatchstr, is_hexstr import pySim.global_platform def compute_eid_checksum(eid) -> str: @@ -309,6 +309,19 @@ class GetEimConfigurationData(BER_TLV_IE, tag=0xbf55, nested=[EimConfigurationDataSeq]): pass +# SGP.32 5.9.4 ES10b: AddInitialEim +class AddInitialEimReq(BER_TLV_IE, tag=0xbf57, nested=[EimConfigurationDataSeq]): + pass + +class AddInitialEimOk(BER_TLV_IE, tag=0x80): + _construct = GreedyBytes # TODO: decode +class AddInitialEimError(BER_TLV_IE, tag=0x81): + _construct = Enum(Int8ub, insufficientMemory=1, unsignedEimConfigDisallowed=2, + ciPKUnknown=3, invalidAssociationToken=5, counterValueOutOfRange=6, + undefinedError=127) +class AddInitialEimResponse(BER_TLV_IE, tag=0xbf57, nested=[AddInitialEimOk, AddInitialEimError]): + pass + class CardApplicationISDR(pySim.global_platform.CardApplicationSD): def __init__(self): super().__init__(name='ADF.ISD-R', aid=AID_ISD_R, @@ -529,6 +542,27 @@ d = gec.to_dict() self._cmd.poutput_json(flatten_dict_lists(d['get_eim_configuration_data'])) + add_initial_eim_parser = argparse.ArgumentParser() + add_initial_eim_parser.add_argument('--eim-id', help='eIM Identifier', required=True) + add_initial_eim_parser.add_argument('--eim-id-type', help='eIM ID Type', choices=['oid','fqdn','proprietary']) + add_initial_eim_parser.add_argument('--eim-fqdn', help='eIM FQDN') + add_initial_eim_parser.add_argument('--counter-value', type=int, help='initial CounterValue for the eIM') + add_initial_eim_parser.add_argument('--association-token', type=int) + aie_pubkey_grp = add_initial_eim_parser.add_mutually_exclusive_group() + aie_pubkey_grp.add_argument('--pubkey-subject', type=is_hexstr) + aie_pubkey_grp.add_argument('--pubkey-cert', type=is_hexstr) + aie_pubkey_tls_grp = add_initial_eim_parser.add_mutually_exclusive_group() + aie_pubkey_tls_grp.add_argument('--pubkey-tls-subject', type=is_hexstr) + aie_pubkey_tls_grp.add_argument('--pubkey-tls-cert', type=is_hexstr) + + @cmd2.with_argparser(add_initial_eim_parser) + def do_add_initial_eim(self, opts): + """Perform an ES10b AddInitialEim function on an IoT eUICC (SGP.32 3.5.2).""" + aiec = AddInitialEim(FIXME) + aier = CardApplicationISDR.store_data_tlv(self._cmd.lchan.scc, aiec, AddInitialEimResp) + d = aier.to_dict() + self._cmd.poutput_json(flatten_dict_lists(d['add_initial_eim_response'])) + class CardApplicationECASD(pySim.global_platform.CardApplicationSD): def decode_select_response(self, data_hex: Hexstr) -> object: t = FciTemplate() -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37453?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Iab7afd8b380bf411870206c06aecd02220732447 Gerrit-Change-Number: 37453 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in pysim[master]: transport: Implement treatment of 62xx and 63xx warning/error responses
by laforge 10 Jul '24

10 Jul '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37452?usp=email ) Change subject: transport: Implement treatment of 62xx and 63xx warning/error responses ...................................................................... transport: Implement treatment of 62xx and 63xx warning/error responses TS 102 221 specifies that (in case of a class 4 command) and as SW 62xx or 63xx, we should send a GET RESPONSE just like in the 61xx case in order to get the respective response. As we don't really know if it's a case1/2/3/4 command in the pySim.transport, let's always send the GET RESPONSE in case SW 62xx or 63xx are received. It shouldn't hurt - in the worst case there's no response available... Change-Id: Ibb1398194a16fc1f1f9bc46af6c66fb6575240cd --- M pySim/transport/__init__.py 1 file changed, 23 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/52/37452/1 diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py index dd06af8..bc630e9 100644 --- a/pySim/transport/__init__.py +++ b/pySim/transport/__init__.py @@ -130,6 +130,7 @@ data : string (in hex) of returned data (ex. "074F4EFFFF") sw : string (in hex) of status word (ex. "9000") """ + prev_pdu = pdu data, sw = self.send_apdu_raw(pdu) # When we have sent the first APDU, the SW may indicate that there are response bytes @@ -137,15 +138,17 @@ # xx is the number of response bytes available. # See also: if sw is not None: - while ((sw[0:2] == '9f') or (sw[0:2] == '61')): + while (sw[0:2] in ['9f', '61', '62', '63']): # SW1=9F: 3GPP TS 51.011 9.4.1, Responses to commands which are correctly executed # SW1=61: ISO/IEC 7816-4, Table 5 — General meaning of the interindustry values of SW1-SW2 + # SW1=62: ETSI TS 102 221 7.3.1.1.4 Clause 4b): 62xx, 63xx, 9xxx != 9000 pdu_gr = pdu[0:2] + 'c00000' + sw[2:4] + prev_pdu = pdu_gr d, sw = self.send_apdu_raw(pdu_gr) data += d if sw[0:2] == '6c': # SW1=6C: ETSI TS 102 221 Table 7.1: Procedure byte coding - pdu_gr = pdu[0:8] + sw[2:4] + pdu_gr = prev_pdu[0:8] + sw[2:4] data, sw = self.send_apdu_raw(pdu_gr) return data, sw -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37452?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibb1398194a16fc1f1f9bc46af6c66fb6575240cd Gerrit-Change-Number: 37452 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in docker-playground[master]: asterisk: pjsip.conf: Forward Hold/Resume SIP UA -> IMS Core
by pespin 10 Jul '24

10 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37434?usp=email ) Change subject: asterisk: pjsip.conf: Forward Hold/Resume SIP UA -> IMS Core ...................................................................... asterisk: pjsip.conf: Forward Hold/Resume SIP UA -> IMS Core This is needed for forward the a=sendonly when a local SIP UA wishes to hold a call. Related: SYS#7002 Change-Id: I70e7e5df2d9c91acdc85c689cf8e48c5a44b2a34 --- M ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf 1 file changed, 14 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf b/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf index 574ecf6..bd33845 100644 --- a/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf +++ b/ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf @@ -115,6 +115,7 @@ direct_media=no ims_aka=yes 100rel=peer_supported +moh_passthrough=yes [volte_ims] type=auth -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37434?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I70e7e5df2d9c91acdc85c689cf8e48c5a44b2a34 Gerrit-Change-Number: 37434 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in docker-playground[master]: asterisk: pjsip.conf: Forward Hold/Resume SIP UA -> IMS Core
by pespin 10 Jul '24

10 Jul '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/37434?usp=email ) Change subject: asterisk: pjsip.conf: Forward Hold/Resume SIP UA -> IMS Core ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37434?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I70e7e5df2d9c91acdc85c689cf8e48c5a44b2a34 Gerrit-Change-Number: 37434 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 10 Jul 2024 11:25:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: asterisk: Introduce test TC_ims_call_mo_holdresume_mo
by pespin 10 Jul '24

10 Jul '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37426?usp=email ) Change subject: asterisk: Introduce test TC_ims_call_mo_holdresume_mo ...................................................................... asterisk: Introduce test TC_ims_call_mo_holdresume_mo Related: SYS#7002 Change-Id: Ifffa1c4021f324871f11a60264c17b640569e18b --- M asterisk/Asterisk_Tests.ttcn M asterisk/IMS_ConnectionHandler.ttcn M asterisk/SIP_ConnectionHandler.ttcn M asterisk/expected-results.xml M library/SDP_Templates.ttcn 5 files changed, 187 insertions(+), 24 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/asterisk/Asterisk_Tests.ttcn b/asterisk/Asterisk_Tests.ttcn index ec55254..0796d99 100644 --- a/asterisk/Asterisk_Tests.ttcn +++ b/asterisk/Asterisk_Tests.ttcn @@ -226,6 +226,16 @@ f_TC_internal_hangup_call_mo_unregister(); setverdict(pass); } +private function f_TC_internal_call_mo_with_holdresume(charstring id) runs on SIPConnHdlr { + f_TC_internal_register_establish_call_mo(); + f_sleep(1.0); + f_SIP_do_call_hold(); + f_sleep(1.0); + f_SIP_do_call_resume(); + f_TC_internal_hangup_call_mo_unregister(); + setverdict(pass); +} + private function f_TC_internal_call_mt(charstring id) runs on SIPConnHdlr { f_create_sip_expect(valueof(ts_SipUrl_from_Addr_Union(g_pars.cp.called.addr))); @@ -756,6 +766,14 @@ f_TC_ims_call_mo_IMS_ConnHdlr_hangup_call_unregister(); } +private function f_TC_ims_call_mo_IMS_ConnHdlr_with_holdresume(charstring id) runs on IMS_ConnHdlr { + f_TC_ims_call_mo_IMS_ConnHdlr_register_establish_call(); + as_IMS_exp_call_hold(); + f_sleep(1.0); + as_IMS_exp_call_resume(); + f_TC_ims_call_mo_IMS_ConnHdlr_hangup_call_unregister(); +} + private function f_TC_ims_call_mo(boolean use_precondition_ext := true, boolean use_session_timer := false, void_fn sip_fn := refers(f_TC_internal_call_mo), ims_void_fn ims_fn := refers(f_TC_ims_call_mo_IMS_ConnHdlr)) runs on test_CT { @@ -825,6 +843,10 @@ testcase TC_ims_call_mo_noprecondition() runs on test_CT { f_TC_ims_call_mo(use_precondition_ext := false); } +testcase TC_ims_call_mo_holdresume_mo() runs on test_CT { + f_TC_ims_call_mo(sip_fn := refers(f_TC_internal_call_mo_with_holdresume), + ims_fn := refers(f_TC_ims_call_mo_IMS_ConnHdlr_with_holdresume)); +} /* Test SIP registration of local clients */ private function f_TC_ims_call_mt_IMS_ConnHdlr(charstring id) runs on IMS_ConnHdlr { @@ -942,6 +964,7 @@ execute( TC_ims_call_mo() ); execute( TC_ims_call_mo_session_timer() ); execute( TC_ims_call_mo_noprecondition() ); + execute( TC_ims_call_mo_holdresume_mo() ); execute( TC_ims_call_mt() ); execute( TC_ims_call_mt_noprecondition() ); } diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn index dd187ad..14e6cd4 100644 --- a/asterisk/IMS_ConnectionHandler.ttcn +++ b/asterisk/IMS_ConnectionHandler.ttcn @@ -650,7 +650,7 @@ IMS_GEN_SDP_MT_UPDATE_200OK } -private function f_gen_sdp(IMS_gen_sdp_state st := IMS_GEN_SDP_None) runs on IMS_ConnHdlr return charstring { +private function f_gen_sdp(IMS_gen_sdp_state st := IMS_GEN_SDP_None, charstring dir := "sendrecv") runs on IMS_ConnHdlr return charstring { var charstring sdp := "v=0\r\n" & "o=0502 2390 1824 IN IP4 " & g_pars.subscr.cp.local_rtp_addr & "\r\n" & @@ -659,15 +659,8 @@ "t=0 0\r\n" & "a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics\r\n" & "a=record:off\r\n" & - "m=audio " & int2str(g_pars.subscr.cp.local_rtp_port) & " RTP/AVP 8 96 97 98 0 18 99 100 101\r\n" & + "m=audio " & int2str(g_pars.subscr.cp.local_rtp_port) & " RTP/AVP 8 99 100 101\r\n" & "a=rtpmap:8 PCMA/8000\r\n" & - "a=rtpmap:96 opus/48000/2\r\n" & - "a=fmtp:96 useinbandfec=1\r\n" & - "a=rtpmap:97 speex/16000\r\n" & - "a=fmtp:97 vbr=on\r\n" & - "a=rtpmap:98 speex/8000\r\n" & - "a=fmtp:98 vbr=on\r\n" & - "a=fmtp:18 annexb=yes\r\n" & "a=rtpmap:99 telephone-event/48000\r\n" & "a=rtpmap:100 telephone-event/16000\r\n" & "a=rtpmap:101 telephone-event/8000\r\n" & @@ -707,6 +700,8 @@ "a=des:qos mandatory remote sendrecv\r\n"; } } + + sdp := sdp & "a=" & dir & "\r\n"; return sdp; } @@ -1708,10 +1703,10 @@ 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, + req.msgHeader.cSeq.method, 200, + req.msgHeader.cSeq.seqNumber, "OK", - g_rx_sip_req.msgHeader.via, + 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"}), @@ -1750,4 +1745,66 @@ g_pars.subscr.cp.sip_seq_nr := g_rx_sip_req.msgHeader.cSeq.seqNumber; } } + +private altstep as_IMS_exp_call_holdresume(template (present) SDP_attribute exp_dir := tr_SDP_sendonly, + charstring tx_dir := "recvonly") 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)), + ?, + body := ?); + + [] SIP.receive(exp_req_invite) -> value g_rx_sip_req { + var template (present) PDU_SIP_Request exp_req; + var template (value) PDU_SIP_Response tx_resp; + var charstring tx_sdp; + + f_SDP_decodeMessage(g_rx_sip_req.messageBody, g_pars.subscr.cp.peer_sdp); + g_pars.subscr.cp.sip_seq_nr := g_rx_sip_req.msgHeader.cSeq.seqNumber; + + /* Check a=$exp_dir in SDP */ + 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, superset(exp_dir))) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str(g_name & ": Expected re-INVITE SDP attribute a=", exp_dir, " in: ", + g_pars.subscr.cp.peer_sdp.media_list[0].attributes)); + } + + tx_sdp := f_gen_sdp(dir := tx_dir); + /* 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, + body := tx_sdp); + SIP.send(tx_resp); + + /* Wait for ACK */ + exp_req := tr_SIP_ACK(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, + f_tr_Via_response(g_rx_sip_req.msgHeader.via), + g_rx_sip_req.msgHeader.cSeq.seqNumber, + body := omit); + as_SIP_expect_req(exp_req); + } +} +altstep as_IMS_exp_call_hold() runs on IMS_ConnHdlr +{ + [] as_IMS_exp_call_holdresume(tr_SDP_sendonly, "recvonly"); +} +altstep as_IMS_exp_call_resume() runs on IMS_ConnHdlr +{ + [] as_IMS_exp_call_holdresume(tr_SDP_sendrecv, "sendrecv"); +} + } diff --git a/asterisk/SIP_ConnectionHandler.ttcn b/asterisk/SIP_ConnectionHandler.ttcn index f688fe0..ad76296 100644 --- a/asterisk/SIP_ConnectionHandler.ttcn +++ b/asterisk/SIP_ConnectionHandler.ttcn @@ -239,7 +239,7 @@ } } -private function f_gen_sdp() runs on SIPConnHdlr return charstring { +private function f_gen_sdp(charstring dir := "sendrecv") runs on SIPConnHdlr return charstring { var charstring sdp := "v=0\r\n" & "o=0502 2390 1824 IN IP4 " & g_pars.cp.local_rtp_addr & "\r\n" & @@ -248,18 +248,9 @@ "t=0 0\r\n" & "a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics\r\n" & "a=record:off\r\n" & - "m=audio " & int2str(g_pars.cp.local_rtp_port) & " RTP/AVP 8 96 97 98 0 18 99 100 101\r\n" & + "m=audio " & int2str(g_pars.cp.local_rtp_port) & " RTP/AVP 8\r\n" & + "a=" & dir & "\r\n" & "a=rtpmap:8 PCMA/8000\r\n" & - "a=rtpmap:96 opus/48000/2\r\n" & - "a=fmtp:96 useinbandfec=1\r\n" & - "a=rtpmap:97 speex/16000\r\n" & - "a=fmtp:97 vbr=on\r\n" & - "a=rtpmap:98 speex/8000\r\n" & - "a=fmtp:98 vbr=on\r\n" & - "a=fmtp:18 annexb=yes\r\n" & - "a=rtpmap:99 telephone-event/48000\r\n" & - "a=rtpmap:100 telephone-event/16000\r\n" & - "a=rtpmap:101 telephone-event/8000\r\n" & "a=rtcp:" & int2str(g_pars.cp.local_rtp_port + 1) & "\r\n" & "a=rtcp-fb:* trr-int 1000\r\n" & "a=rtcp-fb:* ccm tmmbr\r\n"; @@ -815,4 +806,81 @@ [fail_others] as_SIP_fail_req(sip_expect_str); } +/* initiate HOLD Tx RE-INVITE (3GPP TS 24.610 A.1.1): */ +private function f_SIP_do_call_holdresume(charstring dir := "sendonly", + template (present) SDP_attribute exp_resp_dir := tr_SDP_recvonly) runs on SIPConnHdlr +{ + var template (value) PDU_SIP_Request req; + var template (present) PDU_SIP_Response exp_resp; + var template (present) From from_addr_exp; + var template (present) To to_addr_exp; + var Via via; + var charstring branch_value; + var charstring tx_sdp := f_gen_sdp(dir := dir); + + /* Reuse g_pars.cp.from_addr and g_pars.cp.to_addr from established called */ + from_addr_exp := tr_From(tr_Addr_Union_from_val(g_pars.cp.from_addr.addressField), *); + to_addr_exp := tr_To(tr_Addr_Union_from_val(g_pars.cp.to_addr.addressField), *); + branch_value := f_sip_gen_branch(f_sip_Addr_Union_to_str(g_pars.cp.from_addr.addressField), + f_sip_Addr_Union_to_str(valueof(g_pars.cp.to_addr.addressField)), + g_pars.cp.sip_call_id, + g_pars.cp.sip_seq_nr); + + via := g_pars.local_via; + via.viaBody[0].viaParams := f_sip_param_set(via.viaBody[0].viaParams, "branch", branch_value); + + /* Transmit re-INVITE (HOLD) */ + req := ts_SIP_INVITE(g_pars.cp.sip_call_id, + g_pars.cp.from_addr, + g_pars.cp.to_addr, + via, + g_pars.local_contact, + g_pars.cp.sip_seq_nr, + body := tx_sdp); + SIP.send(req); + + /* Wait for OK answer */ + exp_resp := tr_SIP_Response( + g_pars.cp.sip_call_id, + from_addr_exp, + to_addr_exp, + f_tr_Via_response(via), + *, + "INVITE", 200, + g_pars.cp.sip_seq_nr, "OK", + body := ?); + as_SIP_expect_resp(exp_resp); + f_SDP_decodeMessage(g_rx_sip_resp.messageBody, g_pars.cp.peer_sdp); + + /* Check a=$exp_resp_dir in SDP */ + if (not ispresent(g_pars.cp.peer_sdp.media_list[0].attributes) or + not match (g_pars.cp.peer_sdp.media_list[0].attributes, superset(exp_resp_dir))) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str(g_name & ": Expected 200 OK (re-INVITE) SDP attribute a=", exp_resp_dir, " in: ", + g_pars.cp.peer_sdp.media_list[0].attributes)); + } + + /* Update To with the tags received from peer: */ + g_pars.cp.to_addr := g_rx_sip_resp.msgHeader.toField; + + /* Transmit ACK */ + req := ts_SIP_ACK(g_pars.cp.to_addr.addressField.nameAddr.addrSpec, + g_pars.cp.sip_call_id, + g_pars.cp.from_addr, + g_pars.cp.to_addr, + via, + g_pars.cp.sip_seq_nr, + omit); + SIP.send(req); + g_pars.cp.sip_seq_nr := g_pars.cp.sip_seq_nr + 1; +} +function f_SIP_do_call_hold() runs on SIPConnHdlr +{ + f_SIP_do_call_holdresume(dir := "sendonly", exp_resp_dir := tr_SDP_recvonly); +} +function f_SIP_do_call_resume() runs on SIPConnHdlr +{ + f_SIP_do_call_holdresume(dir := "sendrecv", exp_resp_dir := tr_SDP_sendrecv); +} + } diff --git a/asterisk/expected-results.xml b/asterisk/expected-results.xml index 179ee70..1819072 100644 --- a/asterisk/expected-results.xml +++ b/asterisk/expected-results.xml @@ -17,6 +17,7 @@ <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_mo_holdresume_mo' 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'/> </testsuite> diff --git a/library/SDP_Templates.ttcn b/library/SDP_Templates.ttcn index 782c672..b8fc6c8 100644 --- a/library/SDP_Templates.ttcn +++ b/library/SDP_Templates.ttcn @@ -155,6 +155,10 @@ sendonly := {} } +template (present) SDP_attribute tr_SDP_sendrecv := { + sendrecv := {} +} + /* rfc3312 */ const charstring c_SDP_PRECON_TYPE_qos := "qos"; const charstring c_SDP_PRECON_STRENGTH_TAG_mandatory := "mandatory"; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37426?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: Ifffa1c4021f324871f11a60264c17b640569e18b Gerrit-Change-Number: 37426 Gerrit-PatchSet: 2 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: 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_holdresume_mo
by pespin 10 Jul '24

10 Jul '24
Attention is currently required from: jolly. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37426?usp=email ) Change subject: asterisk: Introduce test TC_ims_call_mo_holdresume_mo ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37426?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: Ifffa1c4021f324871f11a60264c17b640569e18b Gerrit-Change-Number: 37426 Gerrit-PatchSet: 2 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: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Wed, 10 Jul 2024 11:25:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ci[master]: obs: use specific mirror
by osmith 10 Jul '24

10 Jul '24
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/37437?usp=email ) Change subject: obs: use specific mirror ...................................................................... obs: use specific mirror Use debian.inf.tu-dresden.de (which has a proper TLS certificate) instead of the generic ftp.de.debian.org. Closes: OS#6499 Change-Id: Iee06b6c6cc418a1b2f4eba094704c6e5e156799c --- M scripts/obs/sync_obs_projects.py 1 file changed, 17 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified lynxis lazus: Looks good to me, approved diff --git a/scripts/obs/sync_obs_projects.py b/scripts/obs/sync_obs_projects.py index cc4635a..beb3e09 100755 --- a/scripts/obs/sync_obs_projects.py +++ b/scripts/obs/sync_obs_projects.py @@ -182,15 +182,16 @@ # (e.g. <pubkey>debian-archive-12</pubkey>): # https://github.com/openSUSE/open-build-service/pull/14528 # Also we don't have such a pubkeydir set up on our OBS server. Assume - # ftp.de.debian.org is a trusted mirror, switch to HTTPS and skip the - # PGP verification by removing the pubkey blocks. + # https://debian.inf.tu-dresden.de/ is a trusted mirror, switch to + # HTTPS and skip the PGP verification by removing the pubkey blocks. if project.startswith("Debian:"): for download in repository.findall(".download"): url = download.get("url") print(f" changing url to https: {url}") assert url.startswith("http://ftp.de.debian.org/debian"), \ f"unexpected mirror URL" - download.set("url", url.replace("http://", "https://")) + download.set("url", url.replace("http://ftp.de.debian.org/debian", + "https://debian.inf.tu-dresden.de/debian")) for pubkey in download.findall("pubkey"): download.remove(pubkey) -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37437?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Iee06b6c6cc418a1b2f4eba094704c6e5e156799c Gerrit-Change-Number: 37437 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • ...
  • 138
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.