This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgHello Neels Hofmeyr, Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/3401 to look at the new patch set (#2). Add minimal USSD support to test extension number Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 --- M example/default-suites.conf M src/osmo_gsm_tester/ofono_client.py A suites/aoip_ussd/assert_extension.py A suites/aoip_ussd/suite.conf A suites/ussd/assert_extension.py A suites/ussd/suite.conf 6 files changed, 89 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/01/3401/2 diff --git a/example/default-suites.conf b/example/default-suites.conf index 3fd1322..7bee164 100644 --- a/example/default-suites.conf +++ b/example/default-suites.conf @@ -10,3 +10,7 @@ - smpp - aoip_smpp - aoip_encryption +- ussd:sysmo +- aoip_ussd:sysmo +- ussd:trx +- aoip_ussd:trx diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py index 66c0a79..e8f57cc 100644 --- a/src/osmo_gsm_tester/ofono_client.py +++ b/src/osmo_gsm_tester/ofono_client.py @@ -39,6 +39,7 @@ I_SMS = 'org.ofono.MessageManager' I_CALLMGR = 'org.ofono.VoiceCallManager' I_CALL = 'org.ofono.VoiceCall' +I_SS = 'org.ofono.SupplementaryServices' # See https://github.com/intgr/ofono/blob/master/doc/network-api.txt#L78 NETREG_ST_REGISTERED = 'registered' @@ -645,4 +646,9 @@ def log_info(self, *args, **kwargs): self.log(self.info(*args, **kwargs)) + def ussd_send(self, command): + ss = self.dbus.interface(I_SS) + service_type, response = ss.Initiate(command) + return response + # vim: expandtab tabstop=4 shiftwidth=4 diff --git a/suites/aoip_ussd/assert_extension.py b/suites/aoip_ussd/assert_extension.py new file mode 100755 index 0000000..da5dad3 --- /dev/null +++ b/suites/aoip_ussd/assert_extension.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +USSD_COMMAND_GET_EXTENSION = '*#100#' + +hlr = suite.hlr() +bts = suite.bts() +mgcpgw = suite.mgcpgw(bts_ip=bts.remote_addr()) +msc = suite.msc(hlr, mgcpgw) +bsc = suite.bsc(msc) +stp = suite.stp() +ms = suite.modem() + +hlr.start() +stp.start() +msc.start() +mgcpgw.start() + +bsc.bts_add(bts) +bsc.start() + +bts.start() + +hlr.subscriber_add(ms) + +ms.connect(msc.mcc_mnc()) + +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, msc.mcc_mnc()) +wait(msc.subscriber_attached, ms) + +print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) +response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) +assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/aoip_ussd/suite.conf b/suites/aoip_ussd/suite.conf new file mode 100644 index 0000000..8e0a684 --- /dev/null +++ b/suites/aoip_ussd/suite.conf @@ -0,0 +1,7 @@ +resources: + ip_address: + - times: 5 # msc, bsc, hlr, stp, mgw + bts: + - times: 1 + modem: + - times: 1 diff --git a/suites/ussd/assert_extension.py b/suites/ussd/assert_extension.py new file mode 100755 index 0000000..4e2e0e1 --- /dev/null +++ b/suites/ussd/assert_extension.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +from osmo_gsm_tester.test import * + +USSD_COMMAND_GET_EXTENSION = '*#100#' + +nitb = suite.nitb() +bts = suite.bts() +ms = suite.modem() + +print('start nitb and bts...') +nitb.bts_add(bts) +nitb.start() +bts.start() + +nitb.subscriber_add(ms) + +ms.connect(nitb.mcc_mnc()) +ms.log_info() + +print('waiting for modems to attach...') +wait(ms.is_connected, nitb.mcc_mnc()) +wait(nitb.subscriber_attached, ms) + +print('Sending ussd code %s' % USSD_COMMAND_GET_EXTENSION) +response = ms.ussd_send(USSD_COMMAND_GET_EXTENSION) +assert ' ' + ms.msisdn + '\r' in response diff --git a/suites/ussd/suite.conf b/suites/ussd/suite.conf new file mode 100644 index 0000000..eb59abb --- /dev/null +++ b/suites/ussd/suite.conf @@ -0,0 +1,10 @@ +resources: + ip_address: + - times: 1 + bts: + - times: 1 + modem: + - times: 1 + +defaults: + timeout: 60s -- To view, visit https://gerrit.osmocom.org/3401 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib19331f9c6476ac01bf729790dfd63c56de86a89 Gerrit-PatchSet: 2 Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>