[Kamailio-Users] INVITE branch handling for multiple contacts.

Alex Balashov abalashov at evaristesys.com
Sat Aug 2 22:08:41 CEST 2008


Greetings,

Is there a place somewhere that expounds upon or otherwise illustrates 
the inner workings of call forking for multiple concurrent contacts?  I 
can only find a patchwork of hints by perusing the documentation for the 
'tm' and 'registrar' modules, and they don't provide me entirely with 
the understanding that I am looking for.

Failing that, I am seeking answers and clarifications to the following 
general questions.  All of them concern handling of an INVITE in a 
situation where the registrar module allows multiple concurrent 
contacts, and multiple contacts are in fact registered, and the 
"append_branches" modparam to "registrar" is set to 1.

1. What is officially supposed to happen if multiple contacts to which 
the INVITE is relayed all answer the call instantaneously, whether via 
183 early media or 200 OK -- but not OOB ringing events?

What I get seems a little strange, although perhaps there is an 
explanation that I am missing.

Both far-endpoints send a 200 OK w/SDP and I hear both media streams 
simultaneously when I call, interleaved by clicks.  After a while, the 
second (most recent) contact's media stream drops off because the UAC 
decides that the call has timed out because it has not received ACK 
replies to its 200 OKs;  at the same time, OpenSER appears to generate a 
CANCEL for that second call leg.  The CANCEL is replied to with a 200 OK 
(not a 487 Request Terminated?) although this seems a little bizarre 
since the dialog's state is already established -- but since the 200 OKs 
are never replied to, I suppose it is not necessary to receive a BYE in 
order to terminate that request.  Meanwhile, 200 OKs in response to 
INVITE keep coming from the contact that was slower to pick up and was 
CANCEL'd (why? this is Asterisk 1.4), but the ACKs from them keep being 
routed to the first contact (the one that remains), which must be 
understandably confused as to why they're there although processed as 
retransmissions.

I have a packet capture I'd love to send someone for interpretation, but 
would rather do it privately off-list.

2. Is there a shared REPLY-ROUTE for replies on each branch?  Or is 
there a way to fragment particular reply routes for each branch?


The goal I am ultimately looking to achieve is surely commonplace 
enough;  I would like multiple concurrent registrants to be able to be 
rung at one request URI.  But at present, it seems some very strange 
things are happening when this occurs that confuse the far-end UACs.

That's what governs my intuition that I just need to properly understand 
how branching is supposed to work.

Thanks,

-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599




More information about the sr-users mailing list