mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 16:50:14 +00:00
res_pjsip: Add 'user_eq_phone' option to add a 'user=phone' parameter when applicable.
This change adds a configuration option which adds a 'user=phone' parameter if the user portion of the request URI or the From URI is determined to be a number. Review: https://reviewboard.asterisk.org/r/4073/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -607,6 +607,8 @@ struct ast_sip_endpoint {
|
||||
enum ast_sip_session_redirect redirect_method;
|
||||
/*! Variables set on channel creation */
|
||||
struct ast_variable *channel_vars;
|
||||
/*! Whether to place a 'user=phone' parameter into the request URI if user is a number */
|
||||
unsigned int usereqphone;
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -1483,6 +1485,15 @@ void ast_copy_pj_str(char *dest, const pj_str_t *src, size_t size);
|
||||
*/
|
||||
struct ast_sip_endpoint *ast_pjsip_rdata_get_endpoint(pjsip_rx_data *rdata);
|
||||
|
||||
/*!
|
||||
* \brief Add 'user=phone' parameter to URI if enabled and user is a phone number.
|
||||
*
|
||||
* \param endpoint The endpoint to use for configuration
|
||||
* \param pool The memory pool to allocate the parameter from
|
||||
* \param uri The URI to check for user and to add parameter to
|
||||
*/
|
||||
void ast_sip_add_usereqphone(const struct ast_sip_endpoint *endpoint, pj_pool_t *pool, pjsip_uri *uri);
|
||||
|
||||
/*!
|
||||
* \brief Retrieve any endpoints available to sorcery.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user