res_pjsip_endpoint_identifier_ip: Add endpoint identifier transport address.

Add a new identify_by option to res_pjsip_endpoint_identifier_ip
called 'transport' this matches endpoints based on the bound
ip address (local) instead of the 'ip' option, which matches on
the source ip address (remote).

UserNote: set identify_by=transport for the pjsip endpoint. Then
use the existing 'match' option and the new 'transport' option of
the identify.

Fixes: #672
(cherry picked from commit c8769f3d5a)
This commit is contained in:
Sperl Viktor
2024-03-28 16:22:24 +01:00
committed by Asterisk Development Team
parent ba552f876f
commit c1d0ea6c38
6 changed files with 176 additions and 15 deletions

View File

@@ -0,0 +1,20 @@
"""add transport attribute to identify
Revision ID: d5122576cca8
Revises: cf150a175fd3
Create Date: 2024-03-28 14:29:43.372496
"""
# revision identifiers, used by Alembic.
revision = 'd5122576cca8'
down_revision = 'cf150a175fd3'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('ps_endpoint_id_ips', sa.Column('transport', sa.String(128)))
def downgrade():
op.drop_column('ps_endpoint_id_ips', 'transport')