res_pjsip_pubsub: Prune subs with reliable transports at startup
authorGeorge Joseph <gjoseph@digium.com>
Sun, 28 Jan 2018 16:10:00 +0000 (09:10 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 30 Jan 2018 15:29:51 +0000 (09:29 -0600)
commit2b9aa6b5bbe8d3ada6e4a9b0bc614f2f77470cd0
treea9dff42e45491c719a4a08fc402472b9a82885cc
parent81db0aca0fb8d288a780ca664817ef231a9a4ac0
res_pjsip_pubsub: Prune subs with reliable transports at startup

In an earlier release, inbound registrations on a reliable transport
were pruned on Asterisk restart since the TCP connection would have
been torn down and become unusable when Asterisk stopped.  This same
process is now also applied to inbound subscriptions.

Also fixed issues in res_pjsip_registrar where it wasn't handling the
monitoring correctly when multiple registrations came in over the same
transport.

To accomplish this, the pjsip_transport_event feature needed to
be refactored to allow multiple monitors (multiple subcriptions or
registrations from the same endpoint) to exist on the same transport.
Since this changed the API, any external modules that may have used the
transport monitor feature (highly unlikey) will need to be changed.

ASTERISK-27612
Reported by: Ross Beer

Change-Id: Iee87cf4eb9b7b2b93d5739a72af52d6ca8fbbe36
CHANGES
contrib/ast-db-manage/config/versions/d3e4284f8707_add_prune_on_boot_to_ps_subscription_.py [new file with mode: 0644]
include/asterisk/res_pjsip.h
res/res_pjsip.c
res/res_pjsip/include/res_pjsip_private.h
res/res_pjsip/pjsip_transport_events.c
res/res_pjsip_outbound_registration.c
res/res_pjsip_pubsub.c
res/res_pjsip_registrar.c