]> 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 Colp <jcolp@sangoma.com>
Wed, 8 Jan 2020 15:48:10 +0000 (09:48 -0600)
commite17ba921f3b3c2b677b5229fdf0ba78a22251506
tree2588dbbac6894560e32192d57f37f6ef1139f7c2
parent9bbb03f7761a9f62e9bfb0283212fbdcd9d032f1
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