res_pjsip_t38: bind UDPTL sessions like RTP

In res_pjsip_sdp_rtp, the bind_rtp_to_media_address option and the
fallback use of the transport's bind address solve problems sending
media on systems that cannot send ipv4 packets on ipv6 sockets, and
certain other situations. This change extends both of these behaviors
to UDPTL sessions as well in res_pjsip_t38, to fix fax-specific
problems on these systems, introducing a new option
endpoint/t38_bind_udptl_to_media_address.

ASTERISK-29402

Change-Id: I87220c0e9cdd2fe9d156846cb906debe08c63557
This commit is contained in:
Matthew Kern
2021-07-19 10:34:00 -06:00
parent b40ca38c56
commit 5e9799a42e
7 changed files with 96 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
"""add t38_bind_udptl_to_media_address
Revision ID: a06d8f8462d9
Revises: f56d79a9f337
Create Date: 2021-09-24 10:03:01.320480
"""
# revision identifiers, used by Alembic.
revision = 'a06d8f8462d9'
down_revision = 'f56d79a9f337'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import ENUM
AST_BOOL_NAME = 'ast_bool_values'
AST_BOOL_VALUES = [ '0', '1',
'off', 'on',
'false', 'true',
'no', 'yes' ]
def upgrade():
ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False)
op.add_column('ps_endpoints', sa.Column('t38_bind_udptl_to_media_address', ast_bool_values))
def downgrade():
op.drop_column('ps_endpoints', 't38_bind_udptl_to_media_address')