summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-04-04 12:38:10 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-04-04 12:38:10 +0200
commit270c73c11fa66171a9d85e22ce868b9669960c0b (patch)
tree7d9552e29f58e9b1a766e2b224cba09b462c4977 /src
parent6d7d7f2cd317b9c337f675da74c4bc8411cdfced (diff)
mncc: Reject hold requests for now
MNCC hold to sip has not been implemented, so let me reject the request right now. A ticket (OS#1686) has been filed to track implementing call holding.
Diffstat (limited to 'src')
-rw-r--r--src/mncc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mncc.c b/src/mncc.c
index 9a6c483..47dd72b 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -577,6 +577,20 @@ static void check_alrt_ind(struct mncc_connection *conn, char *buf, int rc)
other_leg->ring_call(other_leg);
}
+static void check_hold_ind(struct mncc_connection *conn, char *buf, int rc)
+{
+ struct gsm_mncc *data;
+ struct mncc_call_leg *leg;
+
+ leg = find_leg(conn, buf, rc, &data);
+ if (!leg)
+ return;
+
+ LOGP(DMNCC, LOGL_DEBUG,
+ "leg(%u) is req hold. rejecting.\n", leg->callref);
+ mncc_send(leg->conn, MNCC_HOLD_REJ, leg->callref);
+}
+
static void check_stp_cnf(struct mncc_connection *conn, char *buf, int rc)
{
struct gsm_mncc *data;
@@ -764,6 +778,9 @@ static int mncc_data(struct osmo_fd *fd, unsigned int what)
case MNCC_ALERT_IND:
check_alrt_ind(conn, buf, rc);
break;
+ case MNCC_HOLD_IND:
+ check_hold_ind(conn, buf, rc);
+ break;
default:
LOGP(DMNCC, LOGL_ERROR, "Unhandled message type %d/0x%x\n",
msg_type, msg_type);