<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">i suppose we can review it but we're not seeing the issue anymore.
<div>can you provide some sip traces that you think are wrong ?<br>
<div><br>
</div>
<div>the commits below aren't related with the one you mentioned before.</div>
<div>the problem solved with the commits below is , "in a serie of subscribers being notified only the first gets the correct version number, the others get the version of first".</div>
<div><br>
</div>
<div>Best</div>
<div><br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF441652" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> sr-dev [sr-dev-bounces@lists.sip-router.org] on behalf of Charles Chance [charles.chance@sipcentric.com]<br>
<b>Sent:</b> Thursday, January 14, 2016 2:08 PM<br>
<b>To:</b> Kamailio (SER) - Development Mailing List<br>
<b>Subject:</b> Re: [sr-dev] Presence notify - duplicate aux body processing?<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hi Luis,
<div><br>
</div>
<div>I really appreciate your reply.</div>
<div><br>
</div>
<div>My issue is the one you have also observed yourself - incorrect notify version for dbmode <> 3 - and tried to fix recently with this commit:</div>
<div><br>
</div>
<div><a href="https://github.com/kamailio/kamailio/commit/6dd065629604a32081d5e7b63bbbd292f56aaf23" target="_blank">https://github.com/kamailio/kamailio/commit/6dd065629604a32081d5e7b63bbbd292f56aaf23</a><br>
</div>
<div><br>
</div>
<div>and subsequently with these commits:</div>
<div><br>
</div>
<div><a href="https://github.com/kamailio/kamailio/commit/412f155ede8587c1d439503cd7d0e783bc3c0d6b" target="_blank">https://github.com/kamailio/kamailio/commit/412f155ede8587c1d439503cd7d0e783bc3c0d6b</a><br>
</div>
<div><a href="https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35" target="_blank">https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35</a><br>
</div>
<div><a href="https://github.com/kamailio/kamailio/commit/adcad3445b33d917ef13e4419310b5b11d472fe1" target="_blank">https://github.com/kamailio/kamailio/commit/adcad3445b33d917ef13e4419310b5b11d472fe1</a><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>However, for us at least, the issue remains and I believe it was introduced by the original commit - and if we revert it the problem disappears - so IMO the fix would be to address it at source.</div>
<div><br>
</div>
<div>As it stands, the aux body processing appears still to be duplicated depending on the configuration. So, maybe now the solution is to remove the previous aux body processing in the <span style="font-size:12.8px">publ_notify() and query_db_notify() functions?</span></div>
<div><span style="font-size:12.8px"><br>
</span></div>
<div>Does this make sense? Please correct me if I am wrong.</div>
<div><br>
</div>
<div>Thanks again,</div>
<div><br>
</div>
<div>Charles</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 14 January 2016 at 21:28, Luis Azedo <span dir="ltr">
<<a href="mailto:luis@2600hz.com" target="_blank">luis@2600hz.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">the commit was introduced because of dbmode = 3
<div>> pres_timer_send_notify</div>
<div>> process_dialogs</div>
<div>> notifier_notify</div>
<div>> notify</div>
<div>> send_notify_request</div>
<div><br>
</div>
<div>and then gets the body and processes the aux_body_processing</div>
<div><br>
</div>
<div>
<div><span style="white-space:pre-wrap"></span><b>notify_body = get_p_notify_body(subs->pres_uri,</b></div>
<div><b><span style="white-space:pre-wrap"></span>subs->event, NULL, (subs->contact.s)?&subs->contact:NULL);</b></div>
<div><span style="white-space:pre-wrap"></span>if(notify_body == NULL || notify_body->s== NULL)</div>
<div><span style="white-space:pre-wrap"></span>{</div>
<div><span style="white-space:pre-wrap"></span>LM_DBG("Could not get the notify_body\n");</div>
<div><span style="white-space:pre-wrap"></span>}</div>
<div><span style="white-space:pre-wrap"></span>else</div>
<div><span style="white-space:pre-wrap"></span>{</div>
<span class="">
<div><span style="white-space:pre-wrap"></span><b>/* call aux_body_processing if exists */</b></div>
<div><b><span style="white-space:pre-wrap"></span>if(subs->event->aux_body_processing)</b></div>
<div><b><span style="white-space:pre-wrap"></span>{</b></div>
<div><b><span style="white-space:pre-wrap"></span>aux_body = subs->event->aux_body_processing(subs, notify_body);</b></div>
<div><br>
</div>
<div><br>
</div>
</span>
<div>but you haven't detailed your issue, so i'm not sure how to help you.</div>
<div><br>
</div>
<div>Best</div>
<div><br>
</div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> sr-dev [<a href="mailto:sr-dev-bounces@lists.sip-router.org" target="_blank">sr-dev-bounces@lists.sip-router.org</a>] on behalf of Charles Chance [<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.com</a>]<br>
<b>Sent:</b> Thursday, January 14, 2016 7:35 AM<br>
<b>To:</b> sr-dev<br>
<b>Subject:</b> [sr-dev] Presence notify - duplicate aux body processing?<br>
</font><br>
</div>
<div></div>
<div>
<div>
<div class="h5">
<div dir="ltr">
<p>Hi All,</p>
<p>Whilst attempting to track down the source of an issue introduced at some point since 4.2.1, I came across the following and would appreciate a second opinion.<br>
</p>
<p dir="ltr">In send_notify_request() function (/modules/presence/notify.c), the aux body processing function attached to the event is called:</p>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
</blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
/* call aux_body_processing if exists */<br>
if(subs->event->aux_body_processing)<br>
{<br>
<span style="white-space:pre-wrap"></span>aux_body = subs->event->aux_body_processing(subs, notify_body);<br>
<span style="white-space:pre-wrap"></span>if(aux_body) {<br>
<span style="white-space:pre-wrap"></span>free_notify_body(notify_body, subs->event);<br>
<span style="white-space:pre-wrap"></span>notify_body = aux_body;<br>
<span style="white-space:pre-wrap"></span>}<br>
}</blockquote>
<p dir="ltr"><br>
</p>
<p dir="ltr">However, by the time we reach this function, aux body processing will already have been completed (specifically in the publ_notify() or query_db_notify() functions of the same file).</p>
<p dir="ltr">If I remove the duplicate function call, the issue goes away - but I'm reluctant to submit a pull request which reverts an earlier commit, unless I can understand the reason for the change in the first place. Especially since it was made a year
 ago.</p>
<p>Is anyone able to explain what I'm missing?<br>
</p>
<p dir="ltr">Cheers,<br>
</p>
<p>Charles</p>
</div>
<br>
</div>
</div>
<div><font face="Helvetica, Arial, sans-serif"><font size="2"><b>** We're rebranding! Learn more
<a href="http://www.sipcentric.com/2015/07/were-rebranding/" target="_blank">here</a> **</b></font></font></div>
<div><br>
</div>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
<br>
Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">
@sipcentric</a><br>
<br>
<font color="gray">Sipcentric Ltd. Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font></div>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr"><font face="arial, helvetica, sans-serif"><b><font size="2">Charles Chance</font></b><br>
<font size="2">Managing Director</font></font><br>
<div><font face="arial, helvetica, sans-serif"><font size="2"><br>
</font></font></div>
<div><font face="arial, helvetica, sans-serif"><font size="2">t. 0121 285 4400    m. 07932 063 891</font></font></div>
</div>
</div>
</div>
<br>
<div><font face="Helvetica, Arial, sans-serif"><font size="2"><b>** We're rebranding! Learn more
<a href="http://www.sipcentric.com/2015/07/were-rebranding/" target="_blank">here</a> **</b></font></font></div>
<div><br>
</div>
<font face="Helvetica, Arial, sans-serif"><font size="2"><span style="font-size:10pt"><a href="http://www.sipcentric.com/" title="blocked::http://www.sipcentric.com/" target="_blank">www.sipcentric.com</a><br>
<br>
Follow us on twitter <a href="http://twitter.com/sipcentric" title="blocked::http://twitter.com/sipcentric" target="_blank">
@sipcentric</a><br>
<br>
<font color="gray">Sipcentric Ltd. Company registered in England & Wales no. 7365592.</font> <font color="gray">Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></span></font></font></div>
</div>
</div>
</div>
</div>
</body>
</html>