mirror of https://github.com/asterisk/asterisk
added new global config option "allow_sending_180_after_183" that if enabled will preserve 180 after a 183 ASTERISK-29842 Change-Id: I8a53f8c35595b6d16d8e86e241b5f110d92f3d18pull/27/head
parent
eab489b22e
commit
1cdaeb8161
@ -0,0 +1,36 @@
|
||||
"""allow_sending_180_after_183
|
||||
|
||||
Revision ID: 0bee61aa9425
|
||||
Revises: 8f72185e437f
|
||||
Create Date: 2022-04-07 13:51:33.400664
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects.postgresql import ENUM
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0bee61aa9425'
|
||||
down_revision = '8f72185e437f'
|
||||
AST_BOOL_NAME = 'ast_bool_values'
|
||||
# We'll just ignore the n/y and f/t abbreviations as Asterisk does not write
|
||||
# those aliases.
|
||||
AST_BOOL_VALUES = [ '0', '1',
|
||||
'off', 'on',
|
||||
'false', 'true',
|
||||
'no', 'yes' ]
|
||||
|
||||
def upgrade():
|
||||
############################# Enums ##############################
|
||||
|
||||
# ast_bool_values has already been created, so use postgres enum object
|
||||
# type to get around "already created" issue - works okay with mysql
|
||||
ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False)
|
||||
|
||||
op.add_column('ps_globals', sa.Column('allow_sending_180_after_183', ast_bool_values))
|
||||
|
||||
|
||||
def downgrade():
|
||||
if op.get_context().bind.dialect.name == 'mssql':
|
||||
op.drop_constraint('ck_ps_globals_allow_sending_180_after_183_ast_bool_values', 'ps_globals')
|
||||
op.drop_column('ps_globals', 'allow_sending_180_after_183')
|
@ -0,0 +1,8 @@
|
||||
Subject: chan_pjsip
|
||||
|
||||
added global config option "allow_sending_180_after_183"
|
||||
|
||||
Allow Asterisk to send 180 Ringing to an endpoint
|
||||
after 183 Session Progress has been send.
|
||||
If disabled Asterisk will instead send only a
|
||||
183 Session Progress to the endpoint.
|
Loading…
Reference in new issue