这篇教程C++ AST_APP_ARG函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AST_APP_ARG函数的典型用法代码示例。如果您正苦于以下问题:C++ AST_APP_ARG函数的具体用法?C++ AST_APP_ARG怎么用?C++ AST_APP_ARG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AST_APP_ARG函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: mathstatic 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,
示例2: privacy_execstatic 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,
示例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,
示例4: forkcdr_execstatic 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,
示例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,
示例6: acf_version_execstatic 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,
示例7: bridgewait_execstatic 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,
示例8: zapateller_execstatic 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,
示例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,
示例10: readexten_execstatic 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,
示例11: load_values_configstatic 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,
示例12: forkcdr_execstatic 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,
示例13: page_execstatic 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,
示例14: privacy_execstatic 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,
示例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,
示例16: mcdget_execstatic 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,
示例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,
示例18: jsonpretty_execstatic 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,
示例19: disa_execstatic 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,
示例20: forkcdr_execstatic 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,
示例21: disa_execstatic int disa_exec(struct ast_channel *chan, const char *data){ int i = 0, j, k = 0, did_ignore = 0, special_noanswer = 0; int firstdigittimeout = (chan->pbx ? chan->pbx->rtimeoutms : 20000); int digittimeout = (chan->pbx ? chan->pbx->dtimeoutms : 10000); struct ast_flags flags; 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; FILE *fp; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(passcode); AST_APP_ARG(context); AST_APP_ARG(cid); AST_APP_ARG(mailbox); AST_APP_ARG(options); );
开发者ID:xrg,项目名称:asterisk-xrg,代码行数:20,
示例22: jb_framedata_init/* set defaults */static int jb_framedata_init(struct jb_framedata *framedata, const char *data, const char *value){ int jb_impl_type = DEFAULT_TYPE; /* Initialize defaults */ framedata->timer_fd = -1; jb_conf_default(&framedata->jb_conf); if (!(framedata->jb_impl = ast_jb_get_impl(jb_impl_type))) { return -1; } if (!(framedata->timer = ast_timer_open())) { return -1; } framedata->timer_fd = ast_timer_fd(framedata->timer); framedata->timer_interval = DEFAULT_TIMER_INTERVAL; ast_timer_set_rate(framedata->timer, 1000 / framedata->timer_interval); framedata->start_tv = ast_tvnow(); /* Now check user options to see if any of the defaults need to change. */ if (!ast_strlen_zero(data)) { if (!strcasecmp(data, "fixed")) { jb_impl_type = AST_JB_FIXED; } else if (!strcasecmp(data, "adaptive")) { jb_impl_type = AST_JB_ADAPTIVE; } else { ast_log(LOG_WARNING, "Unknown Jitterbuffer type %s. Failed to create jitterbuffer./n", data); return -1; } ast_copy_string(framedata->jb_conf.impl, data, sizeof(framedata->jb_conf.impl)); } if (!ast_strlen_zero(value) && strcasecmp(value, "default")) { char *parse = ast_strdupa(value); int res = 0; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(max_size); AST_APP_ARG(resync_threshold); AST_APP_ARG(target_extra); );
开发者ID:bugrahantopall,项目名称:asterisk,代码行数:42,
示例23: transfer_execstatic int transfer_exec(struct ast_channel *chan, const char *data){ int res; int len; char *slash; char *tech = NULL; char *dest = NULL; char *status; char *parse; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(dest); );
开发者ID:dlowe,项目名称:nnet,代码行数:12,
示例24: respoke_metadata_function_readstatic int respoke_metadata_function_read(struct ast_channel *chan, const char *cmd, char *data, struct ast_str **buf, ssize_t len){ char *parsed_data = ast_strdupa(data); const char *key; const struct respoke_session *session = chan ? ast_channel_tech_pvt(chan) : NULL; struct ast_json *value_json; int res = -1; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(key); );
开发者ID:respoke,项目名称:chan_respoke,代码行数:12,
示例25: bridge_exec/*! * /brief Bridge channels * /param chan * /param data channel to bridge with. * * Split data, check we aren't bridging with ourself, check valid channel, * answer call if not already, check compatible channels, setup bridge config * now bridge call, if transferred party hangs up return to PBX extension. */static int bridge_exec(struct ast_channel *chan, const char *data){ struct ast_channel *current_dest_chan; char *tmp_data = NULL; struct ast_flags opts = { 0, }; struct ast_bridge_config bconfig = { { 0, }, }; char *opt_args[OPT_ARG_ARRAY_SIZE]; struct timeval calldurationlimit = { 0, }; const char *context; const char *extension; int priority; int bridge_add_failed; struct ast_bridge_features chan_features; struct ast_bridge_features *peer_features; struct ast_bridge *bridge; struct ast_features_xfer_config *xfer_cfg; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(dest_chan); AST_APP_ARG(options); );
开发者ID:litnimax,项目名称:asterisk,代码行数:30,
示例26: festival_execstatic int festival_exec(struct ast_channel *chan, const char *vdata){ int usecache; int res = 0; struct sockaddr_in serv_addr; struct hostent *serverhost; struct ast_hostent ahp; int fd; FILE *fs; const char *host; const char *cachedir; const char *temp; const char *festivalcommand; int port = 1314; int n; char ack[4]; char *waveform; int filesize; char bigstring[MAXFESTLEN]; int i; struct MD5Context md5ctx; unsigned char MD5Res[16]; char MD5Hex[33] = ""; char koko[4] = ""; char cachefile[MAXFESTLEN]=""; int readcache = 0; int writecache = 0; int strln; int fdesc = -1; char buffer[16384]; int seekpos = 0; char *data; struct ast_config *cfg; char *newfestivalcommand; struct ast_flags config_flags = { 0 }; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(text); AST_APP_ARG(interrupt); );
开发者ID:bloddy,项目名称:Asterisk,代码行数:39,
示例27: isAnsweringMachinestatic void isAnsweringMachine(struct ast_channel *chan, const char *data){ int res = 0; struct ast_frame *f = NULL; struct ast_dsp *silenceDetector = NULL; int dspsilence = 0, framelength = 0; struct ast_format readFormat; int inInitialSilence = 1; int inGreeting = 0; int voiceDuration = 0; int silenceDuration = 0; int iTotalTime = 0; int iWordsCount = 0; int currentState = STATE_IN_WORD; int consecutiveVoiceDuration = 0; char amdCause[256] = "", amdStatus[256] = ""; char *parse = ast_strdupa(data); /* Lets set the initial values of the variables that will control the algorithm. The initial values are the default ones. If they are passed as arguments when invoking the application, then the default values will be overwritten by the ones passed as parameters. */ int initialSilence = dfltInitialSilence; int greeting = dfltGreeting; int afterGreetingSilence = dfltAfterGreetingSilence; int totalAnalysisTime = dfltTotalAnalysisTime; int minimumWordLength = dfltMinimumWordLength; int betweenWordsSilence = dfltBetweenWordsSilence; int maximumNumberOfWords = dfltMaximumNumberOfWords; int silenceThreshold = dfltSilenceThreshold; int maximumWordLength = dfltMaximumWordLength; int maxWaitTimeForFrame = dfltMaxWaitTimeForFrame; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(argInitialSilence); AST_APP_ARG(argGreeting); AST_APP_ARG(argAfterGreetingSilence); AST_APP_ARG(argTotalAnalysisTime); AST_APP_ARG(argMinimumWordLength); AST_APP_ARG(argBetweenWordsSilence); AST_APP_ARG(argMaximumNumberOfWords); AST_APP_ARG(argSilenceThreshold); AST_APP_ARG(argMaximumWordLength); );
开发者ID:mtulio,项目名称:mtulio,代码行数:44,
示例28: background_detect_execstatic int background_detect_exec(struct ast_channel *chan, const char *data){ int res = 0; char *tmp; struct ast_frame *fr; int notsilent = 0; struct timeval start = { 0, 0 }; struct timeval detection_start = { 0, 0 }; int sil = 1000; int min = 100; int max = -1; int analysistime = -1; int continue_analysis = 1; int x; struct ast_format origrformat; struct ast_dsp *dsp = NULL; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(filename); AST_APP_ARG(silence); AST_APP_ARG(min); AST_APP_ARG(max); AST_APP_ARG(analysistime); );
开发者ID:neoplacer,项目名称:gsm_asterisk,代码行数:23,
示例29: voicemail_detect_execstatic int voicemail_detect_exec(struct ast_channel *chan, void *data){ int res = 0; char *tmp; struct ast_frame *fr; int notsilent = 0; struct timeval start = { 0, 0 }; struct timeval detection_start = { 0, 0 }; int sil = 1000; int min = 100; int max = 3000; //-1 int analysistime = 5000; //-1 int continue_analysis = 1; int x; int origrformat = 0; struct ast_dsp *dsp = NULL; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(filename); AST_APP_ARG(silence); AST_APP_ARG(min); AST_APP_ARG(max); AST_APP_ARG(analysistime); );
开发者ID:cmendes0101,项目名称:asterisk-playback-voicemaildetect,代码行数:23,
注:本文中的AST_APP_ARG函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AST_APP_OPTION函数代码示例 C++ ASTRDUP函数代码示例 |