summaryrefslogtreecommitdiffstats
path: root/src/mncc.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2017-02-22 13:50:11 +0100
committerHolger Freyther <holger@freyther.de>2017-03-23 09:00:24 +0000
commit4649746798fe3074edab720302d135c74dcf3a38 (patch)
treefc42dbc3ce54382762a7f5dc424025f22f44079f /src/mncc.c
parent0cea3df01d85de7a4e2411356ea43a2f9e97e376 (diff)
dtmf: Forward DTMF from MNCC to SIP
We are not using the RTP telephony-event here but the older dtmf relay. We also only have a fixed DTMF duration for now. Change-Id: Icf770fae89f7aedf6eba9a119db9b8acc7f938df
Diffstat (limited to 'src/mncc.c')
-rw-r--r--src/mncc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mncc.c b/src/mncc.c
index e96eed8..843c7e7 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -632,6 +632,7 @@ static void check_dtmf_start(struct mncc_connection *conn, char *buf, int rc)
struct gsm_mncc out_mncc = { 0, };
struct gsm_mncc *data;
struct mncc_call_leg *leg;
+ struct call_leg *other_leg;
leg = find_leg(conn, buf, rc, &data);
if (!leg)
@@ -639,6 +640,10 @@ static void check_dtmf_start(struct mncc_connection *conn, char *buf, int rc)
LOGP(DMNCC, LOGL_DEBUG, "leg(%u) DTMF key=%c\n", leg->callref, data->keypad);
+ other_leg = call_leg_other(&leg->base);
+ if (other_leg && other_leg->dtmf)
+ other_leg->dtmf(other_leg, data->keypad);
+
mncc_fill_header(&out_mncc, MNCC_START_DTMF_RSP, leg->callref);
out_mncc.fields |= MNCC_F_KEYPAD;
out_mncc.keypad = data->keypad;