RE: [reSIProcate] Question about TimerE1 in ClientNonInvite and TimerA in ClientInvite.
Timer E and Timer A are only created in the case where an unreliable
transport is used such as UDP. Because the transport is chosen after the
transaction is created, we can not create the Timer at this time. Rather,
the Timer A (or Timer E for NIT) is created when the transport is actually
chosen based on the results of the async query to dns. See the code in
TransactionState::processReliability and in
TransactionState::handle(DnsResult* result).
I believe the current implementation to be correct - and the retransmission
behavior has been tested for both NIT and IT.
Jason
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf
> Of yuhuicai
> Sent: Saturday, July 24, 2004 6:07 AM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [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;
>
>
>
>
>