VoIPGRID / VialerSIPLib

An Objective-c wrapper for PJSIP
GNU General Public License v3.0
133 stars 69 forks source link

No Internet But Call still connected. #214

Open mudassirzulfiqar opened 4 years ago

mudassirzulfiqar commented 4 years ago

Version

3.7.1

File / Feature

VSLCall

Expected behavior

Like other Sip libraries, When there is no internet from mobile or wifi, the Library should change the status to disconnect or something else. Or at least try to re invite when there is an internet available

Actual behavior

Im connected to a call but when I turn off the internet, call still gets connected. Or Registration is still valid, The library should handle the pjsip_status_code.

Other info

If there is not internet for more than 10 seconds and if I get connected back to Wifi the library then hangup the call. Which is weird behaviour to me. Can anyone helps me with this use case, how to make it compatible with internet changes.

ludivinefafournoux commented 4 years ago

Hello, you can handle account.registrationStatus but you have to wait a 408 error and it takes more or less 30 sec. The device try to register again until it works. The delay increase between each try.

For that you can add KVO on account like in example App

mudassirzulfiqar commented 4 years ago

Hello, thanks for helping out. I somehow wants to remove the delays because we want quick status updates rather then keep the client on waiting. If client has not internet, then we need to show him the quick status may be after 5 to 10 seconds.