BelledonneCommunications / linphone-sdk

Mirror for linphone-sdk (https://gitlab.linphone.org/BC/public/linphone-sdk.git)
GNU Affero General Public License v3.0
105 stars 81 forks source link

[Bug]: Call terminated after 30 seconds when call on hold from version 5.2.61+ #306

Closed ypedegroot closed 1 year ago

ypedegroot commented 1 year ago

Context

The Linphone SDK is used in a native Android (Kotlin) app, targeting API 26 and above. We use it to make audio calls. The dependency is declared as follows: org.linphone.minimal:linphone-sdk-android:5.2.67

General information

Expected behaviour

When placing a call on hold, I expect the call to be on hold "forever" (at least as long the PBX allow for a max-call duration).

To Reproduce

Receive (or place) a call from another SIP client on the same PBX. Confirm audio is bidrectional. Place the call on hold. After 32 seconds, the call is terminated. The following interesting log is shown:

2023-06-06 16:08:36.791  5654-5654  LinPhoneSdk             com.apps.myapp                       I  Call [0xb40000746f85e2f0]: Media connectivity with "Test User" <sip:3002@3cx.xxxxxxxxxxx.com:5060> is lost, call is going to be terminated
2023-06-06 16:08:36.791  5654-5654  LinPhoneSdk             com.apps.myapp                       W  Session [0xb40000740f84ec58] is going to be terminated because the media has been lost
2023-06-06 16:08:36.791  5654-5654  LinPhoneSdk             com.apps.myapp                       I  Terminate CallSession [0xb40000740f84ec58] which is currently in state [LinphoneCallPaused]

After that, the SDK sends a BYE, to which the server correctly responds with a 200 OK.

Additional context

I have verified that this problem has started occuring in version 5.2.61 and later. 5.2.57 is the latest version in which this behaviour does not occur.

When comparing the changes (based on the SDK releases), I think one interesting commit is commit ...a23139f. See this link: https://github.com/BelledonneCommunications/linphone-sdk/compare/5.2.57...5.2.61

There, I see the exact WARN message that I also see in my SDK logs.

SDK logs URL

No response

Viish commented 1 year ago

Hi,

Indeed it seems the no rtp timeout will trigger when putting the call in hold, that's not expected. @AndreaGianarda it is related to the changes you made for the conference server. Can you check?

@ypedegroot In the meantime you can disable the no rtp timeout by setting it's value to 0 and using a SDK >=5.2.69 (I made a fix for that specifically).

Cheers,

Viish commented 1 year ago

@smorlat for info.

ypedegroot commented 1 year ago

Hi Viish,

Thanks for your swift response. I use the linphone.org maven repository (https://linphone.org/maven_repository) to include the dependencies in my project. When will the 5.2.69 version be available there?

Viish commented 1 year ago

Hi @ypedegroot, it is available now.