ACN: res_pjsip endpoint options

This commit adds the endpoint options required to control
Advanced Codec Negotiation.

incoming_offer_codec_prefs
outgoing_offer_codec_prefs
incoming_answer_codec_prefs
outgoing_answer_codec_prefs

The documentation may need tweaking and some additional edits
added, especially for the "answer" prefs.  That'll be handled
when things finalize.

This commit is safe to merge as it doens't alter any existing
functionality nor does it alter the previous codec negotiation
work which may now be obsolete.

Change-Id: I920ba925d7dd36430dfd2ebd9d82d23f123d0e11
This commit is contained in:
George Joseph
2020-07-06 08:56:44 -06:00
parent 81b5e4a73f
commit 2d22e34206
5 changed files with 434 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
"""Add pjsip endpoint ACN options
Revision ID: b80485ff4dd0
Revises: fbb7766f17bc
Create Date: 2020-07-06 08:29:53.974820
"""
# revision identifiers, used by Alembic.
revision = 'b80485ff4dd0'
down_revision = '79290b511e4b'
from alembic import op
import sqlalchemy as sa
max_value_length = 128
def upgrade():
op.add_column('ps_endpoints', sa.Column('incoming_offer_codec_prefs', sa.String(max_value_length)))
op.add_column('ps_endpoints', sa.Column('outgoing_offer_codec_prefs', sa.String(max_value_length)))
op.add_column('ps_endpoints', sa.Column('incoming_answer_codec_prefs', sa.String(max_value_length)))
op.add_column('ps_endpoints', sa.Column('outgoing_answer_codec_prefs', sa.String(max_value_length)))
def downgrade():
op.drop_column('ps_endpoints', 'incoming_offer_codecs_prefs')
op.drop_column('ps_endpoints', 'outgoing_offer_codecs_prefs')
op.drop_column('ps_endpoints', 'incoming_answer_codecs_prefs')
op.drop_column('ps_endpoints', 'outgoing_answer_codecs_prefs')