summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-12-24 13:20:00 +0000
committerMatthew Jordan <mjordan@digium.com>2014-12-24 13:20:00 +0000
commit006ffdcfb252c358f2831ef239cebe71a084467f (patch)
treebea6920ba080fd58e622b2490af28f7303c2726c /include
parentd1c532034b6f281dfb2cda8a3294da0d725001e6 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_pjsip.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index 2617e9550..95dec46ad 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -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;
};
/*!
@@ -1487,6 +1489,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.