Asterisk - The Open Source Telephony Project GIT-master-8f1982c
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
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 424 of file res_aeap.c.

◆ __unreg_module()

static void __unreg_module ( void  )
static

Definition at line 424 of file res_aeap.c.

◆ aeap_cli_show()

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

Definition at line 207 of file res_aeap.c.

208{
209 struct ast_cli_args *a = arg;
210 struct ast_variable *options;
211 struct ast_variable *i;
212
213 if (!obj) {
214 ast_cli(a->fd, "No AEAP configuration found\n");
215 return 0;
216 }
217
219 if (!options) {
220 return 0;
221 }
222
223 ast_cli(a->fd, "%s: %s\n", ast_sorcery_object_get_type(obj),
225
226 for (i = options; i; i = i->next) {
227 ast_cli(a->fd, "\t%s: %s\n", i->name, i->value);
228 }
229
230 ast_cli(a->fd, "\n");
231
233
234 return 0;
235}
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:706
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:85
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 304 of file res_aeap.c.

306{
307 struct ast_aeap_client_config *cfg;
308 struct ast_aeap *aeap;
309 const char *url = NULL;
310 const char *protocol = NULL;
311
312 cfg = client_config_get(id);
313 if (cfg) {
314 url = cfg->url;
315 protocol = cfg->protocol;
316 }
317
318#ifdef TEST_FRAMEWORK
319 else if (ast_begins_with(id, "_aeap_test_")) {
320 url = "ws://127.0.0.1:8088/ws";
321 protocol = id;
322 }
323#endif
324
325 if (!url && !protocol) {
326 ast_log(LOG_ERROR, "AEAP: unable to get configuration for '%s'\n", id);
327 return NULL;
328 }
329
330 aeap = connect ? ast_aeap_create_and_connect(url, params, url, protocol, timeout) :
332
333 ao2_cleanup(cfg);
334 return aeap;
335}
enum queue_result id
Definition: app_queue.c:1808
#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:177
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:99
const ast_string_field protocol
Definition: res_aeap.c:99
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 182 of file res_aeap.c.

183{
184 void *obj;
185 struct ao2_iterator it;
186 int wordlen = strlen(word);
187 int ret;
188
190 while ((obj = ao2_iterator_next(&it))) {
191 if (!strncasecmp(word, ast_sorcery_object_get_id(obj), wordlen)) {
193 if (ret) {
194 ao2_ref(obj, -1);
195 break;
196 }
197 }
198 ao2_ref(obj, -1);
199 }
201
202 ao2_ref(container, -1);
203
204 return NULL;
205}
#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:531
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 151 of file res_aeap.c.

152{
153 return cfg->codecs;
154}
struct ast_format_cap * codecs
Definition: res_aeap.c:101

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 156 of file res_aeap.c.

158{
159 return !strcmp(protocol, cfg->protocol);
160}

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 162 of file res_aeap.c.

163{
164 struct ao2_container *container;
165 struct ast_variable *var;
166
167 var = protocol ? ast_variable_new("protocol ==", protocol, "") : NULL;
168
171
173
174 return container;
175}
#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 342 of file res_aeap.c.

344{
345 return aeap_create(id, params, 1, timeout);
346}
static struct ast_aeap * aeap_create(const char *id, const struct ast_aeap_params *params, int connect, int timeout)
Definition: res_aeap.c:304

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 337 of file res_aeap.c.

338{
339 return aeap_create(id, params, 0, 0);
340}

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 348 of file res_aeap.c.

349{
350 struct ast_aeap_client_config *cfg;
351 struct ast_variable *vars;
352
353 cfg = client_config_get(id);
354 if (!cfg) {
355 ast_log(LOG_WARNING, "AEAP: no client configuration '%s' to get fields\n", id);
356 return NULL;
357 }
358
360
361 ao2_ref(cfg, -1);
362 return vars;
363}
#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 87 of file res_aeap.c.

87 {
88 return aeap_sorcery;
89}

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 424 of file res_aeap.c.

◆ client_config_alloc()

static void * client_config_alloc ( const char *  name)
static

Definition at line 112 of file res_aeap.c.

113{
114 struct ast_aeap_client_config *cfg;
115
117 if (!cfg) {
118 return NULL;
119 }
120
121 if (ast_string_field_init(cfg, 512)) {
122 ao2_ref(cfg, -1);
123 return NULL;
124 }
125
127 ao2_ref(cfg, -1);
128 return NULL;
129 }
130
131 return cfg;
132}
@ 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:104
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 134 of file res_aeap.c.

135{
136 struct ast_aeap_client_config *cfg = obj;
137
138 if (ast_strlen_zero(cfg->url)) {
139 ast_log(LOG_ERROR, "AEAP - URL must be present for '%s'\n", ast_sorcery_object_get_id(cfg));
140 return -1;
141 }
142
143 if (!ast_begins_with(cfg->url, "ws")) {
144 ast_log(LOG_ERROR, "AEAP - URL must be ws or wss for '%s'\n", ast_sorcery_object_get_id(cfg));
145 return -1;
146 }
147
148 return 0;
149}
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 104 of file res_aeap.c.

105{
106 struct ast_aeap_client_config *cfg = obj;
107
109 ao2_cleanup(cfg->codecs);
110}
#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 177 of file res_aeap.c.

178{
180}
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 237 of file res_aeap.c.

238{
239 struct ast_aeap_client_config *cfg;
240
241 switch(cmd) {
242 case CLI_INIT:
243 e->command = "aeap show client";
244 e->usage =
245 "Usage: aeap show client <id>\n"
246 " Show the AEAP settings for a given client\n";
247 return NULL;
248 case CLI_GENERATE:
249 if (a->pos == 3) {
251 } else {
252 return NULL;
253 }
254 }
255
256 if (a->argc != 4) {
257 return CLI_SHOWUSAGE;
258 }
259
260 cfg = client_config_get(a->argv[3]);
261 aeap_cli_show(cfg, a, 0);
262 ao2_cleanup(cfg);
263
264 return CLI_SUCCESS;
265}
#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:182
static int aeap_cli_show(void *obj, void *arg, int flags)
Definition: res_aeap.c:207
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:162
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 267 of file res_aeap.c.

268{
269 struct ao2_container *container;
270
271 switch(cmd) {
272 case CLI_INIT:
273 e->command = "aeap show clients";
274 e->usage =
275 "Usage: aeap show clients\n"
276 " Show all configured AEAP clients\n";
277 return NULL;
278 case CLI_GENERATE:
279 return NULL;
280 }
281
282 if (a->argc != 3) {
283 return CLI_SHOWUSAGE;
284 }
285
288 ast_cli(a->fd, "No AEAP clients found\n");
290 return CLI_SUCCESS;
291 }
292
294 ao2_ref(container, -1);
295
296 return CLI_SUCCESS;
297}
#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 384 of file res_aeap.c.

385{
388 }
389
391 {
392 ast_log(LOG_ERROR, "AEAP - failed to open sorcery\n");
394 }
395
396 ast_sorcery_apply_default(aeap_sorcery, AEAP_CONFIG_CLIENT, "config", "aeap.conf,criteria=type=client");
397
400 ast_log(LOG_ERROR, "AEAP - failed to register client sorcery object\n");
402 }
403
408
410
412
413 return 0;
414}
#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:112
static struct ast_cli_entry aeap_cli[]
Definition: res_aeap.c:299
static int client_config_apply(const struct ast_sorcery *sorcery, void *obj)
Definition: res_aeap.c:134
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 365 of file res_aeap.c.

366{
368
369 return 0;
370}
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 372 of file res_aeap.c.

373{
376
378
380
381 return 0;
382}
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 424 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:267
static char * client_config_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Definition: res_aeap.c:237

Definition at line 299 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 424 of file res_aeap.c.