mirror of https://github.com/asterisk/asterisk
Added a new PJSIP global setting called norefersub. Default is true to keep support working as before. res_pjsip_refer: Configures PJSIP norefersub capability accordingly. Checks the PJSIP global setting value. If it is true (default) it adds the norefersub capability to PJSIP. If it is false (disabled) it does not add the norefersub capability to PJSIP. This is useful for Cisco switches that do not follow RFC4488. ASTERISK-28375 #close Reported-by: Dan Cropp Change-Id: I0b1c28ebc905d881f4a16e752715487a688b30e9pull/13/head
parent
1ab20c5d91
commit
cffa2a74cb
@ -0,0 +1,39 @@
|
||||
"""pjsip add norefersub
|
||||
|
||||
Revision ID: 3a094a18e75b
|
||||
Revises: 80473bad3c16
|
||||
Create Date: 2019-04-17 09:25:42.040269
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '3a094a18e75b'
|
||||
down_revision = '80473bad3c16'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects.postgresql import ENUM
|
||||
|
||||
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=True)
|
||||
|
||||
op.add_column('ps_globals', sa.Column('norefersub', ast_bool_values))
|
||||
|
||||
|
||||
def downgrade():
|
||||
if op.get_context().bind.dialect.name == 'mssql':
|
||||
op.drop_constraint('ck_ps_globals_norefersub_ast_bool_values', 'ps_globals')
|
||||
op.drop_column('ps_globals', 'norefersub')
|
@ -0,0 +1,13 @@
|
||||
res_pjsip: Added a norefersub configuration setting
|
||||
|
||||
Added a new PJSIP global setting called norefersub.
|
||||
Default is true to keep support working as before.
|
||||
|
||||
res_pjsip_refer: Configures PJSIP norefersub capability accordingly.
|
||||
|
||||
Checks the PJSIP global setting value.
|
||||
If it is true (default) it adds the norefersub capability to PJSIP.
|
||||
If it is false (disabled) it does not add the norefersub capability
|
||||
to PJSIP.
|
||||
|
||||
This is useful for Cisco switches that do not follow RFC4488.
|
Loading…
Reference in new issue