diff options
author | Joshua Colp <jcolp@digium.com> | 2014-10-17 11:30:23 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2014-10-17 11:30:23 +0000 |
commit | 7144c739e97aca9e69b2067238deeedeafbc478f (patch) | |
tree | acc791f5d1428a24ac0c46ad3ce1ded243daa22e /include/asterisk | |
parent | f91cb1207c7e7d6f0f3db6e207fd34ce3c6e5416 (diff) |
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
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/res_pjsip.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h index 302a15d73..e7c01c43b 100644 --- a/include/asterisk/res_pjsip.h +++ b/include/asterisk/res_pjsip.h @@ -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; }; /*! @@ -1484,6 +1486,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. * * \retval Endpoints available to sorcery, NULL if no endpoints found. |