|
|
|
|
@ -812,6 +812,13 @@ int trans_layer::update_uas_reply(trans_bucket* bucket, sip_trans* t, int reply_
|
|
|
|
|
//bucket->remove_trans(t);
|
|
|
|
|
//return TS_TERMINATED;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// In this stack, the transaction layer
|
|
|
|
|
// takes care of re-transmiting the 200 reply
|
|
|
|
|
// in a UAS INVITE transaction. The core above
|
|
|
|
|
// is commented out and shows the behavior as
|
|
|
|
|
// required by the RFC.
|
|
|
|
|
//
|
|
|
|
|
t->state = TS_TERMINATED_200;
|
|
|
|
|
t->reset_timer(STIMER_G,G_TIMER,bucket->get_id());
|
|
|
|
|
t->reset_timer(STIMER_H,H_TIMER,bucket->get_id());
|
|
|
|
|
@ -819,8 +826,9 @@ int trans_layer::update_uas_reply(trans_bucket* bucket, sip_trans* t, int reply_
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
t->state = TS_COMPLETED;
|
|
|
|
|
//TODO: set J timer
|
|
|
|
|
t->reset_timer(STIMER_J,J_TIMER,bucket->get_id()); // 0 if !UDP
|
|
|
|
|
// TODO: set J timer
|
|
|
|
|
// 0 if !UDP
|
|
|
|
|
t->reset_timer(STIMER_J,J_TIMER,bucket->get_id());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
@ -843,11 +851,9 @@ int trans_layer::update_uas_request(trans_bucket* bucket, sip_trans* t, sip_msg*
|
|
|
|
|
case TS_COMPLETED:
|
|
|
|
|
t->state = TS_CONFIRMED;
|
|
|
|
|
|
|
|
|
|
// TODO: remove G and H timer.
|
|
|
|
|
t->clear_timer(STIMER_G);
|
|
|
|
|
t->clear_timer(STIMER_H);
|
|
|
|
|
|
|
|
|
|
// TODO: set I timer.
|
|
|
|
|
t->reset_timer(STIMER_I,I_TIMER,bucket->get_id());
|
|
|
|
|
|
|
|
|
|
// drop through
|
|
|
|
|
@ -1071,16 +1077,21 @@ void trans_layer::timer_expired(timer* t, trans_bucket* bucket, sip_trans* tr)
|
|
|
|
|
case STIMER_E: // Trying/Proceeding: (re-)send request
|
|
|
|
|
case STIMER_G: // Completed: (re-)send response
|
|
|
|
|
|
|
|
|
|
n++;
|
|
|
|
|
|
|
|
|
|
n++; // re-transmission counter
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// in this stack, the transaction layer
|
|
|
|
|
// takes care of re-transmiting the 200 reply
|
|
|
|
|
// in a UAS INVITE transaction.
|
|
|
|
|
//
|
|
|
|
|
if(tr->state == TS_TERMINATED_200){
|
|
|
|
|
|
|
|
|
|
// Retransmit reply to INV
|
|
|
|
|
// re-transmit reply to INV
|
|
|
|
|
retransmit(tr);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
// Retransmit request
|
|
|
|
|
// re-transmit request
|
|
|
|
|
retransmit(tr->msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|