mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
res_pjsip: Add 'user_eq_phone' option to add a 'user=phone' parameter when applicable.
Note that this is a backport of r425804 from trunk. 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/ ASTERISK-24643 #close git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -609,6 +609,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;
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -1486,6 +1488,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