summaryrefslogtreecommitdiff
path: root/channels/pjsip/include/dialplan_functions.h
blob: 8b80bfa7474919f9d23a2b573539351179d03ffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
 * Asterisk -- An open source telephony toolkit.
 *
 * Copyright (C) 2013, Digium, Inc.
 *
 * See http://www.asterisk.org for more information about
 * the Asterisk project. Please do not directly contact
 * any of the maintainers of this project for assistance;
 * the project provides a web site, mailing lists and IRC
 * channels for your use.
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License Version 2. See the LICENSE file
 * at the top of the source tree.
 */

/*!
 * \file
 * \brief PJSIP dialplan functions header file
 */

#ifndef _PJSIP_DIALPLAN_FUNCTIONS
#define _PJSIP_DIALPLAN_FUNCTIONS

/*!
 * \brief CHANNEL function read callback
 * \param chan The channel the function is called on
 * \param cmd The name of the function
 * \param data Arguments passed to the function
 * \param buf Out buffer that should be populated with the data
 * \param len Size of the buffer
 *
 * \retval 0 on success
 * \retval -1 on failure
 */
int pjsip_acf_channel_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);

/*!
 * \brief PJSIP_MEDIA_OFFER function write callback
 * \param chan The channel the function is called on
 * \param cmd The name of the function
 * \param data Arguments passed to the function
 * \param value Value to be set by the function
 *
 * \retval 0 on success
 * \retval -1 on failure
 */
int pjsip_acf_media_offer_write(struct ast_channel *chan, const char *cmd, char *data, const char *value);

/*!
 * \brief PJSIP_MEDIA_OFFER function read callback
 * \param chan The channel the function is called on
 * \param cmd The name of the function
 * \param data Arguments passed to the function
 * \param buf Out buffer that should be populated with the data
 * \param len Size of the buffer
 *
 * \retval 0 on success
 * \retval -1 on failure
 */
int pjsip_acf_media_offer_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);

/*!
 * \brief PJSIP_SEND_SESSION_REFRESH function write callback
 * \param chan The channel the function is called on
 * \param cmd the Name of the function
 * \param data Arguments passed to the function
 * \param value Value to be set by the function
 *
 * \retval 0 on success
 * \retval -1 on failure
 */
int pjsip_acf_session_refresh_write(struct ast_channel *chan, const char *cmd, char *data, const char *value);

/*!
 * \brief PJSIP_DIAL_CONTACTS function read callback
 * \param chan The channel the function is called on
 * \param cmd The name of the function
 * \param data Arguments passed to the function
 * \param buf Out buffer that should be populated with the data
 * \param len Size of the buffer
 *
 * \retval 0 on success
 * \retval -1 on failure
 */
int pjsip_acf_dial_contacts_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len);

#endif /* _PJSIP_DIALPLAN_FUNCTIONS */