summaryrefslogtreecommitdiffstats
path: root/src/app.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-27 17:02:39 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-27 17:02:39 +0200
commit916348b7dcbd3f5fb4b672c3e18f6dd092cea146 (patch)
treea714de91de06b97d3f4e32031442e9229b27b268 /src/app.c
parent80880d45b7091dfbf5c722e2b9e79b60e7a9aba7 (diff)
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.
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c14
1 files changed, 9 insertions, 5 deletions
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)