summaryrefslogtreecommitdiff
path: root/contrib/ast-db-manage
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2015-03-24 19:26:11 +0000
committerRichard Mudgett <rmudgett@digium.com>2015-03-24 19:26:11 +0000
commitb1e9552b087c68d412d6233034a1ad6e4eda02bd (patch)
treeab61915028cc122d160f4b6e6161104c0b8017d7 /contrib/ast-db-manage
parenta3fe43fbdc89aa51e266360dc93ed4a4445bebdb (diff)
chan_pjsip: Add "rpid_immediate" option to prevent unnecessary "180 Ringing" messages.
Incoming PJSIP call legs that have not been answered yet send unnecessary "180 Ringing" or "183 Progress" messages every time a connected line update happens. If the outgoing channel is also PJSIP then the incoming channel will always send a "180 Ringing" or "183 Progress" message when the outgoing channel sends the INVITE. Consequences of these unnecessary messages: * The caller can start hearing ringback before the far end even gets the call. * Many phones tend to grab the first connected line information and refuse to update the display if it changes. The first information is not likely to be correct if the call goes to an endpoint not under the control of the first Asterisk box. When connected line first went into Asterisk in v1.8, chan_sip received an undocumented option "rpid_immediate" that defaults to disabled. When enabled, the option immediately passes connected line update information to the caller in "180 Ringing" or "183 Progress" messages as described above. * Added "rpid_immediate" option to prevent unnecessary "180 Ringing" or "183 Progress" messages. The default is "no" to disable sending the unnecessary messages. ASTERISK-24781 #close Reported by: Richard Mudgett Review: https://reviewboard.asterisk.org/r/4473/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'contrib/ast-db-manage')
-rwxr-xr-xcontrib/ast-db-manage/config/versions/23530d604b96_add_rpid_immediate.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/ast-db-manage/config/versions/23530d604b96_add_rpid_immediate.py b/contrib/ast-db-manage/config/versions/23530d604b96_add_rpid_immediate.py
new file mode 100755
index 000000000..dc0c01c24
--- /dev/null
+++ b/contrib/ast-db-manage/config/versions/23530d604b96_add_rpid_immediate.py
@@ -0,0 +1,48 @@
+#
+# Asterisk -- An open source telephony toolkit.
+#
+# Copyright (C) 2015, Richard Mudgett
+#
+# Richard Mudgett <rmudgett@digium.com>
+#
+# See http://www.asterisk.org for more information about
+# the Asterisk project. Please do not directly contact
+# any of the maintainers of this project for assistance;
+# the project provides a web site, mailing lists and IRC
+# channels for your use.
+#
+# This program is free software, distributed under the terms of
+# the GNU General Public License Version 2. See the LICENSE file
+# at the top of the source tree.
+#
+
+"""add rpid_immediate
+
+Revision ID: 23530d604b96
+Revises: 45e3f47c6c44
+Create Date: 2015-03-18 17:41:58.055412
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '23530d604b96'
+down_revision = '45e3f47c6c44'
+
+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('rpid_immediate', yesno_values))
+
+def downgrade():
+ op.drop_column('ps_endpoints', 'rpid_immediate')