aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_api.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-10-31 10:47:02 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-31 13:29:51 +0100
commit61bd965b04e4f00eaf4196eebb4ec6269926d551 (patch)
tree1ce74c0b496a8d387a1ee1a8a374ae6317aea9bc /openbsc/src/osmo-bsc/osmo_bsc_api.c
parent6e919dbb653d4b0c209d393b2a5cf5bf8de9be62 (diff)
bsc/ussd: Send faked CM Service Accept before sending USSD
The MS do not show the USSD messages yet. This patch modifies the implementation to insert a CM Service Accept before the ussdNotify to finish the establishment of the MM connection according to 3GPP TS 04.10/3.2.1. This fix has been tested with a Blackberry phone that has shown an ussd_grace_txt after rf_locked has been set to '1'. Without this patch, that message wasn't shown. The phone has sent a CC Setup and other messages before processing the channel release message sent by the BSC, but these messages have not been forwarded to the MSC (as expected). Ticket: OW#957 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_api.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_api.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_api.c b/openbsc/src/osmo-bsc/osmo_bsc_api.c
index 675bbb20e..8288d3b2b 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_api.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_api.c
@@ -87,8 +87,8 @@ static void bsc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
queue_msg_or_return(resp);
}
-static void bsc_send_ussd_notification(struct gsm_subscriber_connection *conn,
- struct msgb *msg, const char *text)
+static void bsc_send_ussd_no_srv(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, const char *text)
{
struct gsm48_hdr *gh;
int8_t pdisc;
@@ -119,10 +119,14 @@ static void bsc_send_ussd_notification(struct gsm_subscriber_connection *conn,
}
if (drop_message) {
- LOGP(DMSC, LOGL_DEBUG, "Skipping (not sending) USSD message: '%s'\n", text);
+ LOGP(DMSC, LOGL_DEBUG, "Skipping (not sending) USSD message: '%s'\n",
+ text);
return;
}
+ LOGP(DMSC, LOGL_INFO, "Sending CM Service Accept\n");
+ gsm48_tx_mm_serv_ack(conn);
+
LOGP(DMSC, LOGL_INFO, "Sending USSD message: '%s'\n", text);
gsm0480_send_ussdNotify(conn, 1, text);
gsm0480_send_releaseComplete(conn);
@@ -143,7 +147,8 @@ static int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg
msc = bsc_find_msc(conn, msg);
if (!msc) {
LOGP(DMSC, LOGL_ERROR, "Failed to find a MSC for a connection.\n");
- bsc_send_ussd_notification(conn, msg, conn->bts->network->bsc_data->ussd_no_msc_txt);
+ bsc_send_ussd_no_srv(conn, msg,
+ conn->bts->network->bsc_data->ussd_no_msc_txt);
return -1;
}
@@ -164,9 +169,9 @@ static int complete_layer3(struct gsm_subscriber_connection *conn,
if (ret != BSC_CON_SUCCESS) {
/* allocation has failed */
if (ret == BSC_CON_REJECT_NO_LINK)
- bsc_send_ussd_notification(conn, msg, msc->ussd_msc_lost_txt);
+ bsc_send_ussd_no_srv(conn, msg, msc->ussd_msc_lost_txt);
else if (ret == BSC_CON_REJECT_RF_GRACE)
- bsc_send_ussd_notification(conn, msg, msc->ussd_grace_txt);
+ bsc_send_ussd_no_srv(conn, msg, msc->ussd_grace_txt);
return BSC_API_CONN_POL_REJECT;
}