]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_pubsub: Add ability to persist generator state information.
authorJoshua C. Colp <jcolp@sangoma.com>
Mon, 6 Jan 2020 15:02:54 +0000 (15:02 +0000)
committerJoshua C. Colp <jcolp@sangoma.com>
Wed, 8 Jan 2020 15:19:19 +0000 (15:19 +0000)
commit8318b05f2513adf97aa6ff9ebcafafc5737ebc53
tree40ebd4c8f4bbe4e456db74d1e1ecfcc196871900
parentfb7efe34a6549a3ea51216ae4f081a459b00d724
res_pjsip_pubsub: Add ability to persist generator state information.

Some body generators, such as dialog-info+xml, require storing state
information which is then conveyed in the NOTIFY request itself. Up
until now there was no way for such body generators to persist this
information.

Two new API calls have been added to allow body generators to set and
get persisted data. This data is persisted out alongside the normal
persistence information and allows the body generator to restore
state information or to simply use this for normal storage of state.
State is stored in the form of JSON and it is up to the body
generator to interpret this as needed.

The dialog-info+xml body generator has been updated to take advantage
of this to persist the version number.

ASTERISK-27759

Change-Id: I5fda56c624fd13c17b3c48e0319b77079e9e27de
include/asterisk/res_pjsip_pubsub.h
res/res_pjsip_dialog_info_body_generator.c
res/res_pjsip_pubsub.c