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/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/12843 Change subject: libmsc/gsm_04_80.c: add msc_send_ussd_release_complete_cause() ...................................................................... libmsc/gsm_04_80.c: add msc_send_ussd_release_complete_cause() According to GSM 04.80, section 2.5.1, Release complete message may have an optional Cause IE. Let's add a new function, that allows to specify cause location and value. This function will be used by the upcoming changes. Change-Id: I3b9e8e4f473d113d5b9e9e5d33f7914202077203 --- M include/osmocom/msc/gsm_04_80.h M src/libmsc/gsm_04_80.c 2 files changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/43/12843/1 diff --git a/include/osmocom/msc/gsm_04_80.h b/include/osmocom/msc/gsm_04_80.h index 0008c22..c95ca85 100644 --- a/include/osmocom/msc/gsm_04_80.h +++ b/include/osmocom/msc/gsm_04_80.h @@ -12,3 +12,6 @@ const char *text); int msc_send_ussd_release_complete(struct ran_conn *conn, uint8_t transaction_id) +int msc_send_ussd_release_complete_cause(struct ran_conn *conn, + uint8_t transaction_id, + uint8_t cause_loc, uint8_t cause_val) diff --git a/src/libmsc/gsm_04_80.c b/src/libmsc/gsm_04_80.c index 502848f..e3547f4 100644 --- a/src/libmsc/gsm_04_80.c +++ b/src/libmsc/gsm_04_80.c @@ -86,3 +86,31 @@ return -1; return msc_tx_dtap(conn, msg); } + +int msc_send_ussd_release_complete_cause(struct ran_conn *conn, + uint8_t transaction_id, + uint8_t cause_loc, uint8_t cause_val) +{ + struct msgb *msg; + uint8_t *cause_ie; + + msg = gsm0480_create_release_complete(transaction_id); + if (!msg) + return -1; + + /* Encode cause IE (see GSM 04.08, section 10.5.4.11) + * with fixed length (2 bytes of TL, 2 bytes of payload). + * NOTE: we don't use gsm48_encode_cause() API because + * it wants gsm_mncc_cause struct from us. */ + cause_ie = msgb_put(msg, 2 + 2); + cause_ie[0] = GSM48_IE_CAUSE; + cause_ie[1] = 2; + + /* Coding standard defined for the GSM PLMNs, + * location and cause: as given by caller, + * no extension, no diagnostics. */ + cause_ie[2] = (1 << 7) | (0x03 << 5) | (cause_loc & 0x0f); + cause_ie[3] = (1 << 7) | cause_val; + + return msc_tx_dtap(conn, msg); +} -- To view, visit https://gerrit.osmocom.org/12843 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3b9e8e4f473d113d5b9e9e5d33f7914202077203 Gerrit-Change-Number: 12843 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190206/07a40ed9/attachment.htm>