From 4f8cafa5b089ba0cab33afc7752fa54bd8e57d36 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 23 Mar 2016 17:41:23 +0100 Subject: call: Continue up to the point of call routing We accept the call on MNCC and ask the core to select/create the second leg of the call. --- src/app.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/app.c') diff --git a/src/app.c b/src/app.c index 6ab584d..6ec60ed 100644 --- a/src/app.c +++ b/src/app.c @@ -55,3 +55,20 @@ void app_setup(struct app_config *cfg) { cfg->mncc.conn.on_disconnect = app_mncc_disconnected; } + +static void route_to_sip(struct call *call, const char *source, const char *dest) +{ + LOGP(DAPP, LOGL_ERROR, "Can not route call(%u) to SIP yet\n", call->id); + call_leg_release(call->initial); +} + +void app_route_call(struct call *call, const char *source, const char *dest) +{ + if (call->initial->type == CALL_TYPE_MNCC) + route_to_sip(call, source, dest); + else { + LOGP(DAPP, LOGL_ERROR, "Can not route call(%u) to MNCC yet\n", + call->id); + call_leg_release(call->initial); + } +} -- cgit v1.2.3