-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report disconnection event immediately when hanging up a call #2600
Conversation
Just recalled about the idea of adding an API to get info about free call slot count. But then perhaps it can be calculated from |
Comment from @calanor in #2582
Yes, that's true. I was thinking of introducing a flag to detect this, but was not sure if it's necessary or if it's going to be useful. Let us know if this causes any complications. |
No, it is not a problem for me. I was just saying it for your information. |
I am developing a sip application for Android. Faced such a situation: Regards, Ivan. |
To continue the work in #1049 and close it.
pjsua_call_hangup()
, application will immediately receiveon_call_state()
callback with DISCONNECTED state. No further call related callbacks will be received after this. The call hangup process itself (sending BYE, waiting for the response, and resource cleanup) will continue in the background and the call slot can be reused only after this process is completed.CALL_HANGUP_RETRY_INTERVAL
if it fails. If this keeps happening afterCALL_HANGUP_MAX_RETRY
times, we will hard-terminate the call, i.e. cleanup the call without sending any BYE to the remote.This will introduce some behavioural changes though:
on_stream_destroyed()
will be called beforeon_call_state()
. Previously, it was the reverse.on_stream_destroyed()
, but note thaton_stream_destroyed()
can also be called during media update, can be called multiple times if there are more than one audio streams, and won't be called if there is no audio (such as in video-only calls).