Asterisk - The Open Source Telephony Project GIT-master-f36a736
Data Structures | Functions | Variables
res_aeap.c File Reference
#include "asterisk.h"
#include "asterisk/astobj2.h"
#include "asterisk/module.h"
#include "asterisk/sorcery.h"
#include "asterisk/cli.h"
#include "asterisk/format.h"
#include "asterisk/format_cap.h"
#include "asterisk/res_aeap.h"
#include "res_aeap/general.h"
Include dependency graph for res_aeap.c:

Go to the source code of this file.

Data Structures

struct  ast_aeap_client_config
 

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
static int aeap_cli_show (void *obj, void *arg, int flags)
 
static struct ast_aeapaeap_create (const char *id, const struct ast_aeap_params *params, int connect, int timeout)
 
static char * aeap_tab_complete_name (const char *word, struct ao2_container *container)
 
const struct ast_format_capast_aeap_client_config_codecs (const struct ast_aeap_client_config *cfg)
 Retrieve codec capabilities from the configuration. More...
 
int ast_aeap_client_config_has_protocol (const struct ast_aeap_client_config *cfg, const char *protocol)
 Check a given protocol against that in an Asterisk external application configuration. More...
 
struct ao2_containerast_aeap_client_configs_get (const char *protocol)
 Retrieve a listing of all client configuration objects by protocol. More...
 
struct ast_aeapast_aeap_create_and_connect_by_id (const char *id, const struct ast_aeap_params *params, int timeout)
 Create and connect to an Asterisk external application by sorcery id. More...
 
struct ast_aeapast_aeap_create_by_id (const char *id, const struct ast_aeap_params *params)
 Create an Asterisk external application object by sorcery id. More...
 
struct ast_variableast_aeap_custom_fields_get (const char *id)
 Retrieve a list of custom configuration fields. More...
 
struct ast_sorceryast_aeap_sorcery (void)
 Retrieve the AEAP sorcery object. More...
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static void * client_config_alloc (const char *name)
 
static int client_config_apply (const struct ast_sorcery *sorcery, void *obj)
 
static void client_config_destructor (void *obj)
 
static struct ast_aeap_client_configclient_config_get (const char *id)
 
static char * client_config_show (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 
static char * client_config_show_all (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 
static int load_module (void)
 
static int reload_module (void)
 
static int unload_module (void)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "Asterisk External Application Protocol Module for Asterisk" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, .requires = "res_http_websocket", }
 
static struct ast_cli_entry aeap_cli []
 
static struct ast_sorceryaeap_sorcery
 
static const struct ast_module_infoast_module_info = &__mod_info
 

Function Documentation

◆ __reg_module()

static void __reg_module ( void  )
static

Definition at line 404 of file res_aeap.c.

◆ __unreg_module()

static void __unreg_module ( void  )
static

Definition at line 404 of file res_aeap.c.

◆ aeap_cli_show()

static int aeap_cli_show ( void *  obj,
void *  arg,
int  flags 
)
static

Definition at line 187 of file res_aeap.c.

188{
189 struct ast_cli_args *a = arg;
190 struct ast_variable *options;
191 struct ast_variable *i;
192
193 if (!obj) {
194 ast_cli(a->fd, "No AEAP configuration found\n");
195 return 0;
196 }
197
199 if (!options) {
200 return 0;
201 }
202
203 ast_cli(a->fd, "%s: %s\n", ast_sorcery_object_get_type(obj),
205
206 for (i = options; i; i = i->next) {
207 ast_cli(a->fd, "\t%s: %s\n", i->name, i->value);
208 }
209
210 ast_cli(a->fd, "\n");
211
213
214 return 0;
215}
void ast_cli(int fd, const char *fmt,...)
Definition: clicompat.c:6
struct ast_variable * ast_variable_list_sort(struct ast_variable *head)
Performs an in-place sort on the variable list by ascending name.
Definition: main/config.c:621
void ast_variables_destroy(struct ast_variable *var)
Free variable list.
Definition: extconf.c:1262
static struct ast_sorcery * aeap_sorcery
Definition: res_aeap.c:65
const char * ast_sorcery_object_get_id(const void *object)
Get the unique identifier of a sorcery object.
Definition: sorcery.c:2317
#define ast_sorcery_objectset_create(sorcery, object)
Create an object set (KVP list) for an object.
Definition: sorcery.h:1137
const char * ast_sorcery_object_get_type(const void *object)
Get the type of a sorcery object.
Definition: sorcery.c:2329
Structure for variables, used for configurations and for channel variables.
struct ast_variable * next
static struct test_options options
static struct test_val a

References a, aeap_sorcery, ast_cli(), ast_sorcery_object_get_id(), ast_sorcery_object_get_type(), ast_sorcery_objectset_create, ast_variable_list_sort(), ast_variables_destroy(), ast_variable::name, ast_variable::next, options, and ast_variable::value.

Referenced by client_config_show(), and client_config_show_all().

◆ aeap_create()

static struct ast_aeap * aeap_create ( const char *  id,
const struct ast_aeap_params params,
int  connect,
int  timeout 
)
static

Definition at line 284 of file res_aeap.c.

286{
287 struct ast_aeap_client_config *cfg;
288 struct ast_aeap *aeap;
289 const char *url = NULL;
290 const char *protocol = NULL;
291
292 cfg = client_config_get(id);
293 if (cfg) {
294 url = cfg->url;
295 protocol = cfg->protocol;
296 }
297
298#ifdef TEST_FRAMEWORK
299 else if (ast_begins_with(id, "_aeap_test_")) {
300 url = "ws://127.0.0.1:8088/ws";
301 protocol = id;
302 }
303#endif
304
305 if (!url && !protocol) {
306 ast_log(LOG_ERROR, "AEAP: unable to get configuration for '%s'\n", id);
307 return NULL;
308 }
309
310 aeap = connect ? ast_aeap_create_and_connect(url, params, url, protocol, timeout) :
312
313 ao2_cleanup(cfg);
314 return aeap;
315}
enum queue_result id
Definition: app_queue.c:1667
#define ast_log
Definition: astobj2.c:42
#define ao2_cleanup(obj)
Definition: astobj2.h:1934
#define LOG_ERROR
static struct ast_aeap_client_config * client_config_get(const char *id)
Definition: res_aeap.c:157
struct ast_aeap * ast_aeap_create(const char *type, const struct ast_aeap_params *params)
Create an Asterisk external application object.
Definition: aeap.c:88
struct ast_aeap * ast_aeap_create_and_connect(const char *type, const struct ast_aeap_params *params, const char *url, const char *protocol, int timeout)
Create and connect to an Asterisk external application.
Definition: aeap.c:363
static char url[512]
#define NULL
Definition: resample.c:96
static int force_inline attribute_pure ast_begins_with(const char *str, const char *prefix)
Checks whether a string begins with another.
Definition: strings.h:97
const ast_string_field url
Definition: res_aeap.c:79
const ast_string_field protocol
Definition: res_aeap.c:79
Definition: aeap.c:47
const struct ast_aeap_params * params
Definition: aeap.c:49

References ao2_cleanup, ast_aeap_create(), ast_aeap_create_and_connect(), ast_begins_with(), ast_log, client_config_get(), id, LOG_ERROR, NULL, ast_aeap::params, ast_aeap_client_config::protocol, ast_aeap_client_config::url, and url.

Referenced by ast_aeap_create_and_connect_by_id(), and ast_aeap_create_by_id().

◆ aeap_tab_complete_name()

static char * aeap_tab_complete_name ( const char *  word,
struct ao2_container container 
)
static

Definition at line 162 of file res_aeap.c.

163{
164 void *obj;
165 struct ao2_iterator it;
166 int wordlen = strlen(word);
167 int ret;
168
170 while ((obj = ao2_iterator_next(&it))) {
171 if (!strncasecmp(word, ast_sorcery_object_get_id(obj), wordlen)) {
173 if (ret) {
174 ao2_ref(obj, -1);
175 break;
176 }
177 }
178 ao2_ref(obj, -1);
179 }
181
182 ao2_ref(container, -1);
183
184 return NULL;
185}
#define ast_strdup(str)
A wrapper for strdup()
Definition: astmm.h:241
#define ao2_iterator_next(iter)
Definition: astobj2.h:1911
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
Definition: astobj2.h:459
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
int ast_cli_completion_add(char *value)
Add a result to a request for completion options.
Definition: main/cli.c:2768
short word
struct ao2_container * container
Definition: res_fax.c:501
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Definition: astobj2.h:1821

References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_cli_completion_add(), ast_sorcery_object_get_id(), ast_strdup, container, and NULL.

Referenced by client_config_show().

◆ ast_aeap_client_config_codecs()

const struct ast_format_cap * ast_aeap_client_config_codecs ( const struct ast_aeap_client_config cfg)

Retrieve codec capabilities from the configuration.

Parameters
cfgA configuration object
Returns
The configuration's codec capabilities

Definition at line 131 of file res_aeap.c.

132{
133 return cfg->codecs;
134}
struct ast_format_cap * codecs
Definition: res_aeap.c:81

References ast_aeap_client_config::codecs.

Referenced by load_engine().

◆ ast_aeap_client_config_has_protocol()

int ast_aeap_client_config_has_protocol ( const struct ast_aeap_client_config cfg,
const char *  protocol 
)

Check a given protocol against that in an Asterisk external application configuration.

Parameters
cfgA configuration object
protocolThe protocol to check
Returns
True if the configuration's protocol matches, false otherwise

Definition at line 136 of file res_aeap.c.

138{
139 return !strcmp(protocol, cfg->protocol);
140}

References ast_aeap_client_config::protocol.

Referenced by load_engine(), and unload_engine().

◆ ast_aeap_client_configs_get()

struct ao2_container * ast_aeap_client_configs_get ( const char *  protocol)

Retrieve a listing of all client configuration objects by protocol.

Note
Caller is responsible for the returned container's reference.
Parameters
protocolAn optional protocol to filter on (if NULL returns all client configs)
Returns
A container of client configuration objects

Definition at line 142 of file res_aeap.c.

143{
144 struct ao2_container *container;
145 struct ast_variable *var;
146
147 var = protocol ? ast_variable_new("protocol ==", protocol, "") : NULL;
148
151
153
154 return container;
155}
#define var
Definition: ast_expr2f.c:605
#define ast_variable_new(name, value, filename)
#define AEAP_CONFIG_CLIENT
Definition: res_aeap.h:35
@ AST_RETRIEVE_FLAG_MULTIPLE
Return all matching objects.
Definition: sorcery.h:120
@ AST_RETRIEVE_FLAG_ALL
Perform no matching, return all objects.
Definition: sorcery.h:123
void * ast_sorcery_retrieve_by_fields(const struct ast_sorcery *sorcery, const char *type, unsigned int flags, struct ast_variable *fields)
Retrieve an object or multiple objects using specific fields.
Definition: sorcery.c:1897
Generic container type.

References AEAP_CONFIG_CLIENT, aeap_sorcery, AST_RETRIEVE_FLAG_ALL, AST_RETRIEVE_FLAG_MULTIPLE, ast_sorcery_retrieve_by_fields(), ast_variable_new, ast_variables_destroy(), container, NULL, and var.

Referenced by client_config_show(), client_config_show_all(), load_module(), speech_observer_loaded(), and unload_module().

◆ ast_aeap_create_and_connect_by_id()

struct ast_aeap * ast_aeap_create_and_connect_by_id ( const char *  id,
const struct ast_aeap_params params,
int  timeout 
)

Create and connect to an Asterisk external application by sorcery id.

Parameters
idThe sorcery id to lookup
paramsCallbacks and other parameters to use
timeoutHow long (in milliseconds) to attempt to connect (-1 equals infinite)
Returns
A new ao2 reference counted aeap object, or NULL on error

Definition at line 322 of file res_aeap.c.

324{
325 return aeap_create(id, params, 1, timeout);
326}
static struct ast_aeap * aeap_create(const char *id, const struct ast_aeap_params *params, int connect, int timeout)
Definition: res_aeap.c:284

References aeap_create(), and ast_aeap::params.

Referenced by speech_aeap_engine_create().

◆ ast_aeap_create_by_id()

struct ast_aeap * ast_aeap_create_by_id ( const char *  id,
const struct ast_aeap_params params 
)

Create an Asterisk external application object by sorcery id.

Parameters
idThe sorcery id to lookup
paramsCallbacks and other parameters to use
Returns
A new ao2 reference counted aeap object, or NULL on error

Definition at line 317 of file res_aeap.c.

318{
319 return aeap_create(id, params, 0, 0);
320}

References aeap_create(), and ast_aeap::params.

◆ ast_aeap_custom_fields_get()

struct ast_variable * ast_aeap_custom_fields_get ( const char *  id)

Retrieve a list of custom configuration fields.

Parameters
idconfiguration id/sorcery lookup key
Returns
variables, or NULL on error

Definition at line 328 of file res_aeap.c.

329{
330 struct ast_aeap_client_config *cfg;
331 struct ast_variable *vars;
332
333 cfg = client_config_get(id);
334 if (!cfg) {
335 ast_log(LOG_WARNING, "AEAP: no client configuration '%s' to get fields\n", id);
336 return NULL;
337 }
338
340
341 ao2_ref(cfg, -1);
342 return vars;
343}
#define LOG_WARNING

References aeap_sorcery, ao2_ref, ast_log, ast_sorcery_objectset_create, client_config_get(), LOG_WARNING, and NULL.

Referenced by speech_aeap_engine_create().

◆ ast_aeap_sorcery()

struct ast_sorcery * ast_aeap_sorcery ( void  )

Retrieve the AEAP sorcery object.

Returns
the AEAP sorcery object

Definition at line 67 of file res_aeap.c.

67 {
68 return aeap_sorcery;
69}

References aeap_sorcery.

Referenced by load_module(), and unload_module().

◆ AST_MODULE_SELF_SYM()

struct ast_module * AST_MODULE_SELF_SYM ( void  )

Definition at line 404 of file res_aeap.c.

◆ client_config_alloc()

static void * client_config_alloc ( const char *  name)
static

Definition at line 92 of file res_aeap.c.

93{
94 struct ast_aeap_client_config *cfg;
95
97 if (!cfg) {
98 return NULL;
99 }
100
101 if (ast_string_field_init(cfg, 512)) {
102 ao2_ref(cfg, -1);
103 return NULL;
104 }
105
107 ao2_ref(cfg, -1);
108 return NULL;
109 }
110
111 return cfg;
112}
@ AST_FORMAT_CAP_FLAG_DEFAULT
Definition: format_cap.h:38
#define ast_format_cap_alloc(flags)
Allocate a new ast_format_cap structure.
Definition: format_cap.h:49
static void client_config_destructor(void *obj)
Definition: res_aeap.c:84
void * ast_sorcery_generic_alloc(size_t size, ao2_destructor_fn destructor)
Allocate a generic sorcery capable object.
Definition: sorcery.c:1728
#define ast_string_field_init(x, size)
Initialize a field pool and fields.
Definition: stringfields.h:359

References ao2_ref, ast_format_cap_alloc, AST_FORMAT_CAP_FLAG_DEFAULT, ast_sorcery_generic_alloc(), ast_string_field_init, client_config_destructor(), ast_aeap_client_config::codecs, and NULL.

Referenced by load_module().

◆ client_config_apply()

static int client_config_apply ( const struct ast_sorcery sorcery,
void *  obj 
)
static

Definition at line 114 of file res_aeap.c.

115{
116 struct ast_aeap_client_config *cfg = obj;
117
118 if (ast_strlen_zero(cfg->url)) {
119 ast_log(LOG_ERROR, "AEAP - URL must be present for '%s'\n", ast_sorcery_object_get_id(cfg));
120 return -1;
121 }
122
123 if (!ast_begins_with(cfg->url, "ws")) {
124 ast_log(LOG_ERROR, "AEAP - URL must be ws or wss for '%s'\n", ast_sorcery_object_get_id(cfg));
125 return -1;
126 }
127
128 return 0;
129}
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Definition: strings.h:65

References ast_begins_with(), ast_log, ast_sorcery_object_get_id(), ast_strlen_zero(), LOG_ERROR, and ast_aeap_client_config::url.

Referenced by load_module().

◆ client_config_destructor()

static void client_config_destructor ( void *  obj)
static

Definition at line 84 of file res_aeap.c.

85{
86 struct ast_aeap_client_config *cfg = obj;
87
89 ao2_cleanup(cfg->codecs);
90}
#define ast_string_field_free_memory(x)
free all memory - to be called before destroying the object
Definition: stringfields.h:374

References ao2_cleanup, ast_string_field_free_memory, and ast_aeap_client_config::codecs.

Referenced by client_config_alloc().

◆ client_config_get()

static struct ast_aeap_client_config * client_config_get ( const char *  id)
static

Definition at line 157 of file res_aeap.c.

158{
160}
void * ast_sorcery_retrieve_by_id(const struct ast_sorcery *sorcery, const char *type, const char *id)
Retrieve an object using its unique identifier.
Definition: sorcery.c:1853

References AEAP_CONFIG_CLIENT, aeap_sorcery, and ast_sorcery_retrieve_by_id().

Referenced by aeap_create(), ast_aeap_custom_fields_get(), and client_config_show().

◆ client_config_show()

static char * client_config_show ( struct ast_cli_entry e,
int  cmd,
struct ast_cli_args a 
)
static

Definition at line 217 of file res_aeap.c.

218{
219 struct ast_aeap_client_config *cfg;
220
221 switch(cmd) {
222 case CLI_INIT:
223 e->command = "aeap show client";
224 e->usage =
225 "Usage: aeap show client <id>\n"
226 " Show the AEAP settings for a given client\n";
227 return NULL;
228 case CLI_GENERATE:
229 if (a->pos == 3) {
231 } else {
232 return NULL;
233 }
234 }
235
236 if (a->argc != 4) {
237 return CLI_SHOWUSAGE;
238 }
239
240 cfg = client_config_get(a->argv[3]);
241 aeap_cli_show(cfg, a, 0);
242 ao2_cleanup(cfg);
243
244 return CLI_SUCCESS;
245}
#define CLI_SHOWUSAGE
Definition: cli.h:45
#define CLI_SUCCESS
Definition: cli.h:44
@ CLI_INIT
Definition: cli.h:152
@ CLI_GENERATE
Definition: cli.h:153
static char * aeap_tab_complete_name(const char *word, struct ao2_container *container)
Definition: res_aeap.c:162
static int aeap_cli_show(void *obj, void *arg, int flags)
Definition: res_aeap.c:187
struct ao2_container * ast_aeap_client_configs_get(const char *protocol)
Retrieve a listing of all client configuration objects by protocol.
Definition: res_aeap.c:142
char * command
Definition: cli.h:186
const char * usage
Definition: cli.h:177

References a, aeap_cli_show(), aeap_tab_complete_name(), ao2_cleanup, ast_aeap_client_configs_get(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, client_config_get(), ast_cli_entry::command, NULL, and ast_cli_entry::usage.

◆ client_config_show_all()

static char * client_config_show_all ( struct ast_cli_entry e,
int  cmd,
struct ast_cli_args a 
)
static

Definition at line 247 of file res_aeap.c.

248{
249 struct ao2_container *container;
250
251 switch(cmd) {
252 case CLI_INIT:
253 e->command = "aeap show clients";
254 e->usage =
255 "Usage: aeap show clients\n"
256 " Show all configured AEAP clients\n";
257 return NULL;
258 case CLI_GENERATE:
259 return NULL;
260 }
261
262 if (a->argc != 3) {
263 return CLI_SHOWUSAGE;
264 }
265
268 ast_cli(a->fd, "No AEAP clients found\n");
270 return CLI_SUCCESS;
271 }
272
274 ao2_ref(container, -1);
275
276 return CLI_SUCCESS;
277}
#define ao2_callback(c, flags, cb_fn, arg)
ao2_callback() is a generic function that applies cb_fn() to all objects in a container,...
Definition: astobj2.h:1693
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
@ OBJ_NODATA
Definition: astobj2.h:1044

References a, aeap_cli_show(), ao2_callback, ao2_cleanup, ao2_container_count(), ao2_ref, ast_aeap_client_configs_get(), ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, container, NULL, OBJ_NODATA, and ast_cli_entry::usage.

◆ load_module()

static int load_module ( void  )
static

Definition at line 364 of file res_aeap.c.

365{
368 }
369
371 {
372 ast_log(LOG_ERROR, "AEAP - failed to open sorcery\n");
374 }
375
376 ast_sorcery_apply_default(aeap_sorcery, AEAP_CONFIG_CLIENT, "config", "aeap.conf,criteria=type=client");
377
380 ast_log(LOG_ERROR, "AEAP - failed to register client sorcery object\n");
382 }
383
388
390
392
393 return 0;
394}
#define ast_cli_register_multiple(e, len)
Register multiple commands.
Definition: cli.h:265
static struct ao2_container * codecs
Registered codecs.
Definition: codec.c:48
#define STRFLDSET(type,...)
Convert a struct and a list of stringfield fields to an argument list of field offsets.
#define FLDSET(type,...)
Convert a struct and list of fields to an argument list of field offsets.
@ OPT_NOOP_T
Type for a default handler that should do nothing.
@ OPT_CODEC_T
Type for default option handler for format capabilities.
@ OPT_STRINGFIELD_T
Type for default option handler for stringfields.
int aeap_general_initialize(void)
Initialize general/common AEAP facilities.
Definition: general.c:42
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Definition: module.h:78
static void * client_config_alloc(const char *name)
Definition: res_aeap.c:92
static struct ast_cli_entry aeap_cli[]
Definition: res_aeap.c:279
static int client_config_apply(const struct ast_sorcery *sorcery, void *obj)
Definition: res_aeap.c:114
void ast_sorcery_load(const struct ast_sorcery *sorcery)
Inform any wizards to load persistent objects.
Definition: sorcery.c:1377
#define ast_sorcery_object_register(sorcery, type, alloc, transform, apply)
Register an object type.
Definition: sorcery.h:837
#define ast_sorcery_object_field_register(sorcery, type, name, default_val, opt_type, flags,...)
Register a field within an object.
Definition: sorcery.h:955
#define ast_sorcery_apply_default(sorcery, type, name, data)
Definition: sorcery.h:476
#define ast_sorcery_open()
Open a new sorcery structure.
Definition: sorcery.h:406
#define ARRAY_LEN(a)
Definition: utils.h:666

References aeap_cli, AEAP_CONFIG_CLIENT, aeap_general_initialize(), aeap_sorcery, ARRAY_LEN, ast_cli_register_multiple, ast_log, AST_MODULE_LOAD_DECLINE, ast_sorcery_apply_default, ast_sorcery_load(), ast_sorcery_object_field_register, ast_sorcery_object_register, ast_sorcery_open, client_config_alloc(), client_config_apply(), codecs, FLDSET, LOG_ERROR, NULL, OPT_CODEC_T, OPT_NOOP_T, OPT_STRINGFIELD_T, STRFLDSET, and url.

◆ reload_module()

static int reload_module ( void  )
static

Definition at line 345 of file res_aeap.c.

346{
348
349 return 0;
350}
void ast_sorcery_reload(const struct ast_sorcery *sorcery)
Inform any wizards to reload persistent objects.
Definition: sorcery.c:1408

References aeap_sorcery, and ast_sorcery_reload().

◆ unload_module()

static int unload_module ( void  )
static

Definition at line 352 of file res_aeap.c.

353{
356
358
360
361 return 0;
362}
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
Definition: clicompat.c:30
void aeap_general_finalize(void)
Finalize/cleanup general AEAP facilities.
Definition: general.c:34
#define ast_sorcery_unref(sorcery)
Decrease the reference count of a sorcery structure.
Definition: sorcery.h:1500

References aeap_cli, aeap_general_finalize(), aeap_sorcery, ARRAY_LEN, ast_cli_unregister_multiple(), ast_sorcery_unref, and NULL.

Variable Documentation

◆ __mod_info

struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "Asterisk External Application Protocol Module for Asterisk" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, .requires = "res_http_websocket", }
static

Definition at line 404 of file res_aeap.c.

◆ aeap_cli

struct ast_cli_entry aeap_cli[]
static
Initial value:
= {
{ .handler = client_config_show , .summary = "Show AEAP client configuration by id" ,},
{ .handler = client_config_show_all , .summary = "Show all AEAP client configurations" ,},
}
static char * client_config_show_all(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Definition: res_aeap.c:247
static char * client_config_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Definition: res_aeap.c:217

Definition at line 279 of file res_aeap.c.

Referenced by load_module(), and unload_module().

◆ aeap_sorcery

struct ast_sorcery* aeap_sorcery
static

◆ ast_module_info

const struct ast_module_info* ast_module_info = &__mod_info
static

Definition at line 404 of file res_aeap.c.