diff options
-rw-r--r-- | pjsip/src/pjsip/sip_transaction.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c index 82722332..faa9b2fe 100644 --- a/pjsip/src/pjsip/sip_transaction.c +++ b/pjsip/src/pjsip/sip_transaction.c @@ -2392,9 +2392,7 @@ static pj_status_t tsx_on_state_proceeding_uac(pjsip_transaction *tsx, /* Stop timer B. */ pjsip_endpt_cancel_timer( tsx->endpt, &tsx->timeout_timer ); - /* Generate ACK now (for INVITE) but send it later because - * dialog need to use last_tx. - */ + /* Generate and send ACK (for INVITE) */ if (tsx->method.id == PJSIP_INVITE_METHOD) { pj_status_t status; @@ -2403,6 +2401,10 @@ static pj_status_t tsx_on_state_proceeding_uac(pjsip_transaction *tsx, &ack_tdata); if (status != PJ_SUCCESS) return status; + + status = tsx_send_msg( tsx, ack_tdata); + if (status != PJ_SUCCESS) + return status; } /* Inform TU. */ @@ -2411,10 +2413,6 @@ static pj_status_t tsx_on_state_proceeding_uac(pjsip_transaction *tsx, /* Generate and send ACK for INVITE. */ if (tsx->method.id == PJSIP_INVITE_METHOD) { - pj_status_t status; - - status = tsx_send_msg( tsx, ack_tdata); - if (ack_tdata != tsx->last_tx) { pjsip_tx_data_dec_ref(tsx->last_tx); tsx->last_tx = ack_tdata; @@ -2426,10 +2424,6 @@ static pj_status_t tsx_on_state_proceeding_uac(pjsip_transaction *tsx, pjsip_tx_data_add_ref(ack_tdata); */ } - - if (status != PJ_SUCCESS) { - return status; - } } /* Start Timer D with TD/T4 timer if unreliable transport is used. */ |