diff --git a/daemon/call.c b/daemon/call.c index 1c2692349..c605e2545 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -6455,7 +6455,7 @@ static void monologue_stop(struct call_monologue *ml, bool stop_media_subscriber // call must be locked in W. // unlocks the call and releases the reference prior to returning, even on error. -int call_delete_branch(call_t *c, const str *branch, +int call_delete_branch(call_t *c, const str *callid, const str *branch, const str *fromtag, const str *totag, ng_command_ctx_t *ctx, int64_t delete_delay) { struct call_monologue *ml; @@ -6596,7 +6596,7 @@ int call_delete_branch_by_id(const str *callid, const str *branch, ilog(LOG_INFO, "Call-ID to delete not found"); return -1; } - return call_delete_branch(c, branch, fromtag, totag, ctx, delete_delay); + return call_delete_branch(c, callid, branch, fromtag, totag, ctx, delete_delay); } struct call_media *call_make_transform_media(struct call_monologue *ml, const str *type, enum media_type type_id, diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 658236aa1..a178a3377 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -751,7 +751,7 @@ const char *call_delete_ng(ng_command_ctx_t *ctx) { if (rtpp_flags.discard_recording) recording_discard(c); - if (call_delete_branch(c, &rtpp_flags.via_branch, + if (call_delete_branch(c, &rtpp_flags.call_id, &rtpp_flags.via_branch, &rtpp_flags.from_tag, (rtpp_flags.to_tag_flag ? &rtpp_flags.to_tag : NULL), ctx, rtpp_flags.delete_delay)) diff --git a/include/call.h b/include/call.h index a695b9714..96c9b2df8 100644 --- a/include/call.h +++ b/include/call.h @@ -939,10 +939,14 @@ bool monologue_call_create(struct call_monologue *, sdp_ng_flags *); __attribute__((nonnull(1, 2))) bool monologue_call_create_answer(struct call_monologue *, sdp_ng_flags *, sdp_streams_q *streams); void monologue_destroy(struct call_monologue *ml); + +__attribute__((nonnull(1))) int call_delete_branch_by_id(const str *callid, const str *branch, const str *fromtag, const str *totag, ng_command_ctx_t *, int64_t delete_delay); -int call_delete_branch(call_t *, const str *branch, +__attribute__((nonnull(1, 2))) +int call_delete_branch(call_t *, const str *callid, const str *branch, const str *fromtag, const str *totag, ng_command_ctx_t *, int64_t delete_delay); + void call_destroy(call_t *); struct call_media *call_media_new(call_t *call); void call_media_free(struct call_media **mdp);