summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/autoconfig.h.in3
-rw-r--r--include/asterisk/compiler.h6
-rw-r--r--include/asterisk/pbx.h23
-rw-r--r--include/asterisk/res_fax.h4
-rw-r--r--include/asterisk/res_pjsip.h2
-rw-r--r--include/asterisk/res_pjsip_session.h2
-rw-r--r--include/asterisk/utils.h9
7 files changed, 35 insertions, 14 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 51f0f1462..9d2a84c02 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -102,6 +102,9 @@
/* Define to 1 if your GCC C compiler supports the 'may_alias' attribute. */
#undef HAVE_ATTRIBUTE_may_alias
+/* Define to 1 if your GCC C compiler supports the 'noreturn' attribute. */
+#undef HAVE_ATTRIBUTE_noreturn
+
/* Define to 1 if your GCC C compiler supports the 'pure' attribute. */
#undef HAVE_ATTRIBUTE_pure
diff --git a/include/asterisk/compiler.h b/include/asterisk/compiler.h
index 77b5de40e..6ceaa5f77 100644
--- a/include/asterisk/compiler.h
+++ b/include/asterisk/compiler.h
@@ -77,6 +77,12 @@
#define attribute_may_alias
#endif
+#ifdef HAVE_ATTRIBUTE_noreturn
+#define attribute_noreturn __attribute__((noreturn))
+#else
+#define attribute_noreturn
+#endif
+
/* Some older version of GNU gcc (3.3.5 on OpenBSD 4.3 for example) dont like 'NULL' as sentinel */
#define SENTINEL ((char *)NULL)
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 378bb556d..d44a245e3 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -1228,10 +1228,10 @@ const char *ast_get_context_name(struct ast_context *con);
const char *ast_get_extension_name(struct ast_exten *exten);
struct ast_context *ast_get_extension_context(struct ast_exten *exten);
const char *ast_get_include_name(const struct ast_include *include);
-const char *ast_get_ignorepat_name(struct ast_ignorepat *ip);
-const char *ast_get_switch_name(struct ast_sw *sw);
-const char *ast_get_switch_data(struct ast_sw *sw);
-int ast_get_switch_eval(struct ast_sw *sw);
+const char *ast_get_ignorepat_name(const struct ast_ignorepat *ip);
+const char *ast_get_switch_name(const struct ast_sw *sw);
+const char *ast_get_switch_data(const struct ast_sw *sw);
+int ast_get_switch_eval(const struct ast_sw *sw);
/*! @} */
@@ -1250,8 +1250,8 @@ void *ast_get_extension_app_data(struct ast_exten *e);
const char *ast_get_context_registrar(struct ast_context *c);
const char *ast_get_extension_registrar(struct ast_exten *e);
const char *ast_get_include_registrar(const struct ast_include *i);
-const char *ast_get_ignorepat_registrar(struct ast_ignorepat *ip);
-const char *ast_get_switch_registrar(struct ast_sw *sw);
+const char *ast_get_ignorepat_registrar(const struct ast_ignorepat *ip);
+const char *ast_get_switch_registrar(const struct ast_sw *sw);
/*! @} */
/*! @name Walking functions ... */
@@ -1263,15 +1263,20 @@ struct ast_exten *ast_walk_extension_priorities(struct ast_exten *exten,
struct ast_exten *priority);
const struct ast_include *ast_walk_context_includes(const struct ast_context *con,
const struct ast_include *inc);
-struct ast_ignorepat *ast_walk_context_ignorepats(struct ast_context *con,
- struct ast_ignorepat *ip);
-struct ast_sw *ast_walk_context_switches(struct ast_context *con, struct ast_sw *sw);
+const struct ast_ignorepat *ast_walk_context_ignorepats(const struct ast_context *con,
+ const struct ast_ignorepat *ip);
+const struct ast_sw *ast_walk_context_switches(const struct ast_context *con,
+ const struct ast_sw *sw);
/*! @} */
/*! @name Iterator functions ... */
/*! @{ */
int ast_context_includes_count(const struct ast_context *con);
const struct ast_include *ast_context_includes_get(const struct ast_context *con, int idx);
+int ast_context_ignorepats_count(const struct ast_context *con);
+const struct ast_ignorepat *ast_context_ignorepats_get(const struct ast_context *con, int idx);
+int ast_context_switches_count(const struct ast_context *con);
+const struct ast_sw *ast_context_switches_get(const struct ast_context *con, int idx);
/*! @} */
/*!
diff --git a/include/asterisk/res_fax.h b/include/asterisk/res_fax.h
index 2304da734..5119bfa6c 100644
--- a/include/asterisk/res_fax.h
+++ b/include/asterisk/res_fax.h
@@ -179,11 +179,11 @@ struct ast_fax_session_details {
unsigned int t38timeout;
/*! the id of the t.38 gateway framehook for this channel */
int gateway_id;
- /*! the timeout for this gateway in seconds */
+ /*! The timeout for this gateway in ms */
int gateway_timeout;
/*! the id of the faxdetect framehook for this channel */
int faxdetect_id;
- /*! The timeout for this fax detect in seconds */
+ /*! The timeout for this fax detect in ms */
int faxdetect_timeout;
/*! flags used for fax detection */
int faxdetect_flags;
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index 6f5928365..9dd70dbca 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -753,6 +753,8 @@ struct ast_sip_endpoint {
struct ast_acl_list *acl;
/* Restrict what IPs are allowed in the Contact header (for registration) */
struct ast_acl_list *contact_acl;
+ /*! The number of seconds into call to disable fax detection. (0 = disabled) */
+ unsigned int faxdetect_timeout;
};
/*!
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h
index 5ca2c99a5..26dd451a7 100644
--- a/include/asterisk/res_pjsip_session.h
+++ b/include/asterisk/res_pjsip_session.h
@@ -139,7 +139,7 @@ struct ast_sip_session {
struct ast_party_id id;
/*! Requested capabilities */
struct ast_format_cap *req_caps;
- /*! Optional DSP, used only for inband DTMF detection if configured */
+ /*! Optional DSP, used only for inband DTMF/Fax-CNG detection if configured */
struct ast_dsp *dsp;
/*! Whether the termination of the session should be deferred */
unsigned int defer_terminate:1;
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index c7a473732..c311e9cd5 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -843,9 +843,14 @@ struct ast_http_digest {
*/
int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request, int pedantic);
+#ifdef DO_CRASH
+#define DO_CRASH_NORETURN attribute_noreturn
+#else
+#define DO_CRASH_NORETURN
+#endif
#ifdef AST_DEVMODE
-void __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function);
+void DO_CRASH_NORETURN __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function);
#define ast_assert(a) _ast_assert(a, # a, __FILE__, __LINE__, __PRETTY_FUNCTION__)
static void force_inline _ast_assert(int condition, const char *condition_str, const char *file, int line, const char *function)
{
@@ -864,7 +869,7 @@ static void force_inline _ast_assert(int condition, const char *condition_str, c
*
* \return Nothing
*/
-void ast_do_crash(void);
+void DO_CRASH_NORETURN ast_do_crash(void);
#include "asterisk/strings.h"