<p>Christian Savinovich <strong>uploaded patch set #5</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11627">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_mwi.c: Fix multiple NOTIFYs when mwi_subscribe_replaces_unsolicited<br><br>Fixes an bug whereby multiple NOTIFYs were replied back to endpoint when a<br>REGISTER was received.  This occurred when parameter<br>mwi_subscribe_replaces_unsolicited is set to yes in pjsip.conf.<br><br>The underlying problem here is that the<br>endpoint_receives_unsolicited_mwi_for_mailbox() function in res/res_pjsip_mwi.c<br>is sort of an overloaded function. When invoked from mwi_validate_for_aor() you<br>DO want to have the subscribe_replaces_unsolicited() logic occur whereby it<br>unsubscribes from stasis. When invoked from<br>create_mwi_subscriptions_for_endpoint you DO NOT want to have the<br>subscribe_replaces_unsolicited logic occur.The function should have a parameter<br>added to it which determines whether the logic is invoked or not.<br><br>The bug itself occurs because there are multiple mwi_subscription structures<br>for the mailbox, the logic which sends the NOTIFY when a REGISTER occurs goes<br>through all looking for mwi_subscription structures with the AOR. It finds<br>these multiple structures, calculates message count on them (despite having<br>no stasis subscriptions), and sends a NOTIFY.<br><br>Note: This fix does not restore back unsolicted NOTIFYs in the event<br>all subscriptions on a given AOR go away.  It was decided to create<br>a new issue for that.<br><br>ASTERISK-28488<br><br>Change-Id: I8f77c33b9b4d374d510aa5ecd4f700a77107d8d4<br>---<br>M res/res_pjsip_mwi.c<br>1 file changed, 19 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/11627/5</pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11627">change 11627</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11627"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I8f77c33b9b4d374d510aa5ecd4f700a77107d8d4 </div>
<div style="display:none"> Gerrit-Change-Number: 11627 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Christian Savinovich <csavinovich@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>