Asterisk - The Open Source Telephony Project GIT-master-27fb039
Loading...
Searching...
No Matches
Functions | Variables
res_stasis_answer.c File Reference

Stasis application control support. More...

#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/stasis_app_impl.h"
Include dependency graph for res_stasis_answer.c:

Go to the source code of this file.

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
static int app_control_answer (struct stasis_app_control *control, struct ast_channel *chan, void *data)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static int load_module (void)
 
int stasis_app_control_answer (struct stasis_app_control *control)
 Answer the channel associated with this control.
 
static int unload_module (void)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS , .description = "Stasis application answer support" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .requires = "res_stasis", }
 
static const struct ast_module_infoast_module_info = &__mod_info
 

Detailed Description

Stasis application control support.

Author
David M. Lee, II dlee@.nosp@m.digi.nosp@m.um.co.nosp@m.m

Definition in file res_stasis_answer.c.

Function Documentation

◆ __reg_module()

static void __reg_module ( void  )
static

Definition at line 77 of file res_stasis_answer.c.

◆ __unreg_module()

static void __unreg_module ( void  )
static

Definition at line 77 of file res_stasis_answer.c.

◆ app_control_answer()

static int app_control_answer ( struct stasis_app_control control,
struct ast_channel chan,
void *  data 
)
static

Definition at line 36 of file res_stasis_answer.c.

38{
39 ast_debug(3, "%s: Answering\n",
41 return ast_raw_answer(chan);
42}
int ast_raw_answer(struct ast_channel *chan)
Answer a channel.
Definition channel.c:2688
#define ast_debug(level,...)
Log a DEBUG message.
const char * stasis_app_control_get_channel_id(const struct stasis_app_control *control)
Returns the uniqueid of the channel associated with this control.
Definition control.c:1475

References ast_debug, ast_raw_answer(), and stasis_app_control_get_channel_id().

Referenced by stasis_app_control_answer().

◆ AST_MODULE_SELF_SYM()

struct ast_module * AST_MODULE_SELF_SYM ( void  )

Definition at line 77 of file res_stasis_answer.c.

◆ load_module()

static int load_module ( void  )
static

Definition at line 62 of file res_stasis_answer.c.

63{
65}
@ AST_MODULE_LOAD_SUCCESS
Definition module.h:70

References AST_MODULE_LOAD_SUCCESS.

◆ stasis_app_control_answer()

int stasis_app_control_answer ( struct stasis_app_control control)

Answer the channel associated with this control.

Parameters
controlControl for res_stasis.
Returns
0 for success.
Non-zero for error.

Definition at line 44 of file res_stasis_answer.c.

45{
46 int retval;
47
48 ast_debug(3, "%s: Sending answer command\n",
50
52
53 if (retval != 0) {
54 ast_log(LOG_WARNING, "%s: Failed to answer channel\n",
56 return -1;
57 }
58
59 return 0;
60}
#define ast_log
Definition astobj2.c:42
#define LOG_WARNING
static int app_control_answer(struct stasis_app_control *control, struct ast_channel *chan, void *data)
#define NULL
Definition resample.c:96
int stasis_app_send_command(struct stasis_app_control *control, stasis_app_command_cb command, void *data, command_data_destructor_fn data_destructor)
Invokes a command on a control's channel.
Definition control.c:939

References app_control_answer(), ast_debug, ast_log, LOG_WARNING, NULL, stasis_app_control_get_channel_id(), and stasis_app_send_command().

Referenced by ast_ari_channels_answer().

◆ unload_module()

static int unload_module ( void  )
static

Definition at line 67 of file res_stasis_answer.c.

68{
69 return 0;
70}

Variable Documentation

◆ __mod_info

struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS , .description = "Stasis application answer support" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .requires = "res_stasis", }
static

Definition at line 77 of file res_stasis_answer.c.

◆ ast_module_info

const struct ast_module_info* ast_module_info = &__mod_info
static

Definition at line 77 of file res_stasis_answer.c.