res_pjsip_endpoint_identifier_ip: Endpoint identifier request URI

Add ability to match against PJSIP request URI.

UserNote: this new feature let users match endpoints based on the
indound SIP requests' URI. To do so, add 'request_uri' to the
endpoint's 'identify_by' option. The 'match_request_uri' option of
the identify can be an exact match for the entire request uri, or a
regular expression (between slashes). It's quite similar to the
header identifer.

Fixes: #599
This commit is contained in:
Sperl Viktor
2024-03-28 14:20:26 +01:00
parent 4e244528b3
commit 136bd5c892
6 changed files with 152 additions and 12 deletions

View File

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