code: private void initializeState(final SipPacket msg) throws SipPacketParseException {
          if (msg.isRequest()) {
              if (msg.isInvite() && msg.isInitial()) {
                  transition(CallState.INITIAL, msg);
              } else if (msg.isAck()) {
                  // TODO: need to figure out whether this is an ACK to a 200 or
                  // a error response since we would transition differently
                  // but not sure how we could if the initial invite is lost
                  transition(CallState.IN_CALL, msg);
              } else if (msg.isBye() && !msg.isInitial()) {
                  transition(CallState.COMPLETED, msg);
              }
  
          } else {
              final SipResponsePacket response = (SipResponsePacket) msg;
              if (response.isInvite()) {
                  if (response.is100Trying()) {
                      transition(CallState.TRYING, msg);
                  } else if (response.isRinging()) {
                      transition(CallState.RINGING, msg);
                  } else if (response.isSuccess()) {
                      transition(CallState.IN_CALL, msg);
                  }
              } else if (response.isBye() && !response.isInitial()) {
                  transition(CallState.COMPLETED, msg);
              }
          }
      }
docs: Since traffic can come in any order due to the fact that we can merge
  multiple pcaps etc we may miss the initial traffic (perhaps we didn't
  even captured it) so when initializing the state we can really jump into
  the state machine anywhere. Hence, this method tries to figure out where
  in the state machine we need to "jump" into assuming that we would have
  received the traffic that has gone missing.
  
  
  @param msg
  @throws SipPacketParseException