mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Asterisk -- An open source telephony toolkit.
|
||||
#
|
||||
#
|
||||
# Makefile for dialplan functions
|
||||
#
|
||||
# Copyright (C) 2005-2006, Digium, Inc.
|
||||
|
||||
@@ -87,4 +87,3 @@ static int load_module(void)
|
||||
}
|
||||
}
|
||||
AST_MODULE_INFO_STANDARD_DEPRECATED(ASTERISK_GPL_KEY, "Audiohook inheritance placeholder function");
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/*! \file
|
||||
*
|
||||
* \brief Use the base64 as functions
|
||||
*
|
||||
*
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \author Mark Spencer <markster@digium.com>
|
||||
*
|
||||
* \ingroup functions
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*
|
||||
* \author Russell Bryant <russell@digium.com>
|
||||
* \author Tilghman Lesher <func_config__200803@the-tilghman.com>
|
||||
*
|
||||
*
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
@@ -105,7 +105,7 @@ static int config_function_read(struct ast_channel *chan, const char *cmd, char
|
||||
ast_log(LOG_ERROR, "AST_CONFIG() requires a category\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if (ast_strlen_zero(args.variable)) {
|
||||
ast_log(LOG_ERROR, "AST_CONFIG() requires a variable\n");
|
||||
return -1;
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
*/
|
||||
|
||||
/*! \file
|
||||
*
|
||||
*
|
||||
* \brief Curl - Load a URL
|
||||
*
|
||||
* \author Tilghman Lesher <curl-20050919@the-tilghman.com>
|
||||
*
|
||||
* \note Brian Wilkins <bwilkins@cfl.rr.com> (Added POST option)
|
||||
* \note Brian Wilkins <bwilkins@cfl.rr.com> (Added POST option)
|
||||
*
|
||||
* \extref Depends on the CURL library - http://curl.haxx.se/
|
||||
*
|
||||
*
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
|
||||
/*** MODULEINFO
|
||||
<depend>curl</depend>
|
||||
<support_level>core</support_level>
|
||||
@@ -941,4 +941,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Load external URL",
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_REALTIME_DEPEND2,
|
||||
);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/*! \file
|
||||
*
|
||||
*
|
||||
* \brief CUT function
|
||||
*
|
||||
* \author Tilghman Lesher <app_cut__v003@the-tilghman.com>
|
||||
@@ -39,7 +39,7 @@
|
||||
/*** DOCUMENTATION
|
||||
<function name="SORT" language="en_US">
|
||||
<synopsis>
|
||||
Sorts a list of key/vals into a list of keys, based upon the vals.
|
||||
Sorts a list of key/vals into a list of keys, based upon the vals.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="keyval" required="true" argsep=":">
|
||||
@@ -59,7 +59,7 @@
|
||||
</function>
|
||||
<function name="CUT" language="en_US">
|
||||
<synopsis>
|
||||
Slices and dices strings, based upon a named delimiter.
|
||||
Slices and dices strings, based upon a named delimiter.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="varname" required="true">
|
||||
@@ -75,7 +75,7 @@
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Cut out information from a string (<replaceable>varname</replaceable>), based upon a named delimiter.</para>
|
||||
</description>
|
||||
</description>
|
||||
</function>
|
||||
***/
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* Copyright (C) 2005-2006, Russell Bryant <russelb@clemson.edu>
|
||||
* Copyright (C) 2005-2006, Russell Bryant <russelb@clemson.edu>
|
||||
*
|
||||
* func_db.c adapted from the old app_db.c, copyright by the following people
|
||||
* func_db.c adapted from the old app_db.c, copyright by the following people
|
||||
* Copyright (C) 2005, Mark Spencer <markster@digium.com>
|
||||
* Copyright (C) 2003, Jefferson Noxon <jeff@debian.org>
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2007, Digium, Inc.
|
||||
*
|
||||
* Russell Bryant <russell@digium.com>
|
||||
* Russell Bryant <russell@digium.com>
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
* the Asterisk project. Please do not directly contact
|
||||
@@ -20,7 +20,7 @@
|
||||
*
|
||||
* \brief Manually controlled blinky lights
|
||||
*
|
||||
* \author Russell Bryant <russell@digium.com>
|
||||
* \author Russell Bryant <russell@digium.com>
|
||||
*
|
||||
* \ingroup functions
|
||||
*
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*
|
||||
* \author Gregory Nietsky AKA irroot <gregory@networksentry.co.za>
|
||||
* \author Russell Bryant <russell@digium.com>
|
||||
*
|
||||
*
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<parameter name="resultnum" required="true">
|
||||
<para>The number of the result that you want to retrieve.</para>
|
||||
<para>Results start at <literal>1</literal>. If this argument is specified
|
||||
as <literal>getnum</literal>, then it will return the total number of results
|
||||
as <literal>getnum</literal>, then it will return the total number of results
|
||||
that are available or -1 on error.</para>
|
||||
</parameter>
|
||||
</syntax>
|
||||
@@ -87,7 +87,7 @@
|
||||
<para>This function will retrieve results from a previous use
|
||||
of the ENUMQUERY function.</para>
|
||||
</description>
|
||||
</function>
|
||||
</function>
|
||||
<function name="ENUMLOOKUP" language="en_US">
|
||||
<synopsis>
|
||||
General or specific querying of NAPTR records for ENUM or ENUM-like DNS pointers.
|
||||
@@ -117,10 +117,10 @@
|
||||
<option name="d">
|
||||
<para>for a direct DNS lookup without any flipping of digits.</para>
|
||||
</option>
|
||||
</optionlist>
|
||||
</optionlist>
|
||||
</parameter>
|
||||
<parameter name="record#">
|
||||
<para>If no <replaceable>record#</replaceable> is given,
|
||||
<para>If no <replaceable>record#</replaceable> is given,
|
||||
defaults to <literal>1</literal>.</para>
|
||||
</parameter>
|
||||
<parameter name="zone-suffix">
|
||||
@@ -224,7 +224,7 @@ struct enum_result_datastore {
|
||||
unsigned int id;
|
||||
};
|
||||
|
||||
static void erds_destroy(struct enum_result_datastore *data)
|
||||
static void erds_destroy(struct enum_result_datastore *data)
|
||||
{
|
||||
int k;
|
||||
|
||||
@@ -238,7 +238,7 @@ static void erds_destroy(struct enum_result_datastore *data)
|
||||
ast_free(data);
|
||||
}
|
||||
|
||||
static void erds_destroy_cb(void *data)
|
||||
static void erds_destroy_cb(void *data)
|
||||
{
|
||||
struct enum_result_datastore *erds = data;
|
||||
erds_destroy(erds);
|
||||
@@ -247,7 +247,7 @@ static void erds_destroy_cb(void *data)
|
||||
static const struct ast_datastore_info enum_result_datastore_info = {
|
||||
.type = "ENUMQUERY",
|
||||
.destroy = erds_destroy_cb,
|
||||
};
|
||||
};
|
||||
|
||||
static int enum_query_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
|
||||
{
|
||||
@@ -268,7 +268,7 @@ static int enum_query_read(struct ast_channel *chan, const char *cmd, char *data
|
||||
}
|
||||
|
||||
parse = ast_strdupa(data);
|
||||
|
||||
|
||||
AST_STANDARD_APP_ARGS(args, parse);
|
||||
|
||||
if (!chan) {
|
||||
@@ -306,9 +306,9 @@ static int enum_query_read(struct ast_channel *chan, const char *cmd, char *data
|
||||
ast_channel_lock(chan);
|
||||
ast_channel_datastore_add(chan, datastore);
|
||||
ast_channel_unlock(chan);
|
||||
|
||||
|
||||
res = 0;
|
||||
|
||||
|
||||
finish:
|
||||
|
||||
return res;
|
||||
@@ -321,7 +321,7 @@ static int enum_result_read(struct ast_channel *chan, const char *cmd, char *dat
|
||||
char *parse, *p;
|
||||
unsigned int num;
|
||||
int res = -1, k;
|
||||
AST_DECLARE_APP_ARGS(args,
|
||||
AST_DECLARE_APP_ARGS(args,
|
||||
AST_APP_ARG(id);
|
||||
AST_APP_ARG(resultnum);
|
||||
);
|
||||
@@ -335,7 +335,7 @@ static int enum_result_read(struct ast_channel *chan, const char *cmd, char *dat
|
||||
ast_log(LOG_ERROR, "ENUMRESULT can not be used without a channel!\n");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
||||
parse = ast_strdupa(data);
|
||||
|
||||
AST_STANDARD_APP_ARGS(args, parse);
|
||||
@@ -381,7 +381,7 @@ static int enum_result_read(struct ast_channel *chan, const char *cmd, char *dat
|
||||
continue;
|
||||
|
||||
p = strchr(erds->context->naptr_rrs[k].result, ':');
|
||||
|
||||
|
||||
if (p && strcasecmp(erds->context->naptr_rrs[k].tech, "ALL"))
|
||||
ast_copy_string(buf, p + 1, len);
|
||||
else
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2007, Digium, Inc.
|
||||
*
|
||||
* Modified from func_devstate.c by Russell Bryant <russell@digium.com>
|
||||
* Modified from func_devstate.c by Russell Bryant <russell@digium.com>
|
||||
* Adam Gundy <adam@starsilk.net>
|
||||
|
||||
* See http://www.asterisk.org for more information about
|
||||
@@ -21,7 +21,7 @@
|
||||
*
|
||||
* \brief Get the state of a hinted extension for dialplan control
|
||||
*
|
||||
* \author Adam Gundy <adam@starsilk.net>
|
||||
* \author Adam Gundy <adam@starsilk.net>
|
||||
*
|
||||
* \ingroup functions
|
||||
*/
|
||||
@@ -42,7 +42,7 @@
|
||||
<function name="EXTENSION_STATE" language="en_US">
|
||||
<synopsis>
|
||||
Get an extension's state.
|
||||
</synopsis>
|
||||
</synopsis>
|
||||
<syntax argsep="@">
|
||||
<parameter name="extension" required="true" />
|
||||
<parameter name="context">
|
||||
@@ -115,7 +115,7 @@ static int extstate_read(struct ast_channel *chan, const char *cmd, char *data,
|
||||
return -1;
|
||||
}
|
||||
|
||||
ast_copy_string(buf,
|
||||
ast_copy_string(buf,
|
||||
ast_extstate_str(ast_extension_state(chan, context, exten)), len);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -439,5 +439,3 @@ static int load_module(void)
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Frame Trace for internal ast_frame debugging.");
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<para>Implements a shared variable area, in which you may share variables between
|
||||
channels.</para>
|
||||
<para>The variables used in this space are separate from the general namespace of
|
||||
the channel and thus <variable>SHARED(foo)</variable> and <variable>foo</variable>
|
||||
the channel and thus <variable>SHARED(foo)</variable> and <variable>foo</variable>
|
||||
represent two completely different variables, despite sharing the same name.</para>
|
||||
<para>Finally, realize that there is an inherent race between channels operating
|
||||
at the same time, fiddling with each others' internal variables, which is why
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/*! \file
|
||||
*
|
||||
* \brief Channel group related dialplan functions
|
||||
*
|
||||
*
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</parameter>
|
||||
</syntax>
|
||||
<description>
|
||||
<para><replaceable>category</replaceable> can be employed for more fine grained group management. Each channel
|
||||
<para><replaceable>category</replaceable> can be employed for more fine grained group management. Each channel
|
||||
can only be member of exactly one group per <replaceable>category</replaceable>.</para>
|
||||
</description>
|
||||
</function>
|
||||
@@ -193,14 +193,14 @@ static int group_function_read(struct ast_channel *chan, const char *cmd,
|
||||
if (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, data))
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (gi) {
|
||||
ast_copy_string(buf, gi->group, len);
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
|
||||
ast_app_group_list_unlock();
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ static int group_list_function_read(struct ast_channel *chan, const char *cmd,
|
||||
snprintf(tmp1, sizeof(tmp1), "%s", gi->group);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ast_app_group_list_unlock();
|
||||
|
||||
ast_copy_string(buf, tmp1, len);
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/*** DOCUMENTATION
|
||||
<function name="ICONV" language="en_US">
|
||||
<synopsis>
|
||||
Converts charsets of strings.
|
||||
Converts charsets of strings.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="in-charset" required="true">
|
||||
@@ -66,10 +66,10 @@
|
||||
***/
|
||||
|
||||
|
||||
/*!
|
||||
/*!
|
||||
* Some systems define the second arg to iconv() as (const char *),
|
||||
* while others define it as (char *). Cast it to a (void *) to
|
||||
* suppress compiler warnings about it.
|
||||
* while others define it as (char *). Cast it to a (void *) to
|
||||
* suppress compiler warnings about it.
|
||||
*/
|
||||
#define AST_ICONV_CAST void *
|
||||
|
||||
@@ -141,4 +141,3 @@ static int load_module(void)
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Charset conversions");
|
||||
|
||||
|
||||
@@ -179,4 +179,3 @@ static int load_module(void)
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Jitter buffer for read side of channel.");
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \author Tilghman Lesher <func_lock_2007@the-tilghman.com>
|
||||
*
|
||||
* \ingroup functions
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
@@ -73,7 +73,7 @@
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Attempts to grab a named lock exclusively, and prevents other channels
|
||||
from obtaining the same lock. Returns <literal>1</literal> if the lock was
|
||||
from obtaining the same lock. Returns <literal>1</literal> if the lock was
|
||||
available or <literal>0</literal> otherwise.</para>
|
||||
<note>
|
||||
<para>If <literal>live_dangerously</literal> in <literal>asterisk.conf</literal>
|
||||
@@ -90,9 +90,9 @@
|
||||
<parameter name="lockname" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Unlocks a previously locked mutex. Returns <literal>1</literal> if the channel
|
||||
<para>Unlocks a previously locked mutex. Returns <literal>1</literal> if the channel
|
||||
had a lock or <literal>0</literal> otherwise.</para>
|
||||
<note><para>It is generally unnecessary to unlock in a hangup routine, as any locks
|
||||
<note><para>It is generally unnecessary to unlock in a hangup routine, as any locks
|
||||
held are automatically freed when the channel is destroyed.</para></note>
|
||||
<note>
|
||||
<para>If <literal>live_dangerously</literal> in <literal>asterisk.conf</literal>
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
/*! \file
|
||||
*
|
||||
*
|
||||
* \brief Conditional logic dialplan functions
|
||||
*
|
||||
*
|
||||
* \author Anthony Minessale II
|
||||
*
|
||||
* \ingroup functions
|
||||
@@ -83,7 +83,7 @@
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Returns the data following <literal>?</literal> if true, else the data following <literal>:</literal></para>
|
||||
</description>
|
||||
</description>
|
||||
</function>
|
||||
<function name="IFTIME" language="en_US">
|
||||
<synopsis>
|
||||
@@ -182,7 +182,7 @@ static int acf_if(struct ast_channel *chan, const char *cmd, char *data, char *b
|
||||
-- and if you mod the ast_app_separate_args func instead, you'll really
|
||||
mess things up badly, because the rest of everything depends on null args
|
||||
for non-specified stuff. */
|
||||
|
||||
|
||||
AST_NONSTANDARD_APP_ARGS(args1, data, '?');
|
||||
AST_NONSTANDARD_APP_ARGS(args2, args1.remainder, ':');
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2005-2006, Digium, Inc.
|
||||
* Copyright (C) 2005, Olle E. Johansson, Edvina.net
|
||||
* Copyright (C) 2005, Russell Bryant <russelb@clemson.edu>
|
||||
* Copyright (C) 2005, Russell Bryant <russelb@clemson.edu>
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
* the Asterisk project. Please do not directly contact
|
||||
@@ -19,7 +19,7 @@
|
||||
/*! \file
|
||||
*
|
||||
* \brief MD5 digest related dialplan functions
|
||||
*
|
||||
*
|
||||
* \author Olle E. Johansson <oej@edvina.net>
|
||||
* \author Russell Bryant <russelb@clemson.edu>
|
||||
*
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
<parameter name="result-id" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>For queries which are marked as mode=multirow, the original
|
||||
query returns a <replaceable>result-id</replaceable> from which results
|
||||
<para>For queries which are marked as mode=multirow, the original
|
||||
query returns a <replaceable>result-id</replaceable> from which results
|
||||
may be fetched. This function implements the actual fetch of the results.</para>
|
||||
<para>This also sets <variable>ODBC_FETCH_STATUS</variable>.</para>
|
||||
<variablelist>
|
||||
@@ -78,7 +78,7 @@
|
||||
<parameter name="result-id" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>For queries which are marked as mode=multirow, this will clear
|
||||
<para>For queries which are marked as mode=multirow, this will clear
|
||||
any remaining rows of the specified resultset.</para>
|
||||
</description>
|
||||
</application>
|
||||
@@ -90,7 +90,7 @@
|
||||
<parameter name="string" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Used in SQL templates to escape data which may contain single ticks
|
||||
<para>Used in SQL templates to escape data which may contain single ticks
|
||||
<literal>'</literal> which are otherwise used to delimit data.</para>
|
||||
<para>Example: SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'</para>
|
||||
</description>
|
||||
@@ -1917,4 +1917,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ODBC lookups",
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
|
||||
@@ -508,4 +508,3 @@ static int load_module(void)
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Audio Effects Dialplan Functions");
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2011, Digium, Inc.
|
||||
*
|
||||
* David Vossel <dvossel@digium.com>
|
||||
* David Vossel <dvossel@digium.com>
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
* the Asterisk project. Please do not directly contact
|
||||
@@ -453,7 +453,7 @@ struct test_string {
|
||||
int value;
|
||||
const char *subtype;
|
||||
const char *message;
|
||||
const char *options;
|
||||
const char *options;
|
||||
} outputs;
|
||||
};
|
||||
|
||||
@@ -465,7 +465,7 @@ AST_TEST_DEFINE(test_valid_parse_data)
|
||||
char *message;
|
||||
char *options;
|
||||
enum ast_test_result_state res = AST_TEST_PASS;
|
||||
|
||||
|
||||
struct test_string tests [] = {
|
||||
{ "away",
|
||||
{ AST_PRESENCE_AWAY,
|
||||
@@ -882,4 +882,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Gets or sets a presen
|
||||
.unload = unload_module,
|
||||
.load_pri = AST_MODPRI_DEVSTATE_PROVIDER,
|
||||
);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/*! \file
|
||||
*
|
||||
* \brief Generate Random Number
|
||||
*
|
||||
*
|
||||
* \author Claude Patry <cpatry@gmail.com>
|
||||
* \author Tilghman Lesher ( http://asterisk.drunkcoder.com/ )
|
||||
* \ingroup functions
|
||||
@@ -39,15 +39,15 @@
|
||||
/*** DOCUMENTATION
|
||||
<function name="RAND" language="en_US">
|
||||
<synopsis>
|
||||
Choose a random number in a range.
|
||||
Choose a random number in a range.
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="min" />
|
||||
<parameter name="max" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Choose a random number between <replaceable>min</replaceable> and <replaceable>max</replaceable>.
|
||||
<replaceable>min</replaceable> defaults to <literal>0</literal>, if not specified, while <replaceable>max</replaceable> defaults
|
||||
<para>Choose a random number between <replaceable>min</replaceable> and <replaceable>max</replaceable>.
|
||||
<replaceable>min</replaceable> defaults to <literal>0</literal>, if not specified, while <replaceable>max</replaceable> defaults
|
||||
to <literal>RAND_MAX</literal> (2147483647 on many systems).</para>
|
||||
<para>Example: Set(junky=${RAND(1,8)});
|
||||
Sets junky to a random number between 1 and 8, inclusive.</para>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/*! \file
|
||||
*
|
||||
* \brief SHA1 digest related dialplan functions
|
||||
*
|
||||
*
|
||||
* \author Claude Patry <cpatry@gmail.com>
|
||||
*
|
||||
* \ingroup functions
|
||||
@@ -47,7 +47,7 @@
|
||||
<para>Generate a SHA1 digest via the SHA1 algorythm.</para>
|
||||
<para>Example: Set(sha1hash=${SHA1(junky)})</para>
|
||||
<para>Sets the asterisk variable sha1hash to the string <literal>60fa5675b9303eb62f99a9cd47f9f5837d18f9a0</literal>
|
||||
which is known as his hash</para>
|
||||
which is known as his hash</para>
|
||||
</description>
|
||||
</function>
|
||||
***/
|
||||
|
||||
@@ -216,4 +216,3 @@ static int load_module(void)
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get a field from a sorcery object");
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2008, Digium, Inc.
|
||||
*
|
||||
* Brian Degenhardt <bmd@digium.com>
|
||||
* Brett Bryant <bbryant@digium.com>
|
||||
* Brett Bryant <bbryant@digium.com>
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
* the Asterisk project. Please do not directly contact
|
||||
@@ -21,8 +21,8 @@
|
||||
*
|
||||
* \brief Noise reduction and automatic gain control (AGC)
|
||||
*
|
||||
* \author Brian Degenhardt <bmd@digium.com>
|
||||
* \author Brett Bryant <bbryant@digium.com>
|
||||
* \author Brian Degenhardt <bmd@digium.com>
|
||||
* \author Brett Bryant <bbryant@digium.com>
|
||||
*
|
||||
* \ingroup functions
|
||||
*
|
||||
@@ -63,7 +63,7 @@
|
||||
channel that it is executed on. Using <literal>rx</literal> for audio received
|
||||
and <literal>tx</literal> for audio transmitted to the channel. When using this
|
||||
function you set a target audio level. It is primarily intended for use with
|
||||
analog lines, but could be useful for other channels as well. The target volume
|
||||
analog lines, but could be useful for other channels as well. The target volume
|
||||
is set with a number between <literal>1-32768</literal>. The larger the number
|
||||
the louder (more gain) the channel will receive.</para>
|
||||
<para>Examples:</para>
|
||||
@@ -77,7 +77,7 @@
|
||||
</synopsis>
|
||||
<syntax>
|
||||
<parameter name="channeldirection" required="true">
|
||||
<para>This can be either <literal>rx</literal> or <literal>tx</literal>
|
||||
<para>This can be either <literal>rx</literal> or <literal>tx</literal>
|
||||
the values that can be set to this are either <literal>on</literal> and
|
||||
<literal>off</literal></para>
|
||||
</parameter>
|
||||
@@ -108,7 +108,7 @@ struct speex_info {
|
||||
struct speex_direction_info *tx, *rx;
|
||||
};
|
||||
|
||||
static void destroy_callback(void *data)
|
||||
static void destroy_callback(void *data)
|
||||
{
|
||||
struct speex_info *si = data;
|
||||
|
||||
@@ -251,13 +251,13 @@ static int speex_write(struct ast_channel *chan, const char *cmd, char *data, co
|
||||
if (!strcasecmp(cmd, "agc")) {
|
||||
if (!sscanf(value, "%30f", &(*sdi)->agclevel))
|
||||
(*sdi)->agclevel = ast_true(value) ? DEFAULT_AGC_LEVEL : 0.0;
|
||||
|
||||
|
||||
if ((*sdi)->agclevel > 32768.0) {
|
||||
ast_log(LOG_WARNING, "AGC(%s)=%.01f is greater than 32768... setting to 32768 instead\n",
|
||||
ast_log(LOG_WARNING, "AGC(%s)=%.01f is greater than 32768... setting to 32768 instead\n",
|
||||
((*sdi == si->rx) ? "rx" : "tx"), (*sdi)->agclevel);
|
||||
(*sdi)->agclevel = 32768.0;
|
||||
}
|
||||
|
||||
|
||||
(*sdi)->agc = !!((*sdi)->agclevel);
|
||||
|
||||
if ((*sdi)->state) {
|
||||
@@ -292,11 +292,11 @@ static int speex_write(struct ast_channel *chan, const char *cmd, char *data, co
|
||||
ast_audiohook_remove(chan, &si->audiohook);
|
||||
ast_audiohook_detach(&si->audiohook);
|
||||
}
|
||||
|
||||
|
||||
ast_datastore_free(datastore);
|
||||
}
|
||||
|
||||
if (is_new) {
|
||||
if (is_new) {
|
||||
datastore->data = si;
|
||||
ast_channel_lock(chan);
|
||||
ast_channel_datastore_add(chan, datastore);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* \brief String manipulation dialplan functions
|
||||
*
|
||||
* \author Tilghman Lesher
|
||||
* \author Anothony Minessale II
|
||||
* \author Anothony Minessale II
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
@@ -53,7 +53,7 @@ AST_THREADSTORAGE(result_buf);
|
||||
<parameter name="argN" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Parses the format string specified and returns a string matching
|
||||
<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>
|
||||
|
||||
@@ -138,7 +138,7 @@ static int srv_query_read(struct ast_channel *chan, const char *cmd, char *data,
|
||||
ast_log(LOG_WARNING, "%s requires a service as an argument\n", cmd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* If they already called SRVQUERY for this service once,
|
||||
* we need to kill the old datastore.
|
||||
*/
|
||||
@@ -150,7 +150,7 @@ static int srv_query_read(struct ast_channel *chan, const char *cmd, char *data,
|
||||
ast_channel_datastore_remove(chan, datastore);
|
||||
ast_datastore_free(datastore);
|
||||
}
|
||||
|
||||
|
||||
if (!srv_datastore_setup(data, chan)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* \brief String manipulation dialplan functions
|
||||
*
|
||||
* \author Tilghman Lesher
|
||||
* \author Anothony Minessale II
|
||||
* \author Anothony Minessale II
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
@@ -106,13 +106,13 @@ AST_THREADSTORAGE(tmp_buf);
|
||||
<parameter name="string" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Permits all characters listed in <replaceable>allowed-chars</replaceable>,
|
||||
filtering all others outs. In addition to literally listing the characters,
|
||||
<para>Permits all characters listed in <replaceable>allowed-chars</replaceable>,
|
||||
filtering all others outs. In addition to literally listing the characters,
|
||||
you may also use ranges of characters (delimited by a <literal>-</literal></para>
|
||||
<para>Hexadecimal characters started with a <literal>\x</literal>(i.e. \x20)</para>
|
||||
<para>Octal characters started with a <literal>\0</literal> (i.e. \040)</para>
|
||||
<para>Also <literal>\t</literal>,<literal>\n</literal> and <literal>\r</literal> are recognized.</para>
|
||||
<note><para>If you want the <literal>-</literal> character it needs to be prefixed with a
|
||||
<para>Also <literal>\t</literal>,<literal>\n</literal> and <literal>\r</literal> are recognized.</para>
|
||||
<note><para>If you want the <literal>-</literal> character it needs to be prefixed with a
|
||||
<literal>\</literal></para></note>
|
||||
</description>
|
||||
</function>
|
||||
@@ -179,9 +179,9 @@ AST_THREADSTORAGE(tmp_buf);
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Return <literal>1</literal> on regular expression match or <literal>0</literal> otherwise</para>
|
||||
<para>Please note that the space following the double quotes separating the
|
||||
regex from the data is optional and if present, is skipped. If a space is
|
||||
desired at the beginning of the data, then put two spaces there; the second
|
||||
<para>Please note that the space following the double quotes separating the
|
||||
regex from the data is optional and if present, is skipped. If a space is
|
||||
desired at the beginning of the data, then put two spaces there; the second
|
||||
will not be skipped.</para>
|
||||
</description>
|
||||
</function>
|
||||
@@ -218,8 +218,8 @@ AST_THREADSTORAGE(tmp_buf);
|
||||
<parameter name="hashname" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Returns a comma-delimited list of the current keys of the associative array
|
||||
defined by the HASH() function. Note that if you iterate over the keys of
|
||||
<para>Returns a comma-delimited list of the current keys of the associative array
|
||||
defined by the HASH() function. Note that if you iterate over the keys of
|
||||
the result, adding keys during iteration will cause the result of the HASHKEYS()
|
||||
function to change.</para>
|
||||
</description>
|
||||
@@ -245,8 +245,8 @@ AST_THREADSTORAGE(tmp_buf);
|
||||
<parameter name="varN" required="false" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>The comma-delimited list passed as a value to which the function is set will
|
||||
be interpreted as a set of values to which the comma-delimited list of
|
||||
<para>The comma-delimited list passed as a value to which the function is set will
|
||||
be interpreted as a set of values to which the comma-delimited list of
|
||||
variable names in the argument should be set.</para>
|
||||
<para>Example: Set(ARRAY(var1,var2)=1,2) will set var1 to 1 and var2 to 2</para>
|
||||
</description>
|
||||
@@ -261,7 +261,7 @@ AST_THREADSTORAGE(tmp_buf);
|
||||
<parameter name="format" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>This is useful for converting a date into <literal>EPOCH</literal> time,
|
||||
<para>This is useful for converting a date into <literal>EPOCH</literal> time,
|
||||
possibly to pass to an application like SayUnixTime or to calculate the difference
|
||||
between the two date strings</para>
|
||||
<para>Example: ${STRPTIME(2006-03-01 07:30:35,America/Chicago,%Y-%m-%d %H:%M:%S)} returns 1141219835</para>
|
||||
@@ -384,7 +384,7 @@ AST_THREADSTORAGE(tmp_buf);
|
||||
NoOp(var is three) being executed.
|
||||
</para>
|
||||
</description>
|
||||
</function>
|
||||
</function>
|
||||
<function name="POP" language="en_US">
|
||||
<synopsis>
|
||||
Removes and returns the last item off of a variable containing delimited text
|
||||
@@ -404,7 +404,7 @@ AST_THREADSTORAGE(tmp_buf);
|
||||
NoOp(var is one) being executed.
|
||||
</para>
|
||||
</description>
|
||||
</function>
|
||||
</function>
|
||||
<function name="PUSH" language="en_US">
|
||||
<synopsis>
|
||||
Appends one or more values to the end of a variable containing delimited text
|
||||
@@ -974,7 +974,7 @@ static int regex(struct ast_channel *chan, const char *cmd, char *parse, char *b
|
||||
ast_log(LOG_WARNING, "Malformed input %s(%s): %s\n", cmd, parse, buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
strcpy(buf, regexec(®exbuf, args.str, 0, NULL, 0) ? "0" : "1");
|
||||
|
||||
regfree(®exbuf);
|
||||
@@ -1901,7 +1901,7 @@ AST_TEST_DEFINE(test_STRREPLACE)
|
||||
ast_channel_release(chan);
|
||||
return AST_TEST_FAIL;
|
||||
}
|
||||
|
||||
|
||||
AST_LIST_INSERT_HEAD(ast_channel_varshead(chan), var, entries);
|
||||
|
||||
if (test_strings[i][3]) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/*! \file
|
||||
*
|
||||
* SYSINFO function to return various system data.
|
||||
*
|
||||
*
|
||||
* \note Inspiration and Guidance from Russell
|
||||
*
|
||||
* \author Jeff Peeler
|
||||
@@ -130,7 +130,7 @@ static int sysinfo_helper(struct ast_channel *chan, const char *cmd, char *data,
|
||||
ast_log(LOG_ERROR, "Unknown sysinfo parameter type '%s'.\n", data);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -151,4 +151,3 @@ static int load_module(void)
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "System information related functions");
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*
|
||||
* \brief Channel timeout related dialplan functions
|
||||
*
|
||||
* \author Mark Spencer <markster@digium.com>
|
||||
* \author Mark Spencer <markster@digium.com>
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<syntax>
|
||||
<parameter name="timeouttype" required="true">
|
||||
<para>The timeout that will be manipulated. The possible timeout types
|
||||
are: <literal>absolute</literal>, <literal>digit</literal> or
|
||||
are: <literal>absolute</literal>, <literal>digit</literal> or
|
||||
<literal>response</literal></para>
|
||||
</parameter>
|
||||
</syntax>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 1999 - 2006, Digium, Inc.
|
||||
*
|
||||
* Created by Olle E. Johansson, Edvina.net
|
||||
* Created by Olle E. Johansson, Edvina.net
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
* the Asterisk project. Please do not directly contact
|
||||
@@ -21,10 +21,10 @@
|
||||
* \brief URI encoding / decoding
|
||||
*
|
||||
* \author Olle E. Johansson <oej@edvina.net>
|
||||
*
|
||||
*
|
||||
* \note For now this code only supports 8 bit characters, not unicode,
|
||||
which we ultimately will need to support.
|
||||
*
|
||||
*
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/*! \file
|
||||
*
|
||||
* \brief Return the current Version strings
|
||||
*
|
||||
*
|
||||
* \author Steve Murphy (murf@digium.com)
|
||||
* \ingroup functions
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* Copyright (c) 2006 Tilghman Lesher. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Tilghman Lesher <asterisk-vmcount-func@the-tilghman.com>
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
@@ -53,7 +53,7 @@
|
||||
</parameter>
|
||||
</syntax>
|
||||
<description>
|
||||
<para>Count the number of voicemails in a specified mailbox, you could also specify
|
||||
<para>Count the number of voicemails in a specified mailbox, you could also specify
|
||||
the mailbox <replaceable>folder</replaceable>.</para>
|
||||
<para>Example: <literal>exten => s,1,Set(foo=${VMCOUNT(125@default)})</literal></para>
|
||||
</description>
|
||||
@@ -83,7 +83,7 @@ static int acf_vmcount_exec(struct ast_channel *chan, const char *cmd, char *arg
|
||||
}
|
||||
|
||||
snprintf(buf, len, "%d", ast_app_messagecount(args.vmbox, args.folder));
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2011, Digium, Inc.
|
||||
*
|
||||
* Joshua Colp <jcolp@digium.com>
|
||||
* Joshua Colp <jcolp@digium.com>
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
* the Asterisk project. Please do not directly contact
|
||||
@@ -20,7 +20,7 @@
|
||||
*
|
||||
* \brief Technology independent volume control
|
||||
*
|
||||
* \author Joshua Colp <jcolp@digium.com>
|
||||
* \author Joshua Colp <jcolp@digium.com>
|
||||
*
|
||||
* \ingroup functions
|
||||
*
|
||||
@@ -124,7 +124,7 @@ static int volume_callback(struct ast_audiohook *audiohook, struct ast_channel *
|
||||
if (frame->frametype == AST_FRAME_DTMF) {
|
||||
/* Only use DTMF coming from the source... not going to it */
|
||||
if (direction != AST_AUDIOHOOK_DIRECTION_READ)
|
||||
return 0;
|
||||
return 0;
|
||||
if (frame->subclass.integer == '*') {
|
||||
vi->tx_gain += 1;
|
||||
vi->rx_gain += 1;
|
||||
@@ -135,7 +135,7 @@ static int volume_callback(struct ast_audiohook *audiohook, struct ast_channel *
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (frame->frametype == AST_FRAME_VOICE) {
|
||||
/* Based on direction of frame grab the gain, and confirm it is applicable */
|
||||
if (!(gain = (direction == AST_AUDIOHOOK_DIRECTION_READ) ? &vi->rx_gain : &vi->tx_gain) || !*gain)
|
||||
@@ -192,8 +192,8 @@ static int volume_write(struct ast_channel *chan, const char *cmd, char *data, c
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!strcasecmp(args.direction, "tx")) {
|
||||
vi->tx_gain = atoi(value);
|
||||
if (!strcasecmp(args.direction, "tx")) {
|
||||
vi->tx_gain = atoi(value);
|
||||
} else if (!strcasecmp(args.direction, "rx")) {
|
||||
vi->rx_gain = atoi(value);
|
||||
} else {
|
||||
@@ -209,13 +209,13 @@ static int volume_write(struct ast_channel *chan, const char *cmd, char *data, c
|
||||
}
|
||||
|
||||
/* Add Option data to struct */
|
||||
|
||||
|
||||
if (!ast_strlen_zero(args.options)) {
|
||||
struct ast_flags flags = { 0 };
|
||||
ast_app_parse_options(volume_opts, &flags, NULL, args.options);
|
||||
vi->flags = flags.flags;
|
||||
} else {
|
||||
vi->flags = 0;
|
||||
} else {
|
||||
vi->flags = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user