diff options
author | Joshua Colp <jcolp@digium.com> | 2014-06-12 11:34:36 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2014-06-12 11:34:36 +0000 |
commit | 58f4c18ab692ad0c43d9cb4418fc2b680bb17b80 (patch) | |
tree | d718320702c43bf77a048defeab91d1cc9c8e1c8 /contrib | |
parent | 3b0ad74e1741c78afbab229cb38965280744f76d (diff) |
res_pjsip_pubsub: Persist subscriptions in sorcery so they are recreated on startup.
This change makes res_pjsip_pubsub persist inbound subscriptions in sorcery. By default
this uses the local astdb but it can also be configured to store within an outside
database. When Asterisk is started these subscriptions are recreated if they have not
expired. Notifications are sent to the devices which have subscribed and they are none
the wiser that the system has restarted.
Review: https://reviewboard.asterisk.org/r/3598/
........
Merged revisions 415766 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ast-db-manage/config/versions/c6d929b23a8_create_pjsip_subscription_persistence_.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/ast-db-manage/config/versions/c6d929b23a8_create_pjsip_subscription_persistence_.py b/contrib/ast-db-manage/config/versions/c6d929b23a8_create_pjsip_subscription_persistence_.py new file mode 100644 index 000000000..aa5c8c435 --- /dev/null +++ b/contrib/ast-db-manage/config/versions/c6d929b23a8_create_pjsip_subscription_persistence_.py @@ -0,0 +1,36 @@ +"""create pjsip subscription persistence table + +Revision ID: c6d929b23a8 +Revises: e96a0b8071c +Create Date: 2014-06-06 02:17:38.660447 + +""" + +# revision identifiers, used by Alembic. +revision = 'c6d929b23a8' +down_revision = 'e96a0b8071c' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + op.create_table( + 'ps_subscription_persistence', + sa.Column('id', sa.String(40), nullable=False, unique=True), + sa.Column('packet', sa.String(2048)), + sa.Column('src_name', sa.String(128)), + sa.Column('src_port', sa.Integer), + sa.Column('transport_key', sa.String(64)), + sa.Column('local_name', sa.String(128)), + sa.Column('local_port', sa.Integer), + sa.Column('cseq', sa.Integer), + sa.Column('tag', sa.String(128)), + sa.Column('endpoint', sa.String(40)), + sa.Column('expires', sa.Integer), + ) + + op.create_index('ps_subscription_persistence_id', 'ps_subscription_persistence', ['id']) + +def downgrade(): + op.drop_table('ps_subscription_persistence') |