Summary:ASTERISK-16567: [regression] X-Lite disconnects because of RTCP timeout (see also #17236 and #17559)
Reporter:Francesco Romano (francesco_r)Labels:
Date Opened:2010-08-14 08:53:04Date Closed:2010-10-12 10:04:02
Versions:Frequency of
Environment:Attachments:( 0) extensions.conf.txt
( 1) eyeBeamLog_100813_154230_0.txt
( 2) eyeBeamLog_100813_154230_1.txt
( 3) full.txt
( 4) rtcp_asterisk_1.4.24.1_ok.txt
( 5) rtcp_asterisk_1.4.27.1_bug.txt
( 6) rtcp_debug_asterisk_1.6.2.11.txt
( 7) sip.conf.txt
Description:I have upgraded from Asterisk 1.4.25 to Asterisk 1.4.35 and now i have disconnection problems with X-Lite softphones making call through a Portech MV-374 SIP/GSM gateway. If a call through a PRI card configured in the same server the call is not disconnected.
This is the same problem of tickets ASTERISK-16006 and ASTERISK-16294 and for me is 100% reproducible. I have tested also Asterisk and i have the same bug.
I have attached two full logs: one  of Asterisk with SIP history enabled and one of X-lite. In these logs extension 201 call the number 3281234567 (i have replaced the real number..) and the call is hangup after 10 seconds (in X-Lite i setup this time in the inactivity RTCP field, default is 30).
Comments:By: Leif Madsen (lmadsen) 2010-08-16 14:39:52

You will also need to provide your dialplan and sip.conf settings in order to make sure it can be reproduced.

By: Francesco Romano (francesco_r) 2010-08-17 04:00:23

I used FreePBX 2.7 but i have uploaded the relevant part of sip.conf and extensions.conf.

By: David Vossel (dvossel) 2010-08-26 15:47:13

I can not reproduce this.

I have used both the latest 1.4 code and the 1.4.35 along with your general sip.conf config in both.  What xlite version are you using?  I used version 3.0 build 56125.

By: David Vossel (dvossel) 2010-08-26 15:48:37

Also, does this issue occur when you set the RTCP timeout to the default 30 seconds on the xlite phone, or do you have to set it to 10?  I tried both.

By: Francesco Romano (francesco_r) 2010-08-26 18:07:55

Whatever value i set, i have the hangup, always.
X-Lite version is on top of file eyeBeamLog: 3.0 build 56125 label 1104o.

By: David Vossel (dvossel) 2010-08-27 14:54:59

I am using the exact same xlite build and I can not reproduce this in either 1.4 or 1.6.2.

As I indicated in issue ASTERISK-16006, I was able to reproduce this behavior in, but no longer exhibited the issue.  I know when this did occur it was very obvious just like you are reporting, but I am not seeing this issue in the latest releases.  I have attached my 'rtcp set debug on' output to this issue which indicates that RTCP is being sent out at the default interval of every 5 seconds.  The only way this should change is if you adjusted that interval in rtp.conf for some reason, and I'm guessing you would not have done that.

Try setting 'rtcp set debug on' and see if the RTCP packets are getting sent out.  If they are not that should give us something to investigate.

By: Francesco Romano (francesco_r) 2010-08-30 11:48:29

I have uploaded two rtcp debug files. One is with asterisk release and works well: after one minute i have manually hangup the call from x-lite. The other is with Asterisk, and after 10 seconds the call was automatically disconnected from x-lite. As you can see this bug is old, i have tested version and is present. I'll do other tests with others releases and i'll let you know in wich version this bug appeared.

By: Francesco Romano (francesco_r) 2010-08-30 12:24:01

I have tested version 1.4.26 and works well, so there is something between 1.4.26 and 1.4.27 that broke the compatibility with x-lite.

By: Ross Beer (rossbeer) 2010-09-02 03:34:57

I too have the same issue, on many of the X-lite phones however I am using Asterisk

It appears to happen more when using NAT'ed clients. Once the option of 'Call Inactivity' is disabled the phone works correctly.

I have a feeling that this relates to NAT issues, where by the RTP is sent to the correct address but the RTCP is not.

By: David Vossel (dvossel) 2010-09-13 10:15:58

rossbeer. Ah, That would make a lot of sense considering I can't reproduce it in my internal test network.  I'll investigate this.

By: David Vossel (dvossel) 2010-09-13 14:58:13

I am able to reproduce this now using the dialplan described in issue ASTERISK-16006.

By: David Vossel (dvossel) 2010-09-13 16:51:58

Okay, I have found the source of the issue for me.  When I put 'constantssrc=yes' in my sip.conf file this completely goes away.  Can someone please verify this resolves the problem for them as well.

If this option is the source of the problem for you all as well, I am going to investigate it further to determine if anything should be done to the default behavior.

By: Francesco Romano (francesco_r) 2010-09-14 04:21:31

Are you sure that this option still exist dvosell? I have tried to set constantssrc=yes but i still have hangup.
I see in the svn that this option was added for asterisk 1.4 in r221086 (http://svnview.digium.com/svn/asterisk?view=revision&revision=221086) but was removed in r252175 (http://svnview.digium.com/svn/asterisk?view=revision&revision=252175).

By: David Vossel (dvossel) 2010-09-27 11:14:34

Okay, so that patch was only somewhat reverted.  We still update the RTCP SSRC on some internal source update events, and the changing of the SSRC appears to be what is triggering the xlite to timeout.  I'm not sure this is an Asterisk issue at this point.  It may be that the xlite client is not properly reading RTCP.  I'm investigating this further.

By: Amilcar S Silvestre (amilcar) 2010-10-05 23:10:23

We have this bug on many sites too. Intersting that some sites (same xlite version, same asterisk version) doesn't have the problem, but others do. I still can't find the differences.

Only happens on new tags on 1.4. ( sure doesn't have the problem at all).

By: David Vossel (dvossel) 2010-10-06 09:33:17

The new version of xlite, v4 i believe, does not have this problem.  I'm beginning to think this is a bug with xlite rather than Asterisk.  Just because Asterisk's SSRC id changes, that does not mean RTCP should timeout when Asterisk continues to send RTCP with a new SSRC id.

By: David Vossel (dvossel) 2010-10-12 10:04:01

I'm closing this.  I can see we are sending the X-Lite client RTCP when it times out.  For some reason the client is treating the change in the SSRC id as a stoppage of RTCP entirely.  Newer and older versions of the X-lite client do not have this problem, and there is a work around for issue by disabling the RTCP timeout option in the advanced menus of the X-Lite client.