From 916348b7dcbd3f5fb4b672c3e18f6dd092cea146 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 27 Mar 2016 17:02:39 +0200 Subject: mncc: Begin to implement MT call handling for SIP->MNCC Initiate the setup request that should result in the call getting all the way to the connected state at some point in time. The device I test with sadly rejects the call too soon. --- src/app.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/app.c') diff --git a/src/app.c b/src/app.c index 36e7cb0..0fe149b 100644 --- a/src/app.c +++ b/src/app.c @@ -63,15 +63,19 @@ static void route_to_sip(struct call *call, const char *source, const char *dest call->initial->release_call(call->initial); } +static void route_to_mncc(struct call *call, const char *source, + const char *dest) +{ + if (mncc_create_remote_leg(&g_app.mncc.conn, call, source, dest) != 0) + call->initial->release_call(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->initial->release_call(call->initial); - } + else + route_to_mncc(call, source, dest); } const char *app_media_name(int ptmsg) -- cgit v1.2.3