mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
res_pjsip_pubsub: provide a display name for RLS subscriptions
Whereas BLFs allow to show a display name for each RLS entry, the asterisk provides only the extension now. This is not end user friendly. This commit adds a new resource_list option, resource_display_name, to indicate whether display name of resource or the resource name being provided for RLS entries. If this option is enabled, the Display Name will be provided. This option is disabled by default to remain the previous behavior. If the 'event' set to 'presence' or 'dialog' the non-empty HINT name will be set as the Display Name. The 'message-summary' is not supported yet. ASTERISK-29891 #close Change-Id: Ic5306bd5a7c73d03f5477fe235e9b0f41c69c681
This commit is contained in:
committed by
Kevin Harwell
parent
b1765c93e4
commit
c12cb899de
@@ -0,0 +1,29 @@
|
||||
"""res_pjsip_pubsub add resource_list option resource_display_name
|
||||
|
||||
Revision ID: 8f72185e437f
|
||||
Revises: a06d8f8462d9
|
||||
Create Date: 2022-02-01 10:53:55.875438
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '8f72185e437f'
|
||||
down_revision = 'a06d8f8462d9'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects.postgresql import ENUM
|
||||
|
||||
AST_BOOL_NAME = 'ast_bool_values'
|
||||
AST_BOOL_VALUES = [ '0', '1',
|
||||
'off', 'on',
|
||||
'false', 'true',
|
||||
'no', 'yes' ]
|
||||
|
||||
def upgrade():
|
||||
ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False)
|
||||
op.add_column('ps_resource_list', sa.Column('resource_display_name', ast_bool_values))
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('ps_resource_list', 'resource_display_name')
|
||||
|
Reference in New Issue
Block a user