Asterisk - The Open Source Telephony Project
GIT-master-8924258
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
y
Functions
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
y
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Properties
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Modules
Pages
res
ari
resource_events.h
Go to the documentation of this file.
1
/*
2
* Asterisk -- An open source telephony toolkit.
3
*
4
* Copyright (C) 2012 - 2013, Digium, Inc.
5
*
6
* David M. Lee, II <dlee@digium.com>
7
*
8
* See http://www.asterisk.org for more information about
9
* the Asterisk project. Please do not directly contact
10
* any of the maintainers of this project for assistance;
11
* the project provides a web site, mailing lists and IRC
12
* channels for your use.
13
*
14
* This program is free software, distributed under the terms of
15
* the GNU General Public License Version 2. See the LICENSE file
16
* at the top of the source tree.
17
*/
18
19
/*! \file
20
*
21
* \brief Generated file - declares stubs to be implemented in
22
* res/ari/resource_events.c
23
*
24
* WebSocket resource
25
*
26
* \author David M. Lee, II <dlee@digium.com>
27
*/
28
29
/*
30
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31
* !!!!! DO NOT EDIT !!!!!
32
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33
* This file is generated by a mustache template. Please see the original
34
* template in rest-api-templates/ari_resource.h.mustache
35
*/
36
37
#ifndef _ASTERISK_RESOURCE_EVENTS_H
38
#define _ASTERISK_RESOURCE_EVENTS_H
39
40
#include "
asterisk/ari.h
"
41
42
/*! Argument struct for ast_ari_events_event_websocket() */
43
struct
ast_ari_events_event_websocket_args
{
44
/*! Array of Applications to subscribe to. */
45
const
char
**
app
;
46
/*! Length of app array. */
47
size_t
app_count
;
48
/*! Parsing context for app. */
49
char
*
app_parse
;
50
/*! Subscribe to all Asterisk events. If provided, the applications listed will be subscribed to all events, effectively disabling the application specific subscriptions. Default is 'false'. */
51
int
subscribe_all
;
52
};
53
/*! Argument struct for ast_ari_events_user_event() */
54
struct
ast_ari_events_user_event_args
{
55
/*! Event name */
56
const
char
*
event_name
;
57
/*! The name of the application that will receive this event */
58
const
char
*
application
;
59
/*! Array of URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName} */
60
const
char
**
source
;
61
/*! Length of source array. */
62
size_t
source_count
;
63
/*! Parsing context for source. */
64
char
*
source_parse
;
65
/*! The "variables" key in the body object holds custom key/value pairs to add to the user event. Ex. { "variables": { "key": "value" } } */
66
struct
ast_json
*
variables
;
67
};
68
/*!
69
* \brief Body parsing function for /events/user/{eventName}.
70
* \param body The JSON body from which to parse parameters.
71
* \param[out] args The args structure to parse into.
72
* \retval zero on success
73
* \retval non-zero on failure
74
*/
75
int
ast_ari_events_user_event_parse_body
(
76
struct
ast_json
*body,
77
struct
ast_ari_events_user_event_args
*
args
);
78
79
/*!
80
* \brief Generate a user event.
81
*
82
* \param headers HTTP headers
83
* \param args Swagger parameters
84
* \param[out] response HTTP response
85
*/
86
void
ast_ari_events_user_event
(
struct
ast_variable
*headers,
struct
ast_ari_events_user_event_args
*
args
,
struct
ast_ari_response
*response);
87
88
#endif
/* _ASTERISK_RESOURCE_EVENTS_H */
ari.h
Asterisk RESTful API hooks.
ast_ari_events_user_event_parse_body
int ast_ari_events_user_event_parse_body(struct ast_json *body, struct ast_ari_events_user_event_args *args)
Body parsing function for /events/user/{eventName}.
Definition:
res_ari_events.c:54
ast_ari_events_user_event
void ast_ari_events_user_event(struct ast_variable *headers, struct ast_ari_events_user_event_args *args, struct ast_ari_response *response)
Generate a user event.
Definition:
resource_events.c:36
ast_ari_events_event_websocket_args
Definition:
resource_events.h:43
ast_ari_events_event_websocket_args::app_parse
char * app_parse
Definition:
resource_events.h:49
ast_ari_events_event_websocket_args::app_count
size_t app_count
Definition:
resource_events.h:47
ast_ari_events_event_websocket_args::app
const char ** app
Definition:
resource_events.h:45
ast_ari_events_event_websocket_args::subscribe_all
int subscribe_all
Definition:
resource_events.h:51
ast_ari_events_user_event_args
Definition:
resource_events.h:54
ast_ari_events_user_event_args::variables
struct ast_json * variables
Definition:
resource_events.h:66
ast_ari_events_user_event_args::application
const char * application
Definition:
resource_events.h:58
ast_ari_events_user_event_args::source
const char ** source
Definition:
resource_events.h:60
ast_ari_events_user_event_args::source_count
size_t source_count
Definition:
resource_events.h:62
ast_ari_events_user_event_args::event_name
const char * event_name
Definition:
resource_events.h:56
ast_ari_events_user_event_args::source_parse
char * source_parse
Definition:
resource_events.h:64
ast_ari_response
Definition:
ari.h:101
ast_json
Abstract JSON element (object, array, string, int, ...).
ast_variable
Structure for variables, used for configurations and for channel variables.
Definition:
include/asterisk/config.h:83
args
const char * args
Definition:
test_func_file.c:46
Generated on Wed Apr 23 2025 20:04:27 for Asterisk - The Open Source Telephony Project by
1.9.4