[asterisk-bugs] [JIRA] (ASTERISK-29904) RLS: Batched Notifications stop working

Asterisk Team (JIRA) noreply at issues.asterisk.org
Wed Sep 14 10:22:11 CDT 2022


     [ https://issues.asterisk.org/jira/browse/ASTERISK-29904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-29904:
-------------------------------------

    Target Release Version/s: 20.0.0

> RLS: Batched Notifications stop working
> ---------------------------------------
>
>                 Key: ASTERISK-29904
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29904
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip_pubsub
>    Affects Versions: 16.23.0, 18.9.0, 19.1.0
>            Reporter: Alexei Gradinari
>            Assignee: Alexei Gradinari
>      Target Release: 16.25.0, 18.11.0, 19.3.0, 20.0.0
>
>
> If Subscription refresh occurred between when the batched notification was scheduled and the serialized notification was to be sent, then new schedule notification task would never be added.
> There are 2 threads:
> thread #1. ast_sip_subscription_notify is called,
> if notification_batch_interval then call schedule_notification.
> 1.1. The schedule_notification checks notify_sched_id > -1
> not true, then 
> send_scheduled_notify = 1
> notify_sched_id = ast_sched_add(sched, sub_tree->notification_batch_interval, sched_cb....
> 1.2. The sched_cb pushes task serialized_send_notify to serializer
> and returns 0 which means no reschedule.
> 1.3. The serialized_send_notify checks send_scheduled_notify if it's false
> the just returns. BUT notify_sched_id is still set, so no more ast_sched_add.
> thread #2. pubsub_on_rx_refresh is called
> 2.1 it pushes serialized_pubsub_on_refresh_timeout to serializer
> 2.2. The serialized_pubsub_on_refresh_timeout calls pubsub_on_refresh_timeout which calls send_notify
> 2.3. The send_notify set send_scheduled_notify = 0;
> The serialized_send_notify should always unset notify_sched_id.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list