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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/21183 ) Change subject: USSD: add special 'idle' handler to IUSE for testing ...................................................................... USSD: add special 'idle' handler to IUSE for testing Change-Id: I0d566a60e95ce2da951f22ad47c6155c5b6a338c --- M src/hlr_ussd.c M src/hlr_vty.c 2 files changed, 19 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/83/21183/1 diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c index f7f8062..c40f9fd 100644 --- a/src/hlr_ussd.c +++ b/src/hlr_ussd.c @@ -373,6 +373,18 @@ return 0; } +/* This handler just keeps the session idle unless the guard timer expires. */ +static int handle_ussd_test_idle(struct ss_session *ss, + const struct osmo_gsup_message *gsup, + const struct ss_request *req) +{ + char buf[GSM0480_USSD_7BIT_STRING_LEN + 1]; + snprintf(buf, sizeof(buf), "Keeping your session idle, it will expire " + "at most in %u seconds.", g_hlr->ncss_guard_timeout); + ss_tx_to_ms_ussd_7bit(ss, false, req->invoke_id, buf); + return 0; +} + static const struct hlr_iuse hlr_iuses[] = { { @@ -383,6 +395,10 @@ .name = "own-imsi", .handle_ussd = handle_ussd_own_imsi, }, + { + .name = "test-idle", + .handle_ussd = handle_ussd_test_idle, + }, }; const struct hlr_iuse *iuse_find(const char *name) diff --git a/src/hlr_vty.c b/src/hlr_vty.c index a054cbe..4b91aa9 100644 --- a/src/hlr_vty.c +++ b/src/hlr_vty.c @@ -174,10 +174,11 @@ #define UROUTE_STR "Routing Configuration\n" #define PREFIX_STR "Prefix-Matching Route\n" "USSD Prefix\n" -#define INT_CHOICE "(own-msisdn|own-imsi)" +#define INT_CHOICE "(own-msisdn|own-imsi|test-idle)" #define INT_STR "Internal USSD Handler\n" \ "Respond with subscribers' own MSISDN\n" \ - "Respond with subscribers' own IMSI\n" + "Respond with subscribers' own IMSI\n" \ + "Keep the session idle (useful for testing)\n" #define EXT_STR "External USSD Handler\n" \ "Name of External USSD Handler (IPA CCM ID)\n" -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/21183 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I0d566a60e95ce2da951f22ad47c6155c5b6a338c Gerrit-Change-Number: 21183 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201116/231de88d/attachment.htm>