119    if (!strcmp(
type, 
"alpha")) {
 
  121    } 
else if (!strcmp(
type, 
"phonetic")) {
 
  123    } 
else if (!strcmp(
type, 
"digits")) {
 
  125    } 
else if (!strcmp(
type, 
"number")) {
 
  132    } 
else if (!strcmp(
type, 
"ordinal")) {
 
  139    } 
else if (!strcmp(
type, 
"money")) {
 
  150    snprintf(
buf, 
len, 
"%s", files);
 
 
  169        info->name = 
"test_SAYFILES_function";
 
  170        info->category = 
"/funcs/func_sayfiles/";
 
  171        info->summary = 
"Test SAYFILES function substitution";
 
  173            "Executes a series of variable substitutions using the SAYFILES function and ensures that the expected results are received.";
 
  189    ast_str_set(&expr, 0, 
"${SAYFILES(hi Th3re,alpha)}");
 
  191    if (strcmp(
ast_str_buffer(
result), 
"letters/h&letters/i&letters/space&letters/t&letters/h&digits/3&letters/r&letters/e") != 0) {
 
  197    ast_str_set(&expr, 0, 
"${SAYFILES(phreak,phonetic)}");
 
  199    if (strcmp(
ast_str_buffer(
result), 
"phonetic/p_p&phonetic/h_p&phonetic/r_p&phonetic/e_p&phonetic/a_p&phonetic/k_p") != 0) {
 
  214    ast_str_set(&expr, 0, 
"${SAYFILES(+18005551212,digits)}");
 
  216    if (strcmp(
ast_str_buffer(
result), 
"digits/1&digits/8&digits/0&digits/0&digits/5&digits/5&digits/5&digits/1&digits/2&digits/1&digits/2") != 0) {
 
  254    ast_str_set(&expr, 0, 
"${SAYFILES(2001000001,number)}");
 
  256    if (strcmp(
ast_str_buffer(
result), 
"digits/2&digits/billion&digits/1&digits/million&digits/1") != 0) {
 
  278    ast_str_set(&expr, 0, 
"${SAYFILES(1042,ordinal)}");
 
  286    ast_str_set(&expr, 0, 
"${SAYFILES(11042,ordinal)}");
 
  294    ast_str_set(&expr, 0, 
"${SAYFILES(40000,ordinal)}");
 
  302    ast_str_set(&expr, 0, 
"${SAYFILES(43638,ordinal)}");
 
  304    if (strcmp(
ast_str_buffer(
result), 
"digits/40&digits/3&digits/thousand&digits/6&digits/hundred&digits/30&digits/h-8") != 0) {
 
  310    ast_str_set(&expr, 0, 
"${SAYFILES(1000000,ordinal)}");
 
  318    ast_str_set(&expr, 0, 
"${SAYFILES(1000001,ordinal)}");
 
  326    ast_str_set(&expr, 0, 
"${SAYFILES(2001000001,ordinal)}");
 
  328    if (strcmp(
ast_str_buffer(
result), 
"digits/2&digits/billion&digits/1&digits/million&digits/h-1") != 0) {
 
  376    if (strcmp(
ast_str_buffer(
result), 
"digits/1&letters/dollar_&and&digits/40&digits/2¢s") != 0) {
 
  431    ast_str_set(&expr, 0, 
"${SAYFILES(2blah.05,money)}");
 
Asterisk main include file. File version handling, generic pbx functions.
General Asterisk PBX channel definitions.
const char * ast_channel_language(const struct ast_channel *chan)
Conversion utility functions.
int ast_str_to_int(const char *str, int *res)
Convert the given string to a signed integer.
Generic File Format Support. Should be included by clients of the file handling routines....
static struct ast_custom_function sayfiles
static int sayfile_exec(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static int load_module(void)
static int unload_module(void)
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Application convenience functions, designed to give consistent look and feel to Asterisk apps.
#define AST_APP_ARG(name)
Define an application argument.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
Custom localtime functions for multiple timezones.
Asterisk locking-related definitions:
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Core PBX routines and definitions.
void ast_str_substitute_variables(struct ast_str **buf, ssize_t maxlen, struct ast_channel *chan, const char *templ)
#define ast_custom_function_register(acf)
Register a custom function.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
Say numbers and dates (maybe words one day too)
struct ast_str * ast_get_ordinal_str(int num, const char *lang)
Returns an ast_str of files for SayOrdinal playback.
struct ast_str * ast_get_character_str(const char *str, const char *lang, enum ast_say_case_sensitivity sensitivity)
Returns an ast_str of files for SayAlpha playback.
struct ast_str * ast_get_number_str(int num, const char *lang)
Returns an ast_str of files for SayNumber playback.
struct ast_str * ast_get_phonetic_str(const char *str, const char *lang)
Returns an ast_str of files for SayPhonetic playback.
struct ast_str * ast_get_money_str(const char *str, const char *lang)
Returns an ast_str of files for SayMoney playback.
struct ast_str * ast_get_digit_str(const char *str, const char *lang)
Returns an ast_str of files for SayDigits playback.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
char *attribute_pure ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
Main Channel structure associated with a channel.
Data structure associated with a custom dialplan function.
Support for dynamic strings.
#define AST_TEST_REGISTER(cb)
#define ast_test_status_update(a, b, c...)
#define AST_TEST_UNREGISTER(cb)
#define AST_TEST_DEFINE(hdr)