本文整理汇总了C++中AST_APP_ARG函数的典型用法代码示例。如果您正苦于以下问题:C++ AST_APP_ARG函数的具体用法?C++ AST_APP_ARG怎么用?C++ AST_APP_ARG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AST_APP_ARG函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: math
static int math(struct ast_channel *chan, const char *cmd, char *parse,
char *buf, size_t len)
{
double fnum1;
double fnum2;
double ftmp = 0;
char *op;
int iaction = -1;
int type_of_result = FLOAT_RESULT;
char *mvalue1, *mvalue2 = NULL, *mtype_of_result;
int negvalue1 = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(argv0);
AST_APP_ARG(argv1);
);
开发者ID:jcollie,项目名称:asterisk,代码行数:15,代码来源:func_math.c
示例2: privacy_exec
static int privacy_exec (struct ast_channel *chan, void *data)
{
int res=0;
int retries;
int maxretries = 3;
int minlength = 10;
int x = 0;
char phone[30];
char *parse = NULL;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(maxretries);
AST_APP_ARG(minlength);
AST_APP_ARG(options);
AST_APP_ARG(checkcontext);
);
开发者ID:boylubis,项目名称:ctsoft,代码行数:15,代码来源:app_privacy.c
示例3: app_synth_exec
/* The entry point of the application. */
static int app_synth_exec(struct ast_channel *chan, ast_app_data data)
{
struct ast_frame *f;
ast_mrcp_profile_t *profile;
apr_uint32_t speech_channel_number = get_next_speech_channel_number();
const char *name;
speech_channel_status_t status;
char *parse;
int i;
mrcpsynth_options_t mrcpsynth_options;
mrcpsynth_session_t mrcpsynth_session;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(prompt);
AST_APP_ARG(options);
);
开发者ID:cloudvox,项目名称:asterisk-unimrcp,代码行数:17,代码来源:app_mrcpsynth.c
示例4: forkcdr_exec
static int forkcdr_exec(struct ast_channel *chan, const char *data)
{
char *parse;
struct ast_flags flags = { 0, };
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(options);
);
开发者ID:aderbas,项目名称:asterisk,代码行数:7,代码来源:app_forkcdr.c
示例5: acf_sprintf
/*** DOCUMENTATION
<function name="SPRINTF" language="en_US">
<synopsis>
Format a variable according to a format string.
</synopsis>
<syntax>
<parameter name="format" required="true" />
<parameter name="arg1" required="true" />
<parameter name="arg2" multiple="true" />
<parameter name="argN" />
</syntax>
<description>
<para>Parses the format string specified and returns a string matching
that format. Supports most options found in <emphasis>sprintf(3)</emphasis>.
Returns a shortened string if a format specifier is not recognized.</para>
</description>
<see-also>
<ref type="manpage">sprintf(3)</ref>
</see-also>
</function>
***/
static int acf_sprintf(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
#define SPRINTF_FLAG 0
#define SPRINTF_WIDTH 1
#define SPRINTF_PRECISION 2
#define SPRINTF_LENGTH 3
#define SPRINTF_CONVERSION 4
int i, state = -1, argcount = 0;
char *formatstart = NULL, *bufptr = buf;
char formatbuf[256] = "";
int tmpi;
double tmpd;
AST_DECLARE_APP_ARGS(arg,
AST_APP_ARG(format);
AST_APP_ARG(var)[100];
);
开发者ID:abieuzent,项目名称:iaxproxy,代码行数:37,代码来源:func_sprintf.c
示例6: acf_version_exec
static int acf_version_exec(struct ast_channel *chan, const char *cmd,
char *parse, char *buffer, size_t buflen)
{
const char *response_char = ast_get_version();
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(info);
);
开发者ID:mtulio,项目名称:mtulio,代码行数:7,代码来源:func_version.c
示例7: bridgewait_exec
static int bridgewait_exec(struct ast_channel *chan, const char *data)
{
char *bridge_name = DEFAULT_BRIDGE_NAME;
struct ast_bridge_features chan_features;
struct ast_flags flags = { 0 };
char *parse;
int bridge_join_failed = 0;
enum wait_bridge_roles role = ROLE_PARTICIPANT;
char *opts[OPT_ARG_ARRAY_SIZE] = { NULL, };
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(name);
AST_APP_ARG(role);
AST_APP_ARG(options);
AST_APP_ARG(other); /* Any remaining unused arguments */
);
开发者ID:acechat,项目名称:asterisk,代码行数:16,代码来源:app_bridgewait.c
示例8: zapateller_exec
static int zapateller_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
int i, answer = 0, nocallerid = 0;
char *parse = ast_strdupa((char *)data);
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(options)[2];
);
开发者ID:TheSeanBrady,项目名称:crtc.bcs.versa,代码行数:8,代码来源:app_zapateller.c
示例9: start_monitor_exec
/*!
* \brief Start monitor
* \param chan
* \param data arguments passed fname|options
* \retval 0 on success.
* \retval -1 on failure.
*/
static int start_monitor_exec(struct ast_channel *chan, const char *data)
{
char *arg;
char *options;
char *delay;
char *urlprefix = NULL;
char tmp[256];
int stream_action = X_REC_IN | X_REC_OUT;
int joinfiles = 0;
int waitforbridge = 0;
int res = 0;
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(format);
AST_APP_ARG(fname_base);
AST_APP_ARG(options);
);
开发者ID:carlosdelfino,项目名称:WorkshopTelefoniaAutomacao,代码行数:24,代码来源:res_monitor.c
示例10: readexten_exec
static int readexten_exec(struct ast_channel *chan, void *data)
{
int res = 0;
char exten[256] = "";
int maxdigits = sizeof(exten) - 1;
int timeout = 0, digit_timeout = 0, x = 0;
char *argcopy = NULL, *status = "";
struct ind_tone_zone_sound *ts = NULL;
struct ast_flags flags = {0};
AST_DECLARE_APP_ARGS(arglist,
AST_APP_ARG(variable);
AST_APP_ARG(filename);
AST_APP_ARG(context);
AST_APP_ARG(options);
AST_APP_ARG(timeout);
);
开发者ID:nicwolff,项目名称:asterisk-agi-mp3,代码行数:17,代码来源:app_readexten.c
示例11: load_values_config
static int load_values_config(const char *tmp)
{
char *vals = NULL, *save = NULL;
struct values *value = NULL;
int i;
AST_DECLARE_APP_ARGS(val,
AST_APP_ARG(ues)[200]; /* More than 200 columns in this CDR? Yeah, right... */
);
开发者ID:bugrahantopall,项目名称:asterisk,代码行数:8,代码来源:cdr_sqlite3_custom.c
示例12: forkcdr_exec
static int forkcdr_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
char *argcopy = NULL;
struct ast_flags flags = {0};
char *opts[OPT_ARG_ARRAY_SIZE];
AST_DECLARE_APP_ARGS(arglist,
AST_APP_ARG(options);
);
开发者ID:RoyalG41,项目名称:Asterisk,代码行数:9,代码来源:app_forkcdr.c
示例13: page_exec
static int page_exec(struct ast_channel *chan, const char *data)
{
char *tech, *resource, *tmp;
char confbridgeopts[128], originator[AST_CHANNEL_NAME];
struct page_options options = { { 0, }, { 0, } };
unsigned int confid = ast_random();
struct ast_app *app;
int res = 0, pos = 0, i = 0;
struct ast_dial **dial_list;
unsigned int num_dials;
int timeout = 0;
char *parse;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(devices);
AST_APP_ARG(options);
AST_APP_ARG(timeout);
);
开发者ID:bugrahantopall,项目名称:asterisk,代码行数:18,代码来源:app_page.c
示例14: privacy_exec
static int privacy_exec (struct ast_channel *chan, void *data)
{
int res=0;
int retries;
int maxretries = 3;
int minlength = 10;
int x = 0;
char *s;
char phone[30];
struct localuser *u;
struct ast_config *cfg = NULL;
char *parse = NULL;
int priority_jump = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(maxretries);
AST_APP_ARG(minlength);
AST_APP_ARG(options);
);
开发者ID:BackupTheBerlios,项目名称:solid-pbx-svn,代码行数:18,代码来源:app_privacy.c
示例15: acf_odbc_write
/*
* Master control routine
*/
static int acf_odbc_write(struct ast_channel *chan, char *cmd, char *s, const char *value)
{
struct odbc_obj *obj;
struct acf_odbc_query *query;
char *t, buf[2048]="", varname[15];
int res, i, retry=0;
AST_DECLARE_APP_ARGS(values,
AST_APP_ARG(field)[100];
);
开发者ID:BackupTheBerlios,项目名称:solid-pbx-svn,代码行数:12,代码来源:func_odbc.c
示例16: mcdget_exec
static int mcdget_exec(struct ast_channel *chan, const char *data) {
memcached_return_t rc;
memcached_st *mcd = memcached_pool_fetch(mcdpool, &to, &rc);
if (rc) {
ast_log(LOG_WARNING, "mcdget_exec: memcached pool error: %d\n", rc);
return 0;
}
char *argcopy;
char *key = (char *)ast_malloc(MEMCACHED_MAX_KEY);
mcd_set_operation_result(chan, MEMCACHED_SUCCESS);
// parse the app arguments
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(varname);
AST_APP_ARG(key);
);
开发者ID:drivefast,项目名称:asterisk-res_memcached,代码行数:19,代码来源:res_memcached.c
示例17: start_monitor_exec
/*!
* \brief Start monitor
* \param chan
* \param data arguments passed fname|options
* \retval 0 on success.
* \retval -1 on failure.
*/
static int start_monitor_exec(struct ast_channel *chan, const char *data)
{
char *arg;
char *options;
char *delay;
char *urlprefix = NULL;
char tmp[256];
int stream_action = X_REC_IN | X_REC_OUT;
int joinfiles = 0;
int res = 0;
char *parse;
struct ast_flags flags = { 0 };
char *opts[OPT_ARG_ARRAY_SIZE] = { NULL, };
char beep_id[64] = "";
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(format);
AST_APP_ARG(fname_base);
AST_APP_ARG(options);
);
开发者ID:adaptiman,项目名称:asterisk,代码行数:26,代码来源:res_monitor.c
示例18: jsonpretty_exec
static int jsonpretty_exec(struct ast_channel *chan,
const char *cmd, char *parse, char *buffer, size_t buflen
) {
// nicely format the contents of a varable that contains json
buffer[0] = 0;
// parse the function arguments
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(json);
);
开发者ID:cfhb,项目名称:vlink-cti,代码行数:11,代码来源:res_json.c
示例19: disa_exec
static int disa_exec(struct ast_channel *chan, void *data)
{
int i,j,k,x,did_ignore;
int firstdigittimeout = 20000;
int digittimeout = 10000;
struct localuser *u;
char *tmp, exten[AST_MAX_EXTENSION],acctcode[20]="";
char pwline[256];
char ourcidname[256],ourcidnum[256];
struct ast_frame *f;
struct timeval lastdigittime;
int res;
time_t rstart;
FILE *fp;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(passcode);
AST_APP_ARG(context);
AST_APP_ARG(cid);
AST_APP_ARG(mailbox);
);
开发者ID:tpenguin,项目名称:solarisvoip-asterisk,代码行数:20,代码来源:app_disa.c
示例20: forkcdr_exec
static int forkcdr_exec(struct ast_channel *chan, const char *data)
{
RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
RAII_VAR(struct fork_cdr_message_payload *, payload, NULL, ao2_cleanup);
RAII_VAR(struct stasis_message_router *, router, ast_cdr_message_router(), ao2_cleanup);
char *parse;
struct ast_flags flags = { 0, };
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(options);
);
开发者ID:litnimax,项目名称:asterisk,代码行数:11,代码来源:app_forkcdr.c
注:本文中的AST_APP_ARG函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论