[SIPForum-discussion] Parallel forking behavior

Paul Kyzivat pkyzivat at alum.mit.edu
Tue Jul 12 03:03:07 UTC 2016


On 7/10/16 2:39 AM, Sam Kirubakaran L wrote:
> Hi,
>
>
>
> I have some doubts regrading parallel forking of INVITE request.
>
>
> Suppose I have 3 contacts registered to the location service and while
> forking, proxy forwards the INVITE to 3 UASs.
>
>
> Consider the UASs are A, B and C.
>
>
> And A's 180 response is the first to reach the proxy which will be
> forwarded to UAC. And also the proxy had received the 180 response from
> UAS B and C.

These are also to be forwarded to the UAC.

> What if B sends 200 OK before A? How the proxy will process the dialog
> state ? What will be the behavior of the UAC ?

Proxies aren't expected to maintain dialog state. (Though they aren't 
forbidden from doing so.)

But a forking proxy MUST maintain transaction state for all the forks.

The 200 will contain the to-tag from A. The proxy needs to forward the 
200 to A (based on the to-tag). It is also expected to send CANCEL 
requests to B and C.

Of course it is still possible that B and/or C might send back a 200 
before getting the CANCEL. If so, then the proxy MUST also forward those 
to the UAC. (This is the only situation where the UAC will receive 
multiple (non-retransmitted) final responses.

And if the UAC gets multiple 200 responses (of necessity from different 
legs of a fork) then it needs to deal with those. Typically it will send 
a BYE to the latecomers. But it isn't required to do that. It may accept 
them all. (This might make sense if the UAC is a conference focus.) Or 
it could accept a later one and send a BYE to an earlier one.

This is fundamental SIP stuff.

	Hope this helps,
	Paul




More information about the discussion mailing list