From aed6c219a3b21d212cea28425e0144eb52a3db70 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Sun, 23 Oct 2016 12:38:59 +0000 Subject: pjsip: Fix a few media bugs with reinvites and asymmetric payloads. When channel format changes occurred as a result of an RTP re-negotiation the bridge was not informed this had happened. As a result the bridge technology was not re-evaluated and the channel may have been in a bridge technology that was incompatible with its formats. The bridge is now unbridged and the technology re-evaluated when this occurs. The chan_pjsip module also allowed asymmetric codecs for sending and receiving. This did not work with all devices and caused one way audio problems. The default has been changed to NOT do this but to match the sending codec to the receiving codec. For users who want asymmetric codecs an option has been added, asymmetric_rtp_codec, which will return chan_pjsip to the previous behavior. The codecs returned by the chan_pjsip module when queried by the bridge_native_rtp module were also not reflective of the actual negotiated codecs. The nativeformats are now returned as they reflect the actual negotiated codecs. ASTERISK-26423 #close Change-Id: I6ec88c6e3912f52c334f1a26983ccb8f267020dc --- .../4468b4a91372_add_pjsip_asymmetric_rtp_codec.py | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 contrib/ast-db-manage/config/versions/4468b4a91372_add_pjsip_asymmetric_rtp_codec.py (limited to 'contrib') diff --git a/contrib/ast-db-manage/config/versions/4468b4a91372_add_pjsip_asymmetric_rtp_codec.py b/contrib/ast-db-manage/config/versions/4468b4a91372_add_pjsip_asymmetric_rtp_codec.py new file mode 100644 index 000000000..c121495e2 --- /dev/null +++ b/contrib/ast-db-manage/config/versions/4468b4a91372_add_pjsip_asymmetric_rtp_codec.py @@ -0,0 +1,31 @@ +"""add pjsip asymmetric rtp codec + +Revision ID: 4468b4a91372 +Revises: a6ef36f1309 +Create Date: 2016-10-25 10:57:20.808815 + +""" + +# revision identifiers, used by Alembic. +revision = '4468b4a91372' +down_revision = 'a6ef36f1309' + +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('asymmetric_rtp_codec', yesno_values)) + + +def downgrade(): + op.drop_column('ps_endpoints', 'asymmetric_rtp_codec') -- cgit v1.2.3