diff --git a/daemon/call.c b/daemon/call.c index e9526a07a..aaf5324be 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -4584,7 +4584,8 @@ static bool call_monologues_associations_left(call_t * c) { static int call_get_monologue_new(struct call_monologue *monologues[2], call_t *call, const str *fromtag, const str *totag, - const str *viabranch) + const str *viabranch, + sdp_ng_flags *flags) { struct call_monologue *ret, *os = NULL; /* ret - initial offer, os - other side */ @@ -4676,7 +4677,8 @@ finish: static int call_get_dialogue(struct call_monologue *monologues[2], call_t *call, const str *fromtag, const str *totag, - const str *viabranch) + const str *viabranch, + sdp_ng_flags *flags) { struct call_monologue *ft, *tt; @@ -4686,7 +4688,7 @@ static int call_get_dialogue(struct call_monologue *monologues[2], call_t *call, /* we start with the to-tag. if it's not known, we treat it as a branched offer */ tt = call_get_monologue(call, totag); if (!tt) - return call_get_monologue_new(monologues, call, fromtag, totag, viabranch); + return call_get_monologue_new(monologues, call, fromtag, totag, viabranch, flags); /* if the from-tag is known already, return that */ ft = call_get_monologue(call, fromtag); @@ -4765,13 +4767,14 @@ done: int call_get_mono_dialogue(struct call_monologue *monologues[2], call_t *call, const str *fromtag, const str *totag, - const str *viabranch) + const str *viabranch, + sdp_ng_flags *flags) { /* initial offer */ if (!totag || !totag->s) - return call_get_monologue_new(monologues, call, fromtag, NULL, viabranch); + return call_get_monologue_new(monologues, call, fromtag, NULL, viabranch, flags); - return call_get_dialogue(monologues, call, fromtag, totag, viabranch); + return call_get_dialogue(monologues, call, fromtag, totag, viabranch, flags); } static void media_stop(struct call_media *m) { diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 453fe1b2c..0b5dda4b2 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -194,7 +194,7 @@ static str *call_update_lookup_udp(char **out, enum call_opmode opmode, const ch updated_created_from(c, addr, sin); - if (call_get_mono_dialogue(monologues, c, &fromtag, &totag, NULL)) + if (call_get_mono_dialogue(monologues, c, &fromtag, &totag, NULL, NULL)) goto ml_fail; struct call_monologue *from_ml = monologues[0]; @@ -357,7 +357,7 @@ static str *call_request_lookup_tcp(char **out, enum call_opmode opmode) { str_swap(&fromtag, &totag); } - if (call_get_mono_dialogue(monologues, c, &fromtag, &totag, NULL)) { + if (call_get_mono_dialogue(monologues, c, &fromtag, &totag, NULL, NULL)) { ilog(LOG_WARNING, "Invalid dialogue association"); goto out2; } @@ -2243,7 +2243,7 @@ static const char *call_offer_answer_ng(ng_command_ctx_t *ctx, enum call_opmode errstr = "Invalid dialogue association"; if (call_get_mono_dialogue(monologues, call, &flags.from_tag, &flags.to_tag, - flags.via_branch.s ? &flags.via_branch : NULL)) { + flags.via_branch.s ? &flags.via_branch : NULL, &flags)) { goto out; } diff --git a/include/call.h b/include/call.h index 5b3e9921f..4c3b04dfb 100644 --- a/include/call.h +++ b/include/call.h @@ -824,7 +824,8 @@ void call_make_own_foreign(call_t *c, bool foreign); int call_get_mono_dialogue(struct call_monologue *monologues[2], call_t *call, const str *fromtag, const str *totag, - const str *viabranch); + const str *viabranch, + sdp_ng_flags *); struct call_monologue *call_get_monologue(call_t *call, const str *fromtag); struct call_monologue *call_get_or_create_monologue(call_t *call, const str *fromtag); call_t *call_get(const str *callid);