diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-26 20:01:07 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-26 20:01:07 +0800 |
commit | daf753477e52f744de428a64e68462e3f898f31c (patch) | |
tree | d43d3bec48a7fe24671f0171b5c3c74f20208106 /openbsc/src/gsm_04_80.c | |
parent | 742fc700117d7c81c55b3df7a2486654067a8771 (diff) |
gsm_04_80: Add untested code for USSD notification...
One should be able to send a USSD Notification to a given
subscriber if we has an active link...
Diffstat (limited to 'openbsc/src/gsm_04_80.c')
-rw-r--r-- | openbsc/src/gsm_04_80.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/openbsc/src/gsm_04_80.c b/openbsc/src/gsm_04_80.c index 462d9789e..135582d1d 100644 --- a/openbsc/src/gsm_04_80.c +++ b/openbsc/src/gsm_04_80.c @@ -449,3 +449,23 @@ int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn, return gsm0808_submit_dtap(conn, msg, 0); } + +int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, const char *text) +{ + struct gsm48_hdr *gh; + struct msgb *msg; + + msg = gsm0480_create_unstructuredSS_Notify(text); + if (!msg) + return -1; + + gsm0480_wrap_invoke(msg, GSM0480_OP_CODE_USS_NOTIFY, 0); + gsm0480_wrap_facility(msg); + + /* And finally pre-pend the L3 header */ + gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); + gh->proto_discr = GSM48_PDISC_NC_SS; + gh->msg_type = GSM0480_MTYPE_REGISTER; + + return gsm0808_submit_dtap(conn, msg, 0); +} |