Opened 5 years ago

Closed 5 years ago

#2175 closed defect (fixed)

Delayed sending of ACK request (using on_send_ack() ) may prematurely send the ACK

Reported by: ming Owned by: bennylp
Priority: normal Milestone: release-2.9
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Scenario:

  1. send INVITE
  2. recv 200/OK
  3. app implements on_send_ack() and calls pjsip_inv_create_ack(), but have not sent it.
  4. recv retransmission of 200/OK
  5. PJSIP auto answers the ACK

The doc of on_send_ack() says:

     * Application creates the ACK request
     *
     * Once it has sent the ACK request, the framework will keep 
     * this ACK request in the cache. Subsequent receipt of 2xx response
     * will not cause this callback to be called, and instead automatic
     * retransmission of this ACK request from the cache will be done
     * by the framework.

But actually pjsip_inv_create_ack() is the one that saves inv->last_ack. So the auto transmission already happens in inv_send_ack() of sip_inv.c, even though app hasn't sent the ACK.

Change History (1)

comment:1 Changed 5 years ago by ming

  • Resolution set to fixed
  • Status changed from new to closed

In 5931:

Fixed #2175: Make sure that last ACK has been sent before retransmitting it.

Also update the doc that the callback can now be called more than once.

Note: See TracTickets for help on using tickets.