Neels Hofmeyr | 43273c6 | 2016-05-10 12:50:31 +0200 | [diff] [blame] | 1 | /* OpenBSC utility functions for 3GPP TS 04.80 */ |
| 2 | |
| 3 | /* (C) 2016 by sysmocom s.m.f.c. GmbH <info@sysmocom.de> |
| 4 | * |
| 5 | * All Rights Reserved |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU Affero General Public License as published by |
| 9 | * the Free Software Foundation; either version 3 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU Affero General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Affero General Public License |
| 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | #include <osmocom/gsm/gsm0480.h> |
| 23 | #include <openbsc/bsc_api.h> |
| 24 | |
| 25 | int bsc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level, |
| 26 | const char *text) |
| 27 | { |
| 28 | struct msgb *msg = gsm0480_create_ussd_notify(level, text); |
| 29 | if (!msg) |
| 30 | return -1; |
| 31 | return gsm0808_submit_dtap(conn, msg, 0, 0); |
| 32 | } |
| 33 | |
| 34 | int bsc_send_ussd_release_complete(struct gsm_subscriber_connection *conn) |
| 35 | { |
| 36 | struct msgb *msg = gsm0480_create_ussd_release_complete(); |
| 37 | if (!msg) |
| 38 | return -1; |
| 39 | return gsm0808_submit_dtap(conn, msg, 0, 0); |
| 40 | } |