mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -426,6 +426,9 @@ static const char *sip_endpoint_identifier_type2str(enum ast_sip_endpoint_identi
|
||||
case AST_SIP_ENDPOINT_IDENTIFY_BY_REQUEST_URI:
|
||||
str = "request_uri";
|
||||
break;
|
||||
case AST_SIP_ENDPOINT_IDENTIFY_BY_TRANSPORT:
|
||||
str = "transport";
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
@@ -453,6 +456,8 @@ static int sip_endpoint_identifier_str2type(const char *str)
|
||||
method = AST_SIP_ENDPOINT_IDENTIFY_BY_HEADER;
|
||||
} else if (!strcasecmp(str, "request_uri")) {
|
||||
method = AST_SIP_ENDPOINT_IDENTIFY_BY_REQUEST_URI;
|
||||
} else if (!strcasecmp(str, "transport")) {
|
||||
method = AST_SIP_ENDPOINT_IDENTIFY_BY_TRANSPORT;
|
||||
} else {
|
||||
method = -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user