summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-09-04 14:40:38 -0500
committerMark Michelson <mmichelson@digium.com>2015-09-04 14:40:38 -0500
commitac62928d6b7333a0d502be2eba99c238549ae1a3 (patch)
tree9dcb25b31454095a9b3021b9bc98909e2452e54a /include/asterisk
parent2733638d0dd4ab7dd44a8688aa8ef12d72a9c1b2 (diff)
res_pjsip: Change default from user value.
When Asterisk sends an outbound SIP request, if there is no direct reason to place a specific value for the username in the From header, Asterisk would generate a UUID. For example, this would happen when sending outbound OPTIONS requests when qualifying or when sending outbound INVITE requests when originating (if no explicit caller ID were provided). The issue is that some SIP providers reject these sorts of requests with a "Name too long" error response. This patch aims to fix this by changing the default outbound username in From headers to "asterisk". This value can be overridden by changing the default_from_user option in the global options if desired. ASTERISK-25377 #close Reported by Mark Michelson Change-Id: I6a4d34a56ff73ff4f661b0075aeba5461b7f3190
Diffstat (limited to 'include/asterisk')
-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 d1bf38871..4f3fadcd8 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -2039,6 +2039,17 @@ char *ast_sip_get_debug(void);
*/
char *ast_sip_get_endpoint_identifier_order(void);
+/*!
+ * \brief Retrieve the global default from user.
+ *
+ * This is the value placed in outbound requests' From header if there
+ * is no better option (such as an endpoint-configured from_user or
+ * caller ID number).
+ *
+ * \retval The global default_from_user value.
+ */
+const char *ast_sip_get_default_from_user(void);
+
/*! \brief Determines whether the res_pjsip module is loaded */
#define CHECK_PJSIP_MODULE_LOADED() \
do { \