74 #define AST_ICONV_CAST void * 84 size_t incount, outcount = len - 1;
88 ast_log(
LOG_WARNING,
"Syntax: ICONV(<in-charset>,<out-charset>,<text>) - missing arguments!\n");
100 incount = strlen(
args.text);
104 cd = iconv_open(
args.out_charset,
args.in_charset);
106 if (cd == (iconv_t) -1) {
107 ast_log(
LOG_ERROR,
"conversion from '%s' to '%s' not available. type 'iconv -l' in a shell to list the supported charsets.\n",
args.in_charset,
args.out_charset);
111 if (iconv(cd, (
AST_ICONV_CAST) &
args.text, &incount, &buf, &outcount) == (
size_t) -1) {
114 else if (
errno == EILSEQ)
116 else if (
errno == EINVAL)
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
static int load_module(void)
const ast_string_field arguments
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
#define ast_strlen_zero(foo)
#define ast_debug(level,...)
Log a DEBUG message.
General Asterisk PBX channel definitions.
static int unload_module(void)
Data structure associated with a custom dialplan function.
static int iconv_read(struct ast_channel *chan, const char *cmd, char *arguments, char *buf, size_t len)
#define ast_strdupa(s)
duplicate a string in memory from the stack
Core PBX routines and definitions.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
static void parse(struct mgcp_request *req)
static struct ast_custom_function iconv_function
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define ast_custom_function_register(acf)
Register a custom function.
#define AST_APP_ARG(name)
Define an application argument.