Hi Luis,

I really appreciate your reply.

My issue is the one you have also observed yourself - incorrect notify version for dbmode <> 3 - and tried to fix recently with this commit:

https://github.com/kamailio/kamailio/commit/6dd065629604a32081d5e7b63bbbd292f56aaf23

and subsequently with these commits:

https://github.com/kamailio/kamailio/commit/412f155ede8587c1d439503cd7d0e783bc3c0d6b
https://github.com/kamailio/kamailio/commit/b6b7de8832e4ab22ef2c00ebb2c1e1b6ced9ff35
https://github.com/kamailio/kamailio/commit/adcad3445b33d917ef13e4419310b5b11d472fe1


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.

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 publ_notify() and query_db_notify() functions?

Does this make sense? Please correct me if I am wrong.

Thanks again,

Charles


On 14 January 2016 at 21:28, Luis Azedo <luis@2600hz.com> wrote:
the commit was introduced because of dbmode = 3
> pres_timer_send_notify
> process_dialogs
> notifier_notify
> notify
> send_notify_request

and then gets the body and processes the aux_body_processing

notify_body = get_p_notify_body(subs->pres_uri,
subs->event, NULL, (subs->contact.s)?&subs->contact:NULL);
if(notify_body == NULL || notify_body->s== NULL)
{
LM_DBG("Could not get the notify_body\n");
}
else
{
/* call aux_body_processing if exists */
if(subs->event->aux_body_processing)
{
aux_body = subs->event->aux_body_processing(subs, notify_body);


but you haven't detailed your issue, so i'm not sure how to help you.

Best


From: sr-dev [sr-dev-bounces@lists.sip-router.org] on behalf of Charles Chance [charles.chance@sipcentric.com]
Sent: Thursday, January 14, 2016 7:35 AM
To: sr-dev
Subject: [sr-dev] Presence notify - duplicate aux body processing?

Hi All,

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.

In send_notify_request() function (/modules/presence/notify.c), the aux body processing function attached to the event is called:

/* call aux_body_processing if exists */
if(subs->event->aux_body_processing)
{
aux_body = subs->event->aux_body_processing(subs, notify_body);
if(aux_body) {
free_notify_body(notify_body, subs->event);
notify_body = aux_body;
}
}


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).

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.

Is anyone able to explain what I'm missing?

Cheers,

Charles


** We're rebranding! Learn more here **

www.sipcentric.com

Follow us on twitter @sipcentric

Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.

_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev




--
Charles Chance
Managing Director


t. 0121 285 4400    m. 07932 063 891

** We're rebranding! Learn more here **

www.sipcentric.com

Follow us on twitter @sipcentric

Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.