4 * Created on: Jan 25, 2013
8 #ifndef RES_PJSIP_PRIVATE_H_
9 #define RES_PJSIP_PRIVATE_H_
11 #include "asterisk/module.h"
12 #include "asterisk/stasis_channels.h"
13 #include "asterisk/stasis_endpoints.h"
16 struct ast_threadpool_options;
19 * \brief Initialize the configuration for res_pjsip
21 int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_module_info);
24 * \brief Annihilate the configuration objects
26 void ast_res_pjsip_destroy_configuration(void);
29 * \brief Reload the configuration
31 int ast_res_pjsip_reload_configuration(void);
34 * \brief Initialize OPTIONS request handling.
36 * XXX This currently includes qualifying peers. It shouldn't.
37 * That should go into a registrar. When that occurs, we won't
38 * need the reload stuff.
40 * \param reload Reload options handling
42 * \retval 0 on success
43 * \retval other on failure
45 int ast_res_pjsip_init_options_handling(int reload);
48 * \brief Initialize transport storage for contacts.
50 * \retval 0 on success
51 * \retval other on failure
53 int ast_res_pjsip_init_contact_transports(void);
56 * \brief Initialize outbound authentication support
59 * \retval non-zero Failure
61 int ast_sip_initialize_outbound_authentication(void);
64 * \brief Initialize system configuration
67 * \retval non-zero Failure
69 int ast_sip_initialize_system(void);
72 * \brief Initialize global configuration
75 * \retval non-zero Failure
77 int ast_sip_initialize_global(void);
80 * \brief Clean up res_pjsip options handling
82 void ast_res_pjsip_cleanup_options_handling(void);
85 * \brief Get threadpool options
87 void sip_get_threadpool_options(struct ast_threadpool_options *threadpool_options);
90 * \brief Function pointer for channel snapshot callbacks.
92 typedef int (*on_channel_snapshot_t)(
93 const struct ast_channel_snapshot *snapshot, int last, void *arg);
96 * \brief For every channel snapshot on an endpoint snapshot call the given
97 * 'on_channel_snapshot' handler.
99 * \param endpoint_snapshot snapshot of an endpoint
100 * \param on_channel_snapshot callback for each channel snapshot
101 * \param arg user data passed to handler
102 * \retval 0 Success, non-zero on failure
104 int ast_sip_for_each_channel_snapshot(const struct ast_endpoint_snapshot *endpoint_snapshot,
105 on_channel_snapshot_t on_channel_snapshot,
108 #endif /* RES_PJSIP_PRIVATE_H_ */