summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-01-14 11:13:18 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2013-01-14 11:13:18 +0100
commit73a15c630043221aa7753e000f02bdaa48b4debc (patch)
tree0ce55bcb5506e2e756a244182ad648884911f501
parente627eee596b6d54d6e2c5393b88a4f0dea364175 (diff)
mobile: addition to 47f05aefdf4eac7332aa4aa32238225e1c98aedbjolly/useruser
Fix for user-user message during call. If not delivered, the network sends a status message with cause 43. This is now indicated to sending user.
-rw-r--r--src/host/layer23/src/mobile/gsm48_cc.c11
-rw-r--r--src/host/layer23/src/mobile/mnccms.c10
2 files changed, 21 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c
index a64f032..7831322 100644
--- a/src/host/layer23/src/mobile/gsm48_cc.c
+++ b/src/host/layer23/src/mobile/gsm48_cc.c
@@ -477,6 +477,17 @@ static int gsm48_cc_rx_status(struct gsm_trans *trans, struct msgb *msg)
LOGP(DCC, LOGL_INFO, "received STATUS (cause %d)\n", cause.value);
+ /* process cause 43 (user-user mesage could not be delivered) */
+ if (cause.value == 43) {
+ struct gsm_mncc user;
+
+ memset(&user, 0, sizeof(struct gsm_mncc));
+ user.callref = trans->callref;
+ user.fields |= MNCC_F_CAUSE;
+ memcpy(&user.cause, &cause, sizeof(user.cause));
+ mncc_recvmsg(trans->ms, trans, MNCC_USERINFO_IND, &user);
+ }
+
return 0;
}
diff --git a/src/host/layer23/src/mobile/mnccms.c b/src/host/layer23/src/mobile/mnccms.c
index 4c9dcb4..b2bc03a 100644
--- a/src/host/layer23/src/mobile/mnccms.c
+++ b/src/host/layer23/src/mobile/mnccms.c
@@ -207,6 +207,15 @@ static void display_useruser(struct osmocom_ms *ms, struct gsm_mncc *data)
{
const char *text;
+ /* if a status message is received with cause 43 */
+ if ((data->fields & MNCC_F_CAUSE) && data->cause.value == 43) {
+ vty_notify(ms, "Network say that user-user message cannot be "
+ "delivered\n");
+ LOGP(DMNCC, LOGL_INFO, "Network say that user-user message "
+ "cannot be delivered\n");
+ return;
+ }
+
/* if not user-user message is present, we are done */
if (!(data->fields & MNCC_F_USERUSER))
return;
@@ -475,6 +484,7 @@ int mncc_recv_mobile(struct osmocom_ms *ms, int msg_type, void *arg)
vty_notify(ms, "Call is answered\n");
LOGP(DMNCC, LOGL_INFO, "Call is answered\n");
display_useruser(ms, data);
+ call->connect = 1;
break;
case MNCC_SETUP_IND:
vty_notify(ms, NULL);