mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
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
This commit is contained in:
@@ -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')
|
Reference in New Issue
Block a user