Asterisk - The Open Source Telephony Project GIT-master-f36a736
Functions | Variables
9f3692b1654b_add_stir_shaken_profile_and_codec_ Namespace Reference

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = '7197536bb68d'
 
string PJSIP_INCOMING_CALL_OFFER_PREF_NAME = 'pjsip_incoming_call_offer_pref_values'
 
list PJSIP_INCOMING_CALL_OFFER_PREF_VALUES
 
string PJSIP_OUTGOING_CALL_OFFER_PREF_NAME = 'pjsip_outgoing_call_offer_pref_values'
 
list PJSIP_OUTGOING_CALL_OFFER_PREF_VALUES
 
string revision = '9f3692b1654b'
 

Function Documentation

◆ downgrade()

def downgrade ( )

Definition at line 43 of file 9f3692b1654b_add_stir_shaken_profile_and_codec_.py.

43def downgrade():
44 context = op.get_context()
45
46 if context.bind.dialect.name == 'mssql':
47 op.drop_constraint('ck_ps_endpoints_incoming_call_offer_pref_pjsip_incoming_call_offer_pref_values', 'ps_endpoints')
48 op.drop_constraint('ck_ps_endpoints_outgoing_call_offer_pref_pjsip_outgoing_call_offer_pref_values', 'ps_endpoints')
49
50 op.drop_column('ps_endpoints', 'outgoing_call_offer_pref')
51 op.drop_column('ps_endpoints', 'incoming_call_offer_pref')
52 op.drop_column('ps_endpoints', 'stir_shaken_profile')
53
54 enums = [PJSIP_INCOMING_CALL_OFFER_PREF_NAME, PJSIP_OUTGOING_CALL_OFFER_PREF_NAME]
55
56 if context.bind.dialect.name == 'postgresql':
57 for e in enums:
58 ENUM(name=e).drop(op.get_bind(), checkfirst=False)

◆ upgrade()

def upgrade ( )

Definition at line 25 of file 9f3692b1654b_add_stir_shaken_profile_and_codec_.py.

25def upgrade():
26 context = op.get_context()
27
28 if context.bind.dialect.name == 'postgresql':
29 enum_in = ENUM(*PJSIP_INCOMING_CALL_OFFER_PREF_VALUES, name=PJSIP_INCOMING_CALL_OFFER_PREF_NAME)
30 enum_out = ENUM(*PJSIP_OUTGOING_CALL_OFFER_PREF_VALUES, name=PJSIP_OUTGOING_CALL_OFFER_PREF_NAME)
31
32 enum_in.create(op.get_bind(), checkfirst=False)
33 enum_out.create(op.get_bind(), checkfirst=False)
34
35 op.add_column('ps_endpoints', sa.Column('incoming_call_offer_pref',
36 sa.Enum(*PJSIP_INCOMING_CALL_OFFER_PREF_VALUES, name=PJSIP_INCOMING_CALL_OFFER_PREF_NAME)))
37
38 op.add_column('ps_endpoints', sa.Column('outgoing_call_offer_pref',
39 sa.Enum(*PJSIP_OUTGOING_CALL_OFFER_PREF_VALUES, name=PJSIP_OUTGOING_CALL_OFFER_PREF_NAME)))
40
41 op.add_column('ps_endpoints', sa.Column('stir_shaken_profile', sa.String(80)))
42

Variable Documentation

◆ down_revision

string down_revision = '7197536bb68d'

◆ PJSIP_INCOMING_CALL_OFFER_PREF_NAME

string PJSIP_INCOMING_CALL_OFFER_PREF_NAME = 'pjsip_incoming_call_offer_pref_values'

◆ PJSIP_INCOMING_CALL_OFFER_PREF_VALUES

list PJSIP_INCOMING_CALL_OFFER_PREF_VALUES
Initial value:
1= ['local', 'local_first',
2 'remote', 'remote_first']

Definition at line 18 of file 9f3692b1654b_add_stir_shaken_profile_and_codec_.py.

◆ PJSIP_OUTGOING_CALL_OFFER_PREF_NAME

string PJSIP_OUTGOING_CALL_OFFER_PREF_NAME = 'pjsip_outgoing_call_offer_pref_values'

◆ PJSIP_OUTGOING_CALL_OFFER_PREF_VALUES

list PJSIP_OUTGOING_CALL_OFFER_PREF_VALUES
Initial value:
1= ['local', 'local_merge', 'local_first',
2 'remote', 'remote_merge', 'remote_first']

Definition at line 22 of file 9f3692b1654b_add_stir_shaken_profile_and_codec_.py.

◆ revision

string revision = '9f3692b1654b'