Skip to content

PJSUA-LIB should report disconnection event immediately after pjsua_call_hangup() is called #1049

@pjsipbot

Description

@pjsipbot

2010-03-29 08:05:15: @bennylp created the issue on trac ticket 1049

There are several scenarios in which call DISCONNECTED state will only be reported later, if at all, after pjsua_call_hangup() is issued:

  • when INVITE is not responded with any responses yet (not even provisional responses), which in this case, PJSIP will continue retransmitting the request until either a response is received (and if it's not a final response, CANCEL then will be issued), or retransmission times out 32 seconds after call is initiated.
  • when BYE is issued against peer which doesn't exist; in this case, the DISCONNECTED state will be issued after the BYE transaction times out, 32 seconds after it is issued
  • when BYE is answered with failure final response; in this case, most likely call will stay as is. Note that 408 and 481 response would cause call to be terminated though. (in inv_handle_bye_response(), any response other than 401 and 407 will end the session).
  • when 200/OK for CANCEL is received, but the final response for the INVITE transaction never arrives; in this case, call will remain as is indefinitely (!) (done in Handle the case when CANCEL is responded with 200/OK but 487 is not sent #503)
  • when ACK is not received yet for 200/OK, UAS is not able to send BYE. The stack ideally should send the BYE automatically once ACK is received (done in Must not send BYE before ACK is received #1712)

In all cases above, it is desirable to have the application receives the DISCONNECTED event immediately and let PJSUA-LIB handle the call under the hood. Several scenarios that must be handled by PJSUA-LIB include:


2010-09-14 12:04:10: @bennylp changed milestone from Known-Issues-and-Ideas to release-2.x


2014-04-07 10:24:40: @bennylp edited the issue description


2014-04-07 10:28:43: @bennylp edited the issue description


2014-04-07 10:31:31: @bennylp edited the issue description


2015-03-02 09:42:20: @mingteluu edited the issue description


2018-02-08 01:17:31: @nanangizz edited the issue description


2018-02-08 01:17:31: @nanangizz changed milestone from release-2.x to release-2.8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions