aboutsummaryrefslogtreecommitdiffstats
path: root/src/call.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/call.c')
-rw-r--r--src/call.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/call.c b/src/call.c
index d9ca66e..48281a1 100644
--- a/src/call.c
+++ b/src/call.c
@@ -78,3 +78,15 @@ struct call *sip_call_mncc_create(void)
llist_add(&call->entry, &g_call_list);
return call;
}
+
+struct call_leg *call_leg_other(struct call_leg *leg)
+{
+ if (leg->call->initial == leg)
+ return leg->call->remote;
+ if (leg->call->remote == leg)
+ return leg->call->initial;
+
+ LOGP(DAPP, LOGL_NOTICE, "leg(0x%p) not belonging to call(%u)\n",
+ leg, leg->call->id);
+ return NULL;
+}