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
This commit is contained in:
Sperl Viktor
2024-03-28 16:22:24 +01:00
parent af6002564b
commit 7c3e2cfda9
6 changed files with 176 additions and 15 deletions

View File

@@ -617,6 +617,8 @@ enum ast_sip_endpoint_identifier_type {
AST_SIP_ENDPOINT_IDENTIFY_BY_HEADER = (1 << 3),
/*! Identify based on request uri */
AST_SIP_ENDPOINT_IDENTIFY_BY_REQUEST_URI = (1 << 4),
/*! Identify based on bound (local) IP address */
AST_SIP_ENDPOINT_IDENTIFY_BY_TRANSPORT = (1 << 5),
};
AST_VECTOR(ast_sip_identify_by_vector, enum ast_sip_endpoint_identifier_type);