[Home]

Summary:ASTERISK-18073: If INVITE transaction runs in parallel with INFO transaction, 200 OK for INVITE does not contain contact headers
Reporter:Emmanuel BUU (neutrino88)Labels:
Date Opened:2011-06-28 18:47:45Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Channels/chan_sip/Video
Versions:1.8.4 13.18.4 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:Linux Fedora Core 9.Attachments:( 0) chan_sip.patch
Description:In case of inbound video calls using 183 session progress, the following call flow may happend

UA                    asterisk

INVITE --------------->

<--------- 183 Session Progress

INFO (Fast Update Request) --->

<----- 200 OK (INFO) ----------

...

<----- 200 OK (INVITE) --------

In that case, the 200 OK message for INVITE does not contain any "Contact" header which in our case breaks the loose routing handling of our SIP proxy.

After investigation, we found out that the function respprep() in chan_sip.c was simply using the LAST method name in the dialog to decide whether or not the Contact header was needed rather than the method matchin THIS request.
Comments:By: Emmanuel BUU (neutrino88) 2011-06-28 18:48:26.762-0500

This simple patch fixes the issue

By: Emmanuel BUU (neutrino88) 2011-06-28 18:51:19.310-0500

Note for the hard code SIP standard reader: // transactions within a dialog (INVITE and another kind of transaction) are allowed as long as both are not INVITEs:

See RFC 3261

14.1 UAC Behavior
(...)
Note that a UAC MUST NOT initiate a new INVITE transaction within a
  dialog while another INVITE transaction is in progress in either
  direction.

     1. If there is an ongoing INVITE client transaction, the TU MUST
        wait until the transaction reaches the completed or terminated
        state before initiating the new INVITE.

     2. If there is an ongoing INVITE server transaction, the TU MUST
        wait until the transaction reaches the confirmed or terminated
        state before initiating the new INVITE.

  However, a UA MAY initiate a regular transaction while an INVITE
  transaction is in progress.  A UA MAY also initiate an INVITE
  transaction while a regular transaction is in progress.