Giter VIP home page Giter VIP logo

Comments (3)

InnovateAsterisk avatar InnovateAsterisk commented on June 3, 2024

chan_sip.c: Disconnecting call 'SIP/1082-0000e7fd' for lack of RTP activity in 16 seconds

The old sip.conf file has a rtptimeout= setting that will hang up the call after that amount of time without being sent RTP packets. Your setting is set to 16. As you saw in the log.

Making this setting more, may not fix your problem tho. The real problem is why is your server not getting any RTP packets for 16 seconds?

At the same time, other calls were stablished without issues.

If you have concurrent calls, and only some are being ended, then something is causing this per channel.

So, I've run Wireshark on my computer, and it seems that my computer stops sending RTP packets to the server.

From what I see, your pc keeps sending packets to the server (asterisk.pbx) but, firstly the server is not receiving them (hence the timeout), and second the server stops sending packets to the client (your pc). The only reason that Asterisk would stop sending packets to the client is if it performed a re-invite. It shouldn’t be doing this, since it’s not possible to re-invite DTLS sessions in Asterisk.

This situation occurs randomly.

When things happen randomly, it’s often network or hardware related. Maybe a faulty NIC, not sure. (Although if it was that, it would probably affect all calls). You would need to find out if this is truly random, or some pattern that you are not picking up yet.

Is this a problem with SIP.JS?

No, sip.js is not a media stack. It’s only handles the sip messages. The RTP is all handled by the browsers internal media stack.

One thing to make sure works is STUN. This is used in the media negotiations. It should not be left out, even if you are using a local lan. Asterisk rtp.conf also requires the stun settings.

from browser-phone.

Raul2023BC avatar Raul2023BC commented on June 3, 2024

Thank you for your prompt reply.

Well, I added a "Stun/Turn" server to my topology, and it works well. However, it works only in the beginning of the negotiation.
When the soft phone can't establish a peer-to-peer connection with the server, it sends RTP Stream to the TURN server (I can confirm it in the logs of the TURN Server and also in chrome://webrtc-internals/)

But when the RTP gets lost with a call that already was established, nothing happens. After 16 seconds, Asterisk Server disconnects the call.

Can SIP.js handle this event and renegotiate the ICE? I think the name of the event is iceconnectionstatechange.

from browser-phone.

InnovateAsterisk avatar InnovateAsterisk commented on June 3, 2024

From my understanding the TURN server would just end up being "before" Asterisk. This is often just an unnecessary hop for the media path. In a way Asterisk always has to be the TURN server / media relay / whatever you want to call it. This is because if Asterisk doesn't get a constant stream of RTP packets, it will consider the call dead, and hang it up. Asterisk is not a proxy, its a back-to-back user agent (B2BUA).

Without encryption, Asterisk has a neat trick, that can "optimise" itself out of a media path if the conditions are correct. This is rarely the case. Any setting from rtptimeout to MixMonitor will make it not possible for the media directly between the peers.

What are you trying to achieve here? Do you want peer-to-peer? If this is the case Asterisk just isn't the correct tool. Asterisk can't receive the call, route it to the correct endpoint, and then expect media to flow between the two endpoints (the way a proxy can)

Also, you mention "when the RTP gets lost with a call that already was established". My question here is, why would this happen? Your server IP would never change during a call. Maybe your client IP address would change... are you asking in the event that your PC changes connectivity during a call?

from browser-phone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.