[asterisk-dev] [Code Review] SIP: proper handling of forked outbound INVITE requests.

David Vossel dvossel at digium.com
Wed Sep 29 09:54:02 CDT 2010



> On 2010-09-28 17:48:39, Kevin Fleming wrote:
> > I've given the code a once-over and it looks sane, but the description made me ask another question: what will happen when Asterisk receives provisional responses to the forked INVITE? These establish an 'early dialog' but otherwise don't need any action... will Asterisk just drop them safely (and not disturb the sip_pvt's contents for the *real* early dialog we plan to keep)?

I don't see how it is possible to have multiple early dialogs for a single outbound INVITE request. The to-tags for provisional responses can change later, and should not be held on to from what I understand.  Since the final establishment of the to-tag is used to distinguish the forked request, I don't know how this could be done in any other way before the 200 OK.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/946/#review2792
-----------------------------------------------------------


On 2010-09-28 17:32:11, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/946/
> -----------------------------------------------------------
> 
> (Updated 2010-09-28 17:32:11)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> RFC3261 section 12 about dialog creation says an INVITE transaction results in an established dialog once it receives the 200 OK response.  It is possible to receive multiple differing 200 OK responses for a single outbound INVITE Request, and this should result in establishing multiple dialogs.
> 
> This patch allows for all differing 200 OK responses to an INVITE request to establish a separate dialog, but only the first dialog is kept. All other resulting dialogs from the initial request are immediately ACKed and then immediately terminated with a BYE request.
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 289176 
> 
> Diff: https://reviewboard.asterisk.org/r/946/diff
> 
> 
> Testing
> -------
> 
> I have tested this with several sipp scenarios where multiple 200 OKs are generated for a single outbound INVITE from Asterisk.  In these scenarios I have verified that the BYE sent as result of a forked request for termination will retransmit correctly eventually timing out and destroying the dialog, and that the forked dialogs are destroyed correctly immediately after the BYE request receives the 200 OK response.  If the 200 OK generating the dialog is retransmitted for some reason, the Asterisk will continue to ACK it correctly as well.
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list