[Home]

Summary:ASTERISK-16991: [patch] chan_sip continues to call add_peer_mwi_subs which continues to increament MWI NOTIFY's
Reporter:Kevin Scott Adams (nivek)Labels:
Date Opened:2010-11-19 14:57:47.000-0600Date Closed:2010-11-26 12:23:04.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Subscriptions
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast1.8subobj.txt
( 1) issue0018342p1.patch
( 2) KaBDebug-InvalidExt.txt
( 3) kevlab1-dtw.nasa.cpwr.corp-20101122-070352.log
( 4) kevlab1-dtw.nasa.cpwr.corp-20101122-082455.log
( 5) sipdebug.txt
Description:Just calling any phone number increments the subscriptions to that phone.  This is causing random reboots to Polycom (which we use) phones due to the amount of NOTIFY's sent.  This is on realtime database.
Restarting asterisk resets the counters or whatever is does.  And problem goes away until it happens again.

****** STEPS TO REPRODUCE ******

Just turn on debugging and watch the NOTIFY's happen.  Also see debug file.
Comments:By: Kevin Scott Adams (nivek) 2010-11-19 15:09:16.000-0600

Uploaded some screen captures of our "debugging" of the issues we see.  Notice that everycall gets a build_peer then a 'add_peer_mwi_subs' which then increments the calls to the MWI callback function 'mwi_event_cb' to the same phone.
Need a beer to sort this one out.

By: Stefan Schmidt (schmidts) 2010-11-20 03:11:49.000-0600

could you pleae add the output of sip show subscriptions and also sip show objects.

thanks
stefan

By: Kevin Scott Adams (nivek) 2010-11-21 06:37:22.000-0600

Output uploaded as requested.

By: Kevin Scott Adams (nivek) 2010-11-22 06:07:57.000-0600

Uploaded a fresh restart of asterisk with commands requested and a few phone calls.

By: Kevin Scott Adams (nivek) 2010-11-22 07:33:59.000-0600

In working with Marquis we noticed that from 1.6.x to 1.8.0 some code was missing in a 'for' block in function realtime_peer.
Compared to patch submitted by Marquis on issue 16320 that had the same type of symptoms.
Merged the missing code with patch from Marquis and it works perfectly.
Uploaded output with patch applied.

By: Bradley Watkins (marquis) 2010-11-22 08:19:31.000-0600

A slightly-modified (fixed minor coding guidelines issue) version of this patch is now posted as:
https://reviewboard.asterisk.org/r/1029/

By: Kevin Scott Adams (nivek) 2010-11-22 12:01:39.000-0600

In looking at issue 16320 again, it seems that Marquis is apparently a GD prophet.

Quoted by Marquis from issue 16320....
I haven't tested the patch with your new approach, but it looks reasonable to me. The only reservation I have is that the simpler approach treats the *symptom* while my original patch fixes the root cause.

The only reason this might be materially different is if there are other, unknown issues with the way realtime peers are being loaded. I have absolutely ZERO proof (or even idle speculation, based on a cursory glance over the code) that this is the case, and so I'm happy with the new way. chan_sip is a wooly place...




Funny stuff........

By: Digium Subversion (svnbot) 2010-11-26 12:19:04.000-0600

Repository: asterisk
Revision: 296352

U   branches/1.8/channels/chan_sip.c

------------------------------------------------------------------------
r296352 | marquis | 2010-11-26 12:19:03 -0600 (Fri, 26 Nov 2010) | 12 lines

Fix reloading of peer when a user is requested.

Prevent peer reloading from causing multiple MWI subscriptions to be created when using realtime.  This had the effect of sending one NOTIFY for every time a sip peer made a call, in one case eventually overwhelming  the phone and causing it to reboot.

(closes issue ASTERISK-16991)
Reported by: nivek
Patches:
     issue0018342p1.patch uploaded by nivek (license 636)
Tested by: nivek

Review: https://reviewboard.asterisk.org/r/1029/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=296352

By: Digium Subversion (svnbot) 2010-11-26 12:23:04.000-0600

Repository: asterisk
Revision: 296353

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r296353 | marquis | 2010-11-26 12:23:03 -0600 (Fri, 26 Nov 2010) | 19 lines

Merged revisions 296352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r296352 | marquis | 2010-11-26 13:19:02 -0500 (Fri, 26 Nov 2010) | 12 lines
 
 Fix reloading of peer when a user is requested.
 
 Prevent peer reloading from causing multiple MWI subscriptions to be created when using realtime.  This had the effect of sending one NOTIFY for every time a sip peer made a call, in one case eventually overwhelming  the phone and causing it to reboot.
 
 (closes issue ASTERISK-16991)
 Reported by: nivek
 Patches:
       issue0018342p1.patch uploaded by nivek (license 636)
 Tested by: nivek
 
 Review: https://reviewboard.asterisk.org/r/1029/
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=296353