res_pjsip_session: Enable RFC3578 overlap dialing support.

Support for RFC3578 overlap dialling (i.e. 484 Response to partially matched
destinations) as currently provided by chan_sip is missing from res_pjsip.
This patch adds a new endpoint attribute (allow_overlap) [defaults to yes]
which when set to yes enables 484 responses to partial destination
matches rather than the current 404.

ASTERISK-26864

Change-Id: Iea444da3ee7c7d4f1fde1d01d138a3d7b0fe40f6
This commit is contained in:
Richard Begg
2017-03-15 08:45:06 +11:00
committed by Joshua Colp
parent f5603cb1ec
commit 6b7697ed48
7 changed files with 65 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
"""add pjsip allow_overlap
Revision ID: 8fce4c573e15
Revises: f638dbe2eb23
Create Date: 2017-03-21 15:14:27.612945
"""
# revision identifiers, used by Alembic.
revision = '8fce4c573e15'
down_revision = 'f638dbe2eb23'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import ENUM
YESNO_NAME = 'yesno_values'
YESNO_VALUES = ['yes', 'no']
def upgrade():
############################# Enums ##############################
# yesno_values have already been created, so use postgres enum object
# type to get around "already created" issue - works okay with mysql
yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
op.add_column('ps_endpoints', sa.Column('allow_overlap', yesno_values))
def downgrade():
op.drop_column('ps_endpoints', 'allow_overlap')