diff options
author | George Joseph <george.joseph@fairview5.com> | 2016-01-07 10:57:01 -0700 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2016-01-11 18:41:31 -0600 |
commit | a41aab477ac317f9d973db253b4c30cd6a6db5b8 (patch) | |
tree | 7921ac4515db887d05e00dd116cd5b90536d639d /contrib/ast-db-manage/config/versions | |
parent | 188438c53f5c5424cd45c3b904c58508881f0baa (diff) |
pjsip_sdp_rtp: Add option endpoint/bind_rtp_to_media_address
On a system with multiple ip addresses in the same subnet, if a
transport is bound to a specific ip address and endpoint/media_address
is set, the SIP/SDP will have the correct address in all fields but
the rtp stream MAY still originate from one of the other ip addresses,
most probably the "primary" ip address. This happens because
res_pjsip_sdp_rtp/create_rtp always calls ast_instance_new with
the "all" ip address (0.0.0.0 or ::).
The new option causes res_pjsip_sdp_rtp/create_rtp to call
ast_rtp_instance_new with the endpoint's media_address (if specified)
instead of the "all" address. This causes the packets to originate from
the specified address.
ASTERISK-25632
ASTERISK-25637
Reported-by: Olivier Krief
Reported-by: Dan Journo
Change-Id: I3dfaa079e54ba7fb7c4fd1f5f7bd9509bbf8bd88
Diffstat (limited to 'contrib/ast-db-manage/config/versions')
-rw-r--r-- | contrib/ast-db-manage/config/versions/26d7f3bf0fa5_add_bind_rtp_to_media_address_to_pjsip.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/ast-db-manage/config/versions/26d7f3bf0fa5_add_bind_rtp_to_media_address_to_pjsip.py b/contrib/ast-db-manage/config/versions/26d7f3bf0fa5_add_bind_rtp_to_media_address_to_pjsip.py new file mode 100644 index 000000000..e7c11da19 --- /dev/null +++ b/contrib/ast-db-manage/config/versions/26d7f3bf0fa5_add_bind_rtp_to_media_address_to_pjsip.py @@ -0,0 +1,31 @@ +"""add bind_rtp_to_media_address to pjsip + +Revision ID: 26d7f3bf0fa5 +Revises: 2d078ec071b7 +Create Date: 2016-01-07 12:23:42.894400 + +""" + +# revision identifiers, used by Alembic. +revision = '26d7f3bf0fa5' +down_revision = '2d078ec071b7' + +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('bind_rtp_to_media_address', yesno_values)) + + +def downgrade(): + op.drop_column('ps_endpoints', 'bind_rtp_to_media_address') |