• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AST_APP_OPTION函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中AST_APP_OPTION函数的典型用法代码示例。如果您正苦于以下问题:C++ AST_APP_OPTION函数的具体用法?C++ AST_APP_OPTION怎么用?C++ AST_APP_OPTION使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AST_APP_OPTION函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: AST_APP_OPTIONS

			<xi:include xpointer="xpointer(/docs/application[@name='Macro']/description/warning[2])" />
		</description>
		<see-also>
			<ref type="application">Background</ref>
			<ref type="function">TIMEOUT</ref>
		</see-also>
	</application>
 ***/

#define BACKGROUND_SKIP		(1 << 0)
#define BACKGROUND_NOANSWER	(1 << 1)
#define BACKGROUND_MATCHEXTEN	(1 << 2)
#define BACKGROUND_PLAYBACK	(1 << 3)

AST_APP_OPTIONS(background_opts, {
	AST_APP_OPTION('s', BACKGROUND_SKIP),
	AST_APP_OPTION('n', BACKGROUND_NOANSWER),
	AST_APP_OPTION('m', BACKGROUND_MATCHEXTEN),
	AST_APP_OPTION('p', BACKGROUND_PLAYBACK),
});

#define WAITEXTEN_MOH		(1 << 0)
#define WAITEXTEN_DIALTONE	(1 << 1)

AST_APP_OPTIONS(waitexten_opts, {
	AST_APP_OPTION_ARG('m', WAITEXTEN_MOH, 0),
	AST_APP_OPTION_ARG('d', WAITEXTEN_DIALTONE, 0),
});

int pbx_builtin_raise_exception(struct ast_channel *chan, const char *reason)
{
开发者ID:coreyfarrell,项目名称:asterisk,代码行数:31,代码来源:pbx_builtins.c


示例2: AST_APP_OPTIONS

			</enumlist>
			<para>Example: exten => 1,1,Set(CDR(userfield)=test)</para>
		</description>
	</function>
 ***/

enum cdr_option_flags {
	OPT_RECURSIVE = (1 << 0),
	OPT_UNPARSED = (1 << 1),
	OPT_LAST = (1 << 2),
	OPT_SKIPLOCKED = (1 << 3),
	OPT_FLOAT = (1 << 4),
};

AST_APP_OPTIONS(cdr_func_options, {
	AST_APP_OPTION('f', OPT_FLOAT),
	AST_APP_OPTION('l', OPT_LAST),
	AST_APP_OPTION('r', OPT_RECURSIVE),
	AST_APP_OPTION('s', OPT_SKIPLOCKED),
	AST_APP_OPTION('u', OPT_UNPARSED),
});

static int cdr_read(struct ast_channel *chan, const char *cmd, char *parse,
		    char *buf, size_t len)
{
	char *ret;
	struct ast_flags flags = { 0 };
	struct ast_cdr *cdr = chan ? chan->cdr : NULL;
	AST_DECLARE_APP_ARGS(args,
			     AST_APP_ARG(variable);
			     AST_APP_ARG(options);
开发者ID:neoplacer,项目名称:gsm_asterisk,代码行数:31,代码来源:func_cdr.c


示例3: AST_APP_OPTIONS

	OPT_ENDCDR =            (1 << 3),
	OPT_NORESET =           (1 << 4),
	OPT_KEEPVARS =          (1 << 5),
	OPT_VARSET =            (1 << 6),
	OPT_ANSLOCK =           (1 << 7),
	OPT_DONTOUCH =          (1 << 8),
};

enum {
	OPT_ARG_VARSET = 0,
	/* note: this entry _MUST_ be the last one in the enum */
	OPT_ARG_ARRAY_SIZE,
};

AST_APP_OPTIONS(forkcdr_exec_options, {
	AST_APP_OPTION('a', OPT_SETANS),
	AST_APP_OPTION('A', OPT_ANSLOCK),
	AST_APP_OPTION('d', OPT_SETDISP),
	AST_APP_OPTION('D', OPT_RESETDEST),
	AST_APP_OPTION('e', OPT_ENDCDR),
	AST_APP_OPTION('R', OPT_NORESET),
	AST_APP_OPTION_ARG('s', OPT_VARSET, OPT_ARG_VARSET),
	AST_APP_OPTION('T', OPT_DONTOUCH),
	AST_APP_OPTION('v', OPT_KEEPVARS),
});

static void ast_cdr_fork(struct ast_channel *chan, struct ast_flags optflags, char *set) 
{
	struct ast_cdr *cdr;
	struct ast_cdr *newcdr;
	struct ast_flags flags = { AST_CDR_FLAG_KEEP_VARS };
开发者ID:carlosdelfino,项目名称:WorkshopTelefoniaAutomacao,代码行数:31,代码来源:app_forkcdr.c


示例4: find_by_part

	target = find_by_part(chan, part);
	if (target) {
		res = ast_do_pickup(chan, target);
		ast_channel_unlock(target);
		target = ast_channel_unref(target);
	}

	return res;
}

enum OPT_PICKUPCHAN_FLAGS {
	OPT_PICKUPCHAN_PARTIAL =   (1 << 0),	/* Channel name is a partial name. */
};

AST_APP_OPTIONS(pickupchan_opts, BEGIN_OPTIONS
	AST_APP_OPTION('p', OPT_PICKUPCHAN_PARTIAL),
END_OPTIONS);

/* application entry point for PickupChan() */
static int pickupchan_exec(struct ast_channel *chan, const char *data)
{
	char *pickup = NULL;
	char *parse = ast_strdupa(data);
	AST_DECLARE_APP_ARGS(args,
		AST_APP_ARG(channel);
		AST_APP_ARG(options);
		AST_APP_ARG(other);	/* Any remining unused arguments */
	);
	struct ast_flags opts;

	AST_STANDARD_APP_ARGS(args, parse);
开发者ID:TheSeanBrady,项目名称:crtc.bcs.versa,代码行数:31,代码来源:app_directed_pickup.c


示例5: AST_LIST_ENTRY

struct directory_item {
	char exten[AST_MAX_EXTENSION + 1];
	char name[AST_MAX_EXTENSION + 1];
	char context[AST_MAX_CONTEXT + 1];
	char key[50]; /* Text to order items. Either lastname+firstname or firstname+lastname */

	AST_LIST_ENTRY(directory_item) entry;
};

AST_APP_OPTIONS(directory_app_options, {
	AST_APP_OPTION_ARG('f', OPT_LISTBYFIRSTNAME, OPT_ARG_FIRSTNAME),
	AST_APP_OPTION_ARG('l', OPT_LISTBYLASTNAME, OPT_ARG_LASTNAME),
	AST_APP_OPTION_ARG('b', OPT_LISTBYEITHER, OPT_ARG_EITHER),
	AST_APP_OPTION_ARG('p', OPT_PAUSE, OPT_ARG_PAUSE),
	AST_APP_OPTION('e', OPT_SAYEXTENSION),
	AST_APP_OPTION('v', OPT_FROMVOICEMAIL),
	AST_APP_OPTION('m', OPT_SELECTFROMMENU),
	AST_APP_OPTION('n', OPT_NOANSWER),
	AST_APP_OPTION('a', OPT_ALIAS),
});

static int compare(const char *text, const char *template)
{
	char digit;

	if (ast_strlen_zero(text)) {
		return -1;
	}

	while (*template) {
开发者ID:edvinanet,项目名称:asterisk,代码行数:30,代码来源:app_directory.c


示例6: AST_APP_OPTIONS

enum {
	MON_FLAG_BRIDGED =  (1 << 0),
	MON_FLAG_MIX =      (1 << 1),
	MON_FLAG_DROP_IN =  (1 << 2),
	MON_FLAG_DROP_OUT = (1 << 3),
	MON_FLAG_BEEP =     (1 << 4),
};

enum {
	OPT_ARG_BEEP_INTERVAL,
	OPT_ARG_ARRAY_SIZE,	/* Always last element of the enum */
};

AST_APP_OPTIONS(monitor_opts, {
	AST_APP_OPTION('b', MON_FLAG_BRIDGED),
	AST_APP_OPTION('m', MON_FLAG_MIX),
	AST_APP_OPTION('i', MON_FLAG_DROP_IN),
	AST_APP_OPTION('o', MON_FLAG_DROP_OUT),
	AST_APP_OPTION_ARG('B', MON_FLAG_BEEP, OPT_ARG_BEEP_INTERVAL),
});

/*!
 * \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)
{
开发者ID:adaptiman,项目名称:asterisk,代码行数:30,代码来源:res_monitor.c


示例7: AST_APP_OPTIONS

			</variablelist>
		</description>
		<see-also>
			<ref type="application">SendDTMF</ref>
		</see-also>
	</application>
 ***/

enum {
	OPT_SKIP = (1 << 0),
	OPT_INDICATION = (1 << 1),
	OPT_NOANSWER = (1 << 2),
} read_option_flags;

AST_APP_OPTIONS(read_app_options, {
	AST_APP_OPTION('s', OPT_SKIP),
	AST_APP_OPTION('i', OPT_INDICATION),
	AST_APP_OPTION('n', OPT_NOANSWER),
});

static char *app = "Read";

#define ast_next_data(instr,ptr,delim) if((ptr=strchr(instr,delim))) { *(ptr) = '\0' ; ptr++;}

static int read_exec(struct ast_channel *chan, void *data)
{
	int res = 0;
	char tmp[256] = "";
	int maxdigits = 255;
	int tries = 1, to = 0, x = 0;
	double tosec;
开发者ID:boylubis,项目名称:ctsoft,代码行数:31,代码来源:app_read.c


示例8: AST_APP_OPTIONS

			<para>Causes the Call Data Record engine to fork a new CDR starting
			from the time the application is executed. The forked CDR will be
			linked to the end of the CDRs associated with the channel.</para>
		</description>
		<see-also>
			<ref type="function">CDR</ref>
			<ref type="application">NoCDR</ref>
			<ref type="application">ResetCDR</ref>
		</see-also>
	</application>
 ***/

static char *app = "ForkCDR";

AST_APP_OPTIONS(forkcdr_exec_options, {
	AST_APP_OPTION('a', AST_CDR_FLAG_SET_ANSWER),
	AST_APP_OPTION('e', AST_CDR_FLAG_FINALIZE),
	AST_APP_OPTION('r', AST_CDR_FLAG_RESET),
	AST_APP_OPTION('v', AST_CDR_FLAG_KEEP_VARS),
});

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);
	);

	parse = ast_strdupa(data);
开发者ID:aderbas,项目名称:asterisk,代码行数:30,代码来源:app_forkcdr.c


示例9: AST_APP_OPTIONS

	OPT_CALLEE_PARK = (1 << 9),
	OPT_CALLER_PARK = (1 << 10),
	OPT_CALLEE_KILL = (1 << 11),
	OPT_CALLEE_GO_ON = (1 << 12),
};

enum {
	OPT_ARG_DURATION_LIMIT = 0,
	OPT_ARG_DURATION_STOP,
	OPT_ARG_CALLEE_GO_ON,
	/* note: this entry _MUST_ be the last one in the enum */
	OPT_ARG_ARRAY_SIZE,
};

AST_APP_OPTIONS(bridge_exec_options, BEGIN_OPTIONS
	AST_APP_OPTION('p', BRIDGE_OPT_PLAYTONE),
	AST_APP_OPTION_ARG('F', OPT_CALLEE_GO_ON, OPT_ARG_CALLEE_GO_ON),
	AST_APP_OPTION('h', OPT_CALLEE_HANGUP),
	AST_APP_OPTION('H', OPT_CALLER_HANGUP),
	AST_APP_OPTION('k', OPT_CALLEE_PARK),
	AST_APP_OPTION('K', OPT_CALLER_PARK),
	AST_APP_OPTION_ARG('L', OPT_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
	AST_APP_OPTION_ARG('S', OPT_DURATION_STOP, OPT_ARG_DURATION_STOP),
	AST_APP_OPTION('t', OPT_CALLEE_TRANSFER),
	AST_APP_OPTION('T', OPT_CALLER_TRANSFER),
	AST_APP_OPTION('w', OPT_CALLEE_MONITOR),
	AST_APP_OPTION('W', OPT_CALLER_MONITOR),
	AST_APP_OPTION('x', OPT_CALLEE_KILL),
END_OPTIONS );

int ast_bridge_timelimit(struct ast_channel *chan, struct ast_bridge_config *config,
开发者ID:litnimax,项目名称:asterisk,代码行数:31,代码来源:features.c


示例10: AST_APP_OPTIONS

	OPTION_PRIVATE   = (1 << 6),    /* Private Whisper mode */
	OPTION_READONLY  = (1 << 7),    /* Don't mix the two channels */
	OPTION_EXIT      = (1 << 8),    /* Exit to a valid single digit extension */
	OPTION_ENFORCED  = (1 << 9),    /* Enforced mode */
} chanspy_opt_flags;

enum {
	OPT_ARG_VOLUME = 0,
	OPT_ARG_GROUP,
	OPT_ARG_RECORD,
	OPT_ARG_ENFORCED,
	OPT_ARG_ARRAY_SIZE,
} chanspy_opt_args;

AST_APP_OPTIONS(spy_opts, {
	AST_APP_OPTION('q', OPTION_QUIET),
	AST_APP_OPTION('b', OPTION_BRIDGED),
	AST_APP_OPTION('w', OPTION_WHISPER),
	AST_APP_OPTION('W', OPTION_PRIVATE),
	AST_APP_OPTION_ARG('v', OPTION_VOLUME, OPT_ARG_VOLUME),
	AST_APP_OPTION_ARG('g', OPTION_GROUP, OPT_ARG_GROUP),
	AST_APP_OPTION_ARG('r', OPTION_RECORD, OPT_ARG_RECORD),
	AST_APP_OPTION_ARG('e', OPTION_ENFORCED, OPT_ARG_ENFORCED),
	AST_APP_OPTION('o', OPTION_READONLY),
	AST_APP_OPTION('X', OPTION_EXIT),
});

static int next_unique_id_to_use = 0;

struct chanspy_translation_helper {
	/* spy data */
开发者ID:nicwolff,项目名称:asterisk-agi-mp3,代码行数:31,代码来源:app_chanspy.c


示例11: AST_APP_OPTIONS

enum {
	OPTION_A = (1 << 0),
	OPTION_B = (1 << 1),
	OPTION_C = (1 << 2),
} option_flags;

enum {
	OPTION_ARG_B = 0,
	OPTION_ARG_C = 1,
	/* This *must* be the last value in this enum! */
	OPTION_ARG_ARRAY_SIZE = 2,
} option_args;

AST_APP_OPTIONS(app_opts,{
	AST_APP_OPTION('a', OPTION_A),
	AST_APP_OPTION_ARG('b', OPTION_B, OPTION_ARG_B),
	AST_APP_OPTION_ARG('c', OPTION_C, OPTION_ARG_C),
});

LOCAL_USER_DECL;

static int app_exec(struct ast_channel *chan, void *data)
{
	int res = 0;
	struct ast_flags flags;
	struct localuser *u;
	char *parse, *opts[OPTION_ARG_ARRAY_SIZE];
	AST_DECLARE_APP_ARGS(args,
		AST_APP_ARG(dummy);
		AST_APP_ARG(options);
开发者ID:BackupTheBerlios,项目名称:solid-pbx-svn,代码行数:30,代码来源:app_skel.c


示例12: file

"  Places outbound calls to the given technology / resource and dumps\n"
"them into a conference bridge as muted participants.  The original\n"
"caller is dumped into the conference as a speaker and the room is\n"
"destroyed when the original caller leaves.  Valid options are:\n"
"        d - full duplex audio\n"
"        q - quiet, do not play beep to caller\n"
"        r - record the page into a file (see 'r' for app_meetme)\n";

enum {
	PAGE_DUPLEX = (1 << 0),
	PAGE_QUIET = (1 << 1),
	PAGE_RECORD = (1 << 2),
} page_opt_flags;

AST_APP_OPTIONS(page_opts, {
	AST_APP_OPTION('d', PAGE_DUPLEX),
	AST_APP_OPTION('q', PAGE_QUIET),
	AST_APP_OPTION('r', PAGE_RECORD),
});

#define MAX_DIALS 128

static int page_exec(struct ast_channel *chan, void *data)
{
	struct ast_module_user *u;
	char *options, *tech, *resource, *tmp;
	char meetmeopts[88], originator[AST_CHANNEL_NAME];
	struct ast_flags flags = { 0 };
	unsigned int confid = ast_random();
	struct ast_app *app;
	int res = 0, pos = 0, i = 0;
开发者ID:OPSF,项目名称:uClinux,代码行数:31,代码来源:app_page.c


示例13: AST_APP_OPTIONS

	OPTION_QUIET	 = (1 << 0),	/* Quiet, no announcement */
	OPTION_BRIDGED   = (1 << 1),	/* Only look at bridged calls */
	OPTION_VOLUME    = (1 << 2),	/* Specify initial volume */
	OPTION_GROUP     = (1 << 3),	/* Only look at channels in group */
	OPTION_RECORD    = (1 << 4),	/* Record */
} chanspy_opt_flags;

enum {
	OPT_ARG_VOLUME = 0,
	OPT_ARG_GROUP,
	OPT_ARG_RECORD,
	OPT_ARG_ARRAY_SIZE,
} chanspy_opt_args;

AST_APP_OPTIONS(chanspy_opts, {
	AST_APP_OPTION('q', OPTION_QUIET),
	AST_APP_OPTION('b', OPTION_BRIDGED),
	AST_APP_OPTION_ARG('v', OPTION_VOLUME, OPT_ARG_VOLUME),
	AST_APP_OPTION_ARG('g', OPTION_GROUP, OPT_ARG_GROUP),
	AST_APP_OPTION_ARG('r', OPTION_RECORD, OPT_ARG_RECORD),
});

STANDARD_LOCAL_USER;
LOCAL_USER_DECL;

struct chanspy_translation_helper {
	/* spy data */
	struct ast_channel_spy spy;
	int fd;
	int volfactor;
};
开发者ID:tpenguin,项目名称:solarisvoip-asterisk,代码行数:31,代码来源:app_chanspy.c


示例14: AST_APP_OPTIONS

	OPTION_VOLUME    = (1 << 2),	/* Specify initial volume */
	OPTION_GROUP     = (1 << 3),	/* Only look at channels in group */
	OPTION_RECORD    = (1 << 4),
	OPTION_WHISPER	 = (1 << 5),
	OPTION_PRIVATE   = (1 << 6),	/* Private Whisper mode */
} chanspy_opt_flags;

enum {
	OPT_ARG_VOLUME = 0,
	OPT_ARG_GROUP,
	OPT_ARG_RECORD,
	OPT_ARG_ARRAY_SIZE,
} chanspy_opt_args;

AST_APP_OPTIONS(spy_opts, {
	AST_APP_OPTION('q', OPTION_QUIET),
	AST_APP_OPTION('b', OPTION_BRIDGED),
	AST_APP_OPTION('w', OPTION_WHISPER),
	AST_APP_OPTION('W', OPTION_PRIVATE),
	AST_APP_OPTION_ARG('v', OPTION_VOLUME, OPT_ARG_VOLUME),
	AST_APP_OPTION_ARG('g', OPTION_GROUP, OPT_ARG_GROUP),
	AST_APP_OPTION_ARG('r', OPTION_RECORD, OPT_ARG_RECORD),
});

static int next_unique_id_to_use = 0;

struct chanspy_translation_helper {
	/* spy data */
	struct ast_audiohook spy_audiohook;
	struct ast_audiohook whisper_audiohook;
	int fd;
开发者ID:pjalbrecht,项目名称:asterisk,代码行数:31,代码来源:app_chanspy.c


示例15: AST_APP_OPTIONS

#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/cdr.h"

enum {
	OPT_RECURSIVE = (1 << 0),
	OPT_UNPARSED = (1 << 1),
	OPT_LAST = (1 << 2),
} cdr_option_flags;

AST_APP_OPTIONS(cdr_func_options, {
	AST_APP_OPTION('l', OPT_LAST),
	AST_APP_OPTION('r', OPT_RECURSIVE),
	AST_APP_OPTION('u', OPT_UNPARSED),
});

static int cdr_read(struct ast_channel *chan, char *cmd, char *parse,
		    char *buf, size_t len)
{
	char *ret;
	struct ast_flags flags = { 0 };
	struct ast_cdr *cdr = chan ? chan->cdr : NULL;
	AST_DECLARE_APP_ARGS(args,
			     AST_APP_ARG(variable);
			     AST_APP_ARG(options);
	);
开发者ID:OPSF,项目名称:uClinux,代码行数:30,代码来源:func_cdr.c


示例16: AST_APP_OPTIONS

	PAGE_DUPLEX = (1 << 0),
	PAGE_QUIET = (1 << 1),
	PAGE_RECORD = (1 << 2),
	PAGE_SKIP = (1 << 3),
	PAGE_IGNORE_FORWARDS = (1 << 4),
	PAGE_ANNOUNCE = (1 << 5),
	PAGE_NOCALLERANNOUNCE = (1 << 6),
};

enum {
	OPT_ARG_ANNOUNCE = 0,
	OPT_ARG_ARRAY_SIZE = 1,
};

AST_APP_OPTIONS(page_opts, {
	AST_APP_OPTION('d', PAGE_DUPLEX),
	AST_APP_OPTION('q', PAGE_QUIET),
	AST_APP_OPTION('r', PAGE_RECORD),
	AST_APP_OPTION('s', PAGE_SKIP),
	AST_APP_OPTION('i', PAGE_IGNORE_FORWARDS),
	AST_APP_OPTION_ARG('A', PAGE_ANNOUNCE, OPT_ARG_ANNOUNCE),
	AST_APP_OPTION('n', PAGE_NOCALLERANNOUNCE),
});

/* We use this structure as a way to pass this to all dialed channels */
struct page_options {
	char *opts[OPT_ARG_ARRAY_SIZE];
	struct ast_flags flags;
};

static void page_state_callback(struct ast_dial *dial)
开发者ID:bugrahantopall,项目名称:asterisk,代码行数:31,代码来源:app_page.c


示例17: AST_APP_OPTIONS

enum park_args {
	OPT_ARG_COMEBACK,
	OPT_ARG_TIMEOUT,
	OPT_ARG_ARRAY_SIZE /* Always the last element of the enum */
};

enum park_flags {
	MUXFLAG_RINGING = (1 << 0),
	MUXFLAG_RANDOMIZE = (1 << 1),
	MUXFLAG_NOANNOUNCE = (1 << 2),
	MUXFLAG_COMEBACK_OVERRIDE = (1 << 3),
	MUXFLAG_TIMEOUT_OVERRIDE = (1 << 4),
};

AST_APP_OPTIONS(park_opts, {
	AST_APP_OPTION('r', MUXFLAG_RINGING),
	AST_APP_OPTION('R', MUXFLAG_RANDOMIZE),
	AST_APP_OPTION('s', MUXFLAG_NOANNOUNCE),
	AST_APP_OPTION_ARG('c', MUXFLAG_COMEBACK_OVERRIDE, OPT_ARG_COMEBACK),
	AST_APP_OPTION_ARG('t', MUXFLAG_TIMEOUT_OVERRIDE, OPT_ARG_TIMEOUT),
});

static int apply_option_timeout (int *var, char *timeout_arg)
{
	if (ast_strlen_zero(timeout_arg)) {
		ast_log(LOG_ERROR, "No duration value provided for the timeout ('t') option.\n");
		return -1;
	}

	if (sscanf(timeout_arg, "%d", var) != 1 || *var < 0) {
		ast_log(LOG_ERROR, "Duration value provided for timeout ('t') option must be 0 or greater.\n");
开发者ID:auntieNeo,项目名称:asterisk,代码行数:31,代码来源:parking_applications.c


示例18: AST_APP_OPTIONS

#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
#include "asterisk/astdb.h"
#include "asterisk/utils.h"

enum {
	OPT_ACCOUNT = (1 << 0),
	OPT_DATABASE = (1 << 1),
	OPT_MULTIPLE = (1 << 3),
	OPT_REMOVE = (1 << 4),
};

AST_APP_OPTIONS(auth_app_options, {
	AST_APP_OPTION('a', OPT_ACCOUNT),
	AST_APP_OPTION('d', OPT_DATABASE),
	AST_APP_OPTION('m', OPT_MULTIPLE),
	AST_APP_OPTION('r', OPT_REMOVE),
});


static const char app[] = "Authenticate";
/*** DOCUMENTATION
	<application name="Authenticate" language="en_US">
		<synopsis>
			Authenticate a user
		</synopsis>
		<syntax>
			<parameter name="password" required="true">
				<para>Password the user should know</para>
开发者ID:Evangileon,项目名称:asterisk,代码行数:31,代码来源:app_authenticate.c


示例19: AST_APP_OPTIONS

			<ref type="function">CDR_PROP</ref>
		</see-also>
	</application>
 ***/

static const char nocdr_app[] = "NoCDR";
static const char resetcdr_app[] = "ResetCDR";

enum reset_cdr_options {
	OPT_DISABLE_DISPATCH = (1 << 0),
	OPT_KEEP_VARS = (1 << 1),
	OPT_ENABLE = (1 << 2),
};

AST_APP_OPTIONS(resetcdr_opts, {
	AST_APP_OPTION('v', AST_CDR_FLAG_KEEP_VARS),
	AST_APP_OPTION('e', AST_CDR_FLAG_DISABLE_ALL),
});

STASIS_MESSAGE_TYPE_DEFN_LOCAL(appcdr_message_type);

/*! \internal \brief Payload for the Stasis message sent to manipulate a CDR */
struct app_cdr_message_payload {
	/*! The name of the channel to be manipulated */
	const char *channel_name;
	/*! Disable the CDR for this channel */
	int disable:1;
	/*! Re-enable the CDR for this channel */
	int reenable:1;
	/*! Reset the CDR */
	int reset:1;
开发者ID:huangjingpei,项目名称:asterisk,代码行数:31,代码来源:app_cdr.c


示例20: AST_APP_OPTIONS

	MUXFLAG_COMBINED = (1 << 8),
        MUXFLAG_UID = (1 << 9),
};

enum mixmonitor_args {
	OPT_ARG_READVOLUME = 0,
	OPT_ARG_WRITEVOLUME,
	OPT_ARG_VOLUME,
	OPT_ARG_WRITENAME,
	OPT_ARG_READNAME,
        OPT_ARG_UID,
	OPT_ARG_ARRAY_SIZE,	/* Always last element of the enum */
};

AST_APP_OPTIONS(mixmonitor_opts, {
	AST_APP_OPTION('a', MUXFLAG_APPEND),
	AST_APP_OPTION('b', MUXFLAG_BRIDGED),
	AST_APP_OPTION_ARG('v', MUXFLAG_READVOLUME, OPT_ARG_READVOLUME),
	AST_APP_OPTION_ARG('V', MUXFLAG_WRITEVOLUME, OPT_ARG_WRITEVOLUME),
	AST_APP_OPTION_ARG('W', MUXFLAG_VOLUME, OPT_ARG_VOLUME),
	AST_APP_OPTION_ARG('r', MUXFLAG_READ, OPT_ARG_READNAME),
	AST_APP_OPTION_ARG('t', MUXFLAG_WRITE, OPT_ARG_WRITENAME),
	AST_APP_OPTION_ARG('i', MUXFLAG_UID, OPT_ARG_UID),
});

struct mixmonitor_ds {
	unsigned int destruction_ok;
	ast_cond_t destruction_condition;
	ast_mutex_t lock;

	/* The filestream is held in the datastore so it can be stopped
开发者ID:bugrahantopall,项目名称:asterisk,代码行数:31,代码来源:app_mixmonitor.c



注:本文中的AST_APP_OPTION函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ASWGameRules函数代码示例发布时间:2022-05-30
下一篇:
C++ AST_APP_ARG函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap