summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRichard Begg <asterisk@meric.id.au>2017-03-15 08:45:06 +1100
committerJoshua Colp <jcolp@digium.com>2017-03-22 05:25:29 -0600
commitd7f50afb7c57d001f95a796dd483a1138e3f3f7a (patch)
treef7928953c01e3dd8a1840f7942d8035a7961b8ac /contrib
parentd36a260fcf1cfdb8206dcca6f6c7207edc05f5f8 (diff)
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
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ast-db-manage/config/versions/8fce4c573e15_add_pjsip_allow_overlap.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/ast-db-manage/config/versions/8fce4c573e15_add_pjsip_allow_overlap.py b/contrib/ast-db-manage/config/versions/8fce4c573e15_add_pjsip_allow_overlap.py
new file mode 100644
index 000000000..24057ecc8
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/8fce4c573e15_add_pjsip_allow_overlap.py
@@ -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')