Voip calling application

Hi everyone,

I’m working on a VoIP calling application and facing an issue with handling temporary network loss during an active call.

Currently, when the network drops:

On the UI side, the call disconnects immediately.

On the receiver side, I have configured RTP_TIMEOUT = 30 seconds, so the call disconnects automatically after 30 seconds, which is expected.

Requirement: Instead of immediately disconnecting on the UI when the network is lost, I want to:

Keep the call screen active for at least 15 seconds

If the network is restored within those 15 seconds, the call should resume

If not, then the call can be disconnected

Tech stack:

Asterisk (Dialplan + ARI)

WebRTC

Twilio (carrier)

SIPBuddy

React.js (UI)

Has anyone implemented a similar reconnection/retry mechanism?

What would be the best approach to handle this gracefully (both signaling and UI side)?

Any suggestions or references would be really helpful.

Thanks in advance!

How is the sending side getting to know that something has broken? Why isn’t the receiving side using the same mechanism?

What is the specific point of failure, in your case?

(I’d expect both sides to continue until the RTP timed out, although, I suppose for close in faults, ICMP host unreachable might just make its way back to the sending application.)

In my case whenever I lost network in the call I’m getting something on the console like WebSocet disconnected I guess this is hanging up my call immediately after losing network.

I overlooked the WebRTC reference.

If it is saying that, the TCP connection has been closed,

I’m getting confused because you seem to have listed things in the wrong order. as I wouldn’t expect one to ever use WebRTC to a provider.

I’ve no personal experience of Asterisk WebRTC, but from previous responses here, you need detailed low level debugging skills to fix problems with it, so I think you need to get wireshark traces and find out exactly what is happening.