mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
res_pjsip: Allow configuration of endpoint identifier query order
It's possible to have a scenario that will create a conflict between endpoint identifiers. For instance an incoming call could be identified by two different endpoint identifiers and the one chosen depended upon which identifier module loaded first. This of course causes problems when, for example, the incoming call is expected to be identified by username, but instead is identified by ip. This patch adds a new 'global' option to res_pjsip called 'endpoint_identifier_order'. It is a comma separated list of endpoint identifier names that specifies the order by which identifiers are processed and checked. ASTERISK-24840 #close Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/4455/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -697,6 +697,8 @@ struct ast_sip_outbound_authenticator {
|
||||
* \brief An entity responsible for identifying the source of a SIP message
|
||||
*/
|
||||
struct ast_sip_endpoint_identifier {
|
||||
/*! Name of the endpoint identifier */
|
||||
const char *name;
|
||||
/*!
|
||||
* \brief Callback used to identify the source of a message.
|
||||
* See ast_sip_identify_endpoint for more details
|
||||
@@ -1970,6 +1972,15 @@ void ast_sip_unregister_supplement(struct ast_sip_supplement *supplement);
|
||||
*/
|
||||
char *ast_sip_get_debug(void);
|
||||
|
||||
/*!
|
||||
* \brief Retrieve the global endpoint_identifier_order setting.
|
||||
*
|
||||
* Specifies the order by which endpoint identifiers should be regarded.
|
||||
*
|
||||
* \retval the global endpoint_identifier_order value
|
||||
*/
|
||||
char *ast_sip_get_endpoint_identifier_order(void);
|
||||
|
||||
/*! \brief Determines whether the res_pjsip module is loaded */
|
||||
#define CHECK_PJSIP_MODULE_LOADED() \
|
||||
do { \
|
||||
|
Reference in New Issue
Block a user