summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2014-11-03 14:45:01 +0000
committerJoshua Colp <jcolp@digium.com>2014-11-03 14:45:01 +0000
commitac091d41844a9a4a0f7d539164bcd154351b6da7 (patch)
tree84ec4d1350b4e6d1d1498c4ceabd2b5484f3947d /contrib
parent285be15aaf0469055d3392ecd73eb24395e49059 (diff)
chan_pjsip: Add support for passing hold and unhold requests through.
This change adds an option, moh_passthrough, that when enabled will pass hold and unhold requests through using a SIP re-invite. When placing on hold a re-invite with sendonly will be sent and when taking off hold a re-invite with sendrecv will be sent. This allows remote servers to handle the musiconhold instead of the local Asterisk instance being responsible. Review: https://reviewboard.asterisk.org/r/4103/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ast-db-manage/config/versions/339e1dfa644d_add_moh_passthrough_option_to_pjsip.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/ast-db-manage/config/versions/339e1dfa644d_add_moh_passthrough_option_to_pjsip.py b/contrib/ast-db-manage/config/versions/339e1dfa644d_add_moh_passthrough_option_to_pjsip.py
new file mode 100644
index 000000000..d3ee2e518
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/339e1dfa644d_add_moh_passthrough_option_to_pjsip.py
@@ -0,0 +1,30 @@
+"""Add moh_passthrough option to pjsip
+
+Revision ID: 339e1dfa644d
+Revises: 1443687dda65
+Create Date: 2014-10-21 14:55:34.197448
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '339e1dfa644d'
+down_revision = '1443687dda65'
+
+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('moh_passthrough', yesno_values))
+
+def downgrade():
+ op.drop_column('ps_endpoints', 'moh_passthrough')