Jigasi - Jigasi Delay in Hangup


#1

Hi,

I am running jitsi-meet with jigasi and Asterisk, and I am running into a delay after hanging up.

My use case is so that first a user creates a conference through jitsi-meet, and then dials an external participant over Jigasi. This is working fine and the call goes through. However, when the web client hangs up, the Asterisk side of the call takes around 18 seconds to disconnect. During this time the line is just silent.

I have checked asterisk logs by setting SIP SET DEBUG ON, which shows me that after the web user presses the hang up button jigasi is taking around 10-15 seconds to send the BYE message to Asterisk.

On the other hand, if the phone client is the one who hangs up, jitsi-meet reflects that nearly instantaneously.

Do you have any clue what could be causing this behaviour or how I could fix it or further debug it? Could it have to do with jicofo or prosody rather than jigasi?

EDIT:
Actually, I’ve just realised from the Jicofo logs that the call is terminated from a single participant timeout:

Jicofo 2018-10-25 08:21:43.308 INFO: [99] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Timing out single participant: 79a4b7aeb57516a2d4af9ad43688db6ec9e04e685e1f791f5ae76fcb89187e71@conference.mydomain.com/166aa4f9606 Jicofo 2018-10-25 08:21:43.308 INFO: [99] org.jitsi.jicofo.JitsiMeetConferenceImpl.log() Terminating: 79a4b7aeb57516a2d4af9ad43688db6ec9e04e685e1f791f5ae76fcb89187e71@conference.mydomain.com/166aa4f9606 Jicofo 2018-10-25 08:21:43.308 INFO: [99] org.jitsi.protocol.xmpp.AbstractOperationSetJingle.terminateSession().597 Terminate session: 79a4b7aeb57516a2d4af9ad43688db6ec9e04e685e1f791f5ae76fcb89187e71@conference.mydomain.com/166aa4f9606

How could I close the conference cleanly, rather than timing out? Or how can I kick the phone client when the web client hangs up?


#2

By hangup the web you mean closing the tab or pressing the hangup button? Does it behaves differently if you press the hangup button?
You can also try adjusting this property: https://github.com/jitsi/jigasi/blob/219c89b5f19bc146a87c2bd163b85f92e05a1d10/src/main/java/org/jitsi/jigasi/AbstractGateway.java#L65


#3

The web site client is hanging up by doing the actions in this order:

  1. Press hangup button
  2. Running the callback that I have set for readyToClose, which calls api.dispose() and closes the iframe.

The timeout that you mention is indeed culprit. My only question is if I change this value to something lower (0 for instance), will that get triggered if the web client’s Internet connectivity is interrupted momentarily?


#4

I doubt, cause interrupting should not trigger closing the bosh session. The session will expire in 30 or 60 seconds, depends on the settings (do not remember the default value) and then prosody will kick that participant and this disconnect will happen.
But if it happens to disconnect the bosh session, then and jigasi will drop.


#5

If the value is less than 0, immediate stop is executed.


#6

I also found this singleParticipanTimeout in Jicofo, which matches the situation I described (20 seconds of delay). I wonder if I should modify it here rather than on Jigasi AbstractGateway. What do you think?

It also matches the jicofo logs Timing out single participant. But I wonder, how can I kick out the jigasi client cleanly when the web client presses the hang upo button?


#7

So this is the case where you open a two way call (no p2p enabled), one participant leaves, but the other one still sends data to jvb and after 20 seconds jicofo will terminate the jingle session, so the participant will stay in the room but will not send media.
So in the case of jigasi, the timeout I sent you by default is 3 minutes, where this one is 20 seconds, so this thing kicks in first and I think that when jigasi receives this terminate will also drop sip, good catch.
I would say change the timeout in jigasi which will cover this case and leave jicofo as it is.


#8

Hi, thanks for your help. Your description of the scenario is spot on: two-way call (no p2p enabled). I was able to fix the issue by changing the value of org.jitsi.jigasi.LEAVE_TIMEOUT.

I am also facing a separate issue in this situation:

  1. Web client joins empty room and dials phone number
  2. Jigasi initiates call and the phone client starts ringing
  3. Web client presses hang up button and leaves room before phone client picks up
  4. Phone continues to ring for around 90 seconds, and then stops

Do you have any idea what could be happening in this case?


Dial-out phone continues to ring, after non-focus member hangs up
#9

Hum, this can be again in jigasi … Need to test it. Maybe the code handling leaveing of participant does not stop a call that haven’t been established…