Android SIP listener onCallEnded delays when the call is over

I am using android built in to SIP API . ( Sample code ) I need to close the session when the call ends (SipAudioCall.endCall () and SipAudioCall.close ()).

Problem : when the user on the other hand hangs up, it takes 0-60 seconds while the listener is in

SipAudioCall.Listener.onCallEnded(SipAudioCall call) 

starts up. Also call.isInCall () takes aproximatly the same amount of time to change. I need to close the session / call to make another call. At the moment when the user on the other end hangs first, I need to wait up to 60 seconds to make another call.

Why take so much time to run onCallEnded, and is there a way to fix this?

+4
source share
1 answer

I use the same code but get no delay. I have an audio listener on both makecall and the call, and when I turn off the call, I just call audioCall.endCall () on the audioCall object returned by takecall ().

If you need more help, please comment, and I need to ask how you implement the call rejection feature.

thanks

0
source

All Articles