예제 #1
0
void WaitingFor200OkWithMediaOffer::ProvisionalResponse( DialogTracker& impl, SipMessage& response, const char* address, int port ) const
{
   if( response.getResponseStatusCode() != SIP_TRYING_CODE )
   {
      // RFC requires that all SDP previews be identical.  In ensure that this
      // requirement is met, we apply the saved copy of the patched SDP preview
      // to the response.
      if( response.hasSdpBody() )
      {
         impl.applyPatchedSdpPreview( response );
      }

      // we are receiving a provisional response - check if it is sent reliably...
      if( response.getHeaderValue( 0, SIP_RSEQ_FIELD ) )
      {
         // Presence of RSeq: header in the message indicates that it is sent reliably
         ChangeState( impl, impl.pWaitingForPrackWithMediaAnswer );
      }
      else
      {
         // We have received an unreliable provisional response - although that does
         // not cause a state machine state change, we need to reset the tick counter
         // to show that there is still activity in this dialog.
         impl.resetTimerTickCounter();
      }
   }
}
예제 #2
0
void WaitingFor200OkWithMediaOffer::SuccessfulResponse( DialogTracker& impl, SipMessage& response, const char* address, int port ) const
{
   // RFC requires that all SDP previews be identical.  In ensure that this
   // requirement is met, we apply the saved copy of the patched SDP preview
   // to the response.
   if( response.hasSdpBody() )
   {
      impl.applyPatchedSdpPreview( response );
   }
   ChangeState( impl, impl.pWaitingForAckWithAnswerForInvite );
}