< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Question about TimerE1 in ClientNonInvite and TimerA in ClientInvite.


I found the TimerE1 and TimerA that control the retransmittion of request 
weren't created in related transactions. Is there there any thoughts about it? 
I believe these two Timer should be created while in Trying state both in 
ClientNonInvite and ClientInvite according to RFC3261:

1 processClientNonInvite function
void TransactionState::processClientNonInvite(  Message* msg )
{ 
   StackLog (<< "TransactionState::processClientNonInvite: " << msg->brief());

   assert(!isInvite(msg));

   if (isRequest(msg) && isFromTU(msg))
   {
      //StackLog (<< "received new non-invite request");
      SipMessage* sip = dynamic_cast<SipMessage*>(msg);
          if (mMsgToRetransmit) delete mMsgToRetransmit;
      mMsgToRetransmit = sip;
          //----------added by yuhuicai------------
      if (!mIsReliable)
      {
            mController.mTimers.add(Timer::TimerE1, mId, Timer::T1 );
      }
          //-----------------------------
      mController.mTimers.add(Timer::TimerF, mId, Timer::TF);
      sendToWire(sip);  // don't delete





2 processClientInvite funcyion.
void TransactionState::processClientInvite(  Message* msg )
{
   StackLog(<< "TransactionState::processClientInvite: " << msg->brief() << " " 
<< *this);
   if (isRequest(msg) && isFromTU(msg))
   {
      SipMessage* sip = dynamic_cast<SipMessage*>(msg);
      switch (sip->header(h_RequestLine).getMethod())
      {
         // Received INVITE request from TU="Transaction User", Start Timer B 
which controls
         // transaction timeouts. 
         case INVITE:
            delete mMsgToRetransmit; 
            mMsgToRetransmit = sip;
                        //------------added by yuhuicai-----------------
                        mController.mTimers.add(Timer::TimerA, mId, Timer::T1);
                        //--------------------------------
            mController.mTimers.add(Timer::TimerB, mId, Timer::TB );
            sendToWire(msg); // don't delete msg
            break;