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/compat.h"
15 struct ast_threadpool_options;
18 * \brief Initialize the configuration for res_pjsip
20 int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_module_info);
23 * \brief Annihilate the configuration objects
25 void ast_res_pjsip_destroy_configuration(void);
28 * \brief Reload the configuration
30 int ast_res_pjsip_reload_configuration(void);
33 * \brief Initialize OPTIONS request handling.
35 * XXX This currently includes qualifying peers. It shouldn't.
36 * That should go into a registrar. When that occurs, we won't
37 * need the reload stuff.
39 * \param reload Reload options handling
41 * \retval 0 on success
42 * \retval other on failure
44 int ast_res_pjsip_init_options_handling(int reload);
47 * \brief Initialize transport storage for contacts.
49 * \retval 0 on success
50 * \retval other on failure
52 int ast_res_pjsip_init_contact_transports(void);
55 * \brief Initialize outbound authentication support
58 * \retval non-zero Failure
60 int internal_sip_initialize_outbound_authentication(void);
63 * \brief Destroy outbound authentication support
66 * \retval non-zero Failure
68 void internal_sip_destroy_outbound_authentication(void);
71 * \brief Initialize system configuration
74 * \retval non-zero Failure
76 int ast_sip_initialize_system(void);
79 * \brief Destroy system configuration
81 void ast_sip_destroy_system(void);
84 * \brief Initialize nameserver configuration
86 void ast_sip_initialize_dns(void);
89 * \brief Initialize global configuration
92 * \retval non-zero Failure
94 int ast_sip_initialize_global(void);
97 * \brief Clean up res_pjsip options handling
99 void ast_res_pjsip_cleanup_options_handling(void);
102 * \brief Get threadpool options
104 void sip_get_threadpool_options(struct ast_threadpool_options *threadpool_options);
107 * \brief Retrieve the name of the default outbound endpoint.
109 * \note This returns a memory allocated copy of the name that
110 * needs to be freed by the caller.
112 * \retval The name of the default outbound endpoint.
113 * \retval NULL if configuration not found.
115 char *ast_sip_global_default_outbound_endpoint(void);
118 * \brief Functions for initializing and destroying the CLI.
120 int ast_sip_initialize_cli(void);
121 void ast_sip_destroy_cli(void);
124 * \internal \brief Used by res_pjsip.so to register a service without adding a self reference
126 int internal_sip_register_service(pjsip_module *module);
129 * \internal \brief Used by res_pjsip.so to unregister a service without removing a self reference
131 int internal_sip_unregister_service(pjsip_module *module);
134 * \internal \brief Used by res_pjsip.so to register an endpoint formatter without adding a self reference
136 void internal_sip_register_endpoint_formatter(struct ast_sip_endpoint_formatter *obj);
139 * \internal \brief Used by res_pjsip.so to unregister a endpoint formatter without removing a self reference
141 int internal_sip_unregister_endpoint_formatter(struct ast_sip_endpoint_formatter *obj);
143 #endif /* RES_PJSIP_PRIVATE_H_ */