On 22.01.20 19:19, Richard Fuchs wrote:
On 22/01/2020 13.15, George Diamantopoulos wrote:


On Wed, 22 Jan 2020 at 18:28, Richard Fuchs <rfuchs@sipwise.com> wrote:
On 22/01/2020 11.06, Sebastian Damm wrote:
> Hi,
>
> our scenario is the following: We have two clients registered to our
> Kamailio server, one with a TLS capable phone, one via websocket. Now,
> when a call comes in, the call is forked and is sent out to both
> clients. rtpengine handling is done in the branch route, so there are
> two offers, and we use the "via-branch" parameter.
>
> Now, when one branch answers the call, what happens to the other
> branch? I there a way to delete the other branch? How and in which
> route? Or does Kamailio do this automatically?

You do it the same way as you handle an answer: You issue a delete with
the via-branch option.
Doesn't this happen automatically when one uses rtpengine_manage() in the failure_route?

I would think it does, as long as you supply the via-branch parameter.


A remark for kamailio transaction states point of view: in failure route the entire transaction is in failed state, so there is not active branch, so at that point it should delete all (previous) rtpengine sessions/branches.

Re-routing to a new destinations should go via a branch route where a new session is initiated in the rtpengine.

As I got it, the use of via-branch flag for deleting a session makes sense in event route for branch-failure, when other branches can still be active or one was answered.

Btw, a few questions for further clarifications: if a call has parallel forking and rtpengine offer is executed for each branch, one is answered, but the other branch-sessions are not not deleted, what does rtpengine? It times them out, or keeps them for the duration of the call?

Also in the case of parallel forking, if via-branch is not give to rtpengine offer command, does the 2nd (and the next) rtpengine offer command overwrite the previous one, so the rtpengine keeps only the data from the last one?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com
Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com