Asterisk - The Open Source Telephony Project GIT-master-f36a736
dialplan_functions.h
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2013, Digium, Inc.
5 *
6 * See http://www.asterisk.org for more information about
7 * the Asterisk project. Please do not directly contact
8 * any of the maintainers of this project for assistance;
9 * the project provides a web site, mailing lists and IRC
10 * channels for your use.
11 *
12 * This program is free software, distributed under the terms of
13 * the GNU General Public License Version 2. See the LICENSE file
14 * at the top of the source tree.
15 */
16
17/*!
18 * \file
19 * \brief PJSIP dialplan functions header file
20 */
21
22#ifndef _PJSIP_DIALPLAN_FUNCTIONS
23#define _PJSIP_DIALPLAN_FUNCTIONS
24
25/*!
26 * \brief CHANNEL function read callback
27 * \param chan The channel the function is called on
28 * \param cmd The name of the function
29 * \param data Arguments passed to the function
30 * \param buf Out buffer that should be populated with the data
31 * \param len Size of the buffer
32 *
33 * \retval 0 on success
34 * \retval -1 on failure
35 */
36int pjsip_acf_channel_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);
37
38/*!
39 * \brief PJSIP_MEDIA_OFFER function write callback
40 * \param chan The channel the function is called on
41 * \param cmd The name of the function
42 * \param data Arguments passed to the function
43 * \param value Value to be set by the function
44 *
45 * \retval 0 on success
46 * \retval -1 on failure
47 */
48int pjsip_acf_media_offer_write(struct ast_channel *chan, const char *cmd, char *data, const char *value);
49
50/*!
51 * \brief PJSIP_DTMF_MODE function read callback
52 * \param chan The channel the function is called on
53 * \param cmd The name of the function
54 * \param data Arguments passed to the function
55 * \param buf Out buffer that should be populated with the data
56 * \param len Size of the buffer
57 *
58 * \retval 0 on success
59 * \retval -1 on failure
60 */
61int pjsip_acf_dtmf_mode_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);
62
63/*!
64 * \brief PJSIP_DTMF_MODE function write callback
65 * \param chan The channel the function is called on
66 * \param cmd The name of the function
67 * \param data Arguments passed to the function
68 * \param value Value to be set by the function
69 *
70 * \retval 0 on success
71 * \retval -1 on failure
72 */
73int pjsip_acf_dtmf_mode_write(struct ast_channel *chan, const char *cmd, char *data, const char *value);
74
75/*!
76 * \brief PJSIP_MOH_PASSTHROUGH function read callback
77 * \param chan The channel the function is called on
78 * \param cmd The name of the function
79 * \param data Arguments passed to the function
80 * \param buf Out buffer that should be populated with the data
81 * \param len Size of the buffer
82 *
83 * \retval 0 on success
84 * \retval -1 on failure
85 */
86int pjsip_acf_moh_passthrough_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);
87
88/*!
89 * \brief PJSIP_MOH_PASSTHROUGH function write callback
90 * \param chan The channel the function is called on
91 * \param cmd The name of the function
92 * \param data Arguments passed to the function
93 * \param value Value to be set by the function
94 *
95 * \retval 0 on success
96 * \retval -1 on failure
97 */
98int pjsip_acf_moh_passthrough_write(struct ast_channel *chan, const char *cmd, char *data, const char *value);
99
100/*!
101 * \brief PJSIP_MEDIA_OFFER function read callback
102 * \param chan The channel the function is called on
103 * \param cmd The name of the function
104 * \param data Arguments passed to the function
105 * \param buf Out buffer that should be populated with the data
106 * \param len Size of the buffer
107 *
108 * \retval 0 on success
109 * \retval -1 on failure
110 */
111int pjsip_acf_media_offer_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);
112
113/*!
114 * \brief PJSIP_SEND_SESSION_REFRESH function write callback
115 * \param chan The channel the function is called on
116 * \param cmd the Name of the function
117 * \param data Arguments passed to the function
118 * \param value Value to be set by the function
119 *
120 * \retval 0 on success
121 * \retval -1 on failure
122 */
123int pjsip_acf_session_refresh_write(struct ast_channel *chan, const char *cmd, char *data, const char *value);
124
125/*!
126 * \brief PJSIP_DIAL_CONTACTS function read callback
127 * \param chan The channel the function is called on
128 * \param cmd The name of the function
129 * \param data Arguments passed to the function
130 * \param buf Out buffer that should be populated with the data
131 * \param len Size of the buffer
132 *
133 * \retval 0 on success
134 * \retval -1 on failure
135 */
136int pjsip_acf_dial_contacts_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);
137
138/*!
139 * \brief PJSIP_PARSE_URI function read callback
140 * \param chan The channel the function is called on
141 * \param cmd The name of the function
142 * \param data Arguments passed to the function
143 * \param buf Out buffer that should be populated with the data
144 * \param len Size of the buffer
145 *
146 * \retval 0 on success
147 * \retval -1 on failure
148 */
149int pjsip_acf_parse_uri_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);
150
151/*!
152 * \brief Hang up an incoming PJSIP channel with a SIP response code
153 * \param chan The channel the function is called on
154 * \param data SIP response code or name
155 *
156 * \retval 0 on success
157 * \retval -1 on failure
158 */
159int pjsip_app_hangup(struct ast_channel *chan, const char *data);
160
161/*!
162 * \brief Manager action to hang up an incoming PJSIP channel with a SIP response code
163 * \param s session
164 * \param m message
165 *
166 * \retval 0 on success
167 * \retval -1 on failure
168 */
169int pjsip_action_hangup(struct mansession *s, const struct message *m);
170
171#endif /* _PJSIP_DIALPLAN_FUNCTIONS */
int pjsip_acf_moh_passthrough_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
PJSIP_MOH_PASSTHROUGH function read callback.
int pjsip_acf_media_offer_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
PJSIP_MEDIA_OFFER function read callback.
int pjsip_acf_media_offer_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
PJSIP_MEDIA_OFFER function write callback.
int pjsip_acf_dtmf_mode_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
PJSIP_DTMF_MODE function write callback.
int pjsip_acf_session_refresh_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
PJSIP_SEND_SESSION_REFRESH function write callback.
int pjsip_app_hangup(struct ast_channel *chan, const char *data)
Hang up an incoming PJSIP channel with a SIP response code.
int pjsip_acf_moh_passthrough_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
PJSIP_MOH_PASSTHROUGH function write callback.
int pjsip_action_hangup(struct mansession *s, const struct message *m)
Manager action to hang up an incoming PJSIP channel with a SIP response code.
int pjsip_acf_channel_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
CHANNEL function read callback.
int pjsip_acf_dtmf_mode_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
PJSIP_DTMF_MODE function read callback.
int pjsip_acf_dial_contacts_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
PJSIP_DIAL_CONTACTS function read callback.
int pjsip_acf_parse_uri_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
PJSIP_PARSE_URI function read callback.
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Main Channel structure associated with a channel.
In case you didn't read that giant block of text above the mansession_session struct,...
Definition: manager.c:326
int value
Definition: syslog.c:37