Stop recieving calls with webrtc!

Foto del perfil de Junior Mena

Junior Mena

12:03 (hace 13 minutos)

a JsSIP

I presenting the following problem

When I am using my web app, I can recieve call even if I am not in the chrome tab that my app is, but when I minimize chrome and start using another app, after 10-15 minutes I can not recieve calls because in the central(we are using asterisk) my webrct extension number appears disconnected

Any ideas why this can happen, i have tried with some solutions but it still happens

I’d glad if you can help me

regards,

That sounds like it is a question to ask the Chrome community.

There are some things that can cause this… Chrome (and I guess other major browsers) have memory saving options, that will prioritise the currently visible tab. For example if you go to:
chrome://discards/
You will be able to see if a tab will get “discarded” if you tab away. This normally happens when you have very low memory available.

That’s on a desktop PC, however if you experience this on a tablet, or mobile device… then you are just outta luck. Almost all mobile/tablet operating systems make drastic attempts to save memory and resources, and just about all have their own settings and ways to do this. They will also close down network connections in these attempts - If you want to build a phone in a browser for a tablet - don’t.

If this is not to do with memory optimisation, then you should look at your qualify frequency, or keep-alive settings. Firstly the qualify - make sure you are sending an OPTIONS packet to the client every 60 seconds (or 2 min etc), to keep the registration in place. If this is in place the network level keep-alive is normally not necessary. Sending a keep-alive packet (from the client) over the established TCP web-socket connection is not always necessary if you are sending data (the options packet) already. But, in some cases routers and other devises will actually close established connections if they see that no data has ben sent or received over it in a “long” time (say 10-15min).

Check the Asterisk CLI - if there is a line something like: ..."Web socket closed abruptly". Then you know that your web-socket is being pulled down by something like a tab being disposed, or a router disconnecting etc.

1 Like

You need to convert your app into a desktop html app (just the softphone part). other than that the browsers are doing the right thing : shut the chatter of all the javascript scripts along all the rendering engines that are running on all the tabs that are not active, and this is just CPU, if you add RAM usage for each tab you end up consuming all computer resources for tabs that you don’t work with, probably even didn’t know they were loading different gif or video ads every 15 seconds to earn more on your visit.
As a final note, a javascript softphone is not designed to replace a hardphone or a regular softphone, the design behind it is to offer sip support on the browser for websites wishing to make it easy to talk to customers or for call centers to have agents that would only need a browser to work.

1 Like

Thanks for your help!