diff -Naur asterisk-addons-455.orig/CHANGES asterisk-addons-455.patched-saycountpl/CHANGES --- asterisk-addons-455.orig/CHANGES 1970-01-01 06:00:00.000000000 +0600 +++ asterisk-addons-455.patched-saycountpl/CHANGES 2007-10-08 17:22:52.000000000 +0700 @@ -0,0 +1,23 @@ +------------------------------------------------------------------------------- +--- Functionality changes since Asterisk-Addons 1.4 --------------------------- +------------------------------------------------------------------------------- + +New modules +------------ + +* New channel driver added: chan_mobile. More information about it can be + found in doc and configs. + + +MySQL +------------ + +* Added ability to make SSL connection to MySQL + +* Add option to disable logging unique id + +Miscelaneos +------------ + +* Application SayCountPL removed + diff -Naur asterisk-addons-455.orig/Makefile asterisk-addons-455.patched-saycountpl/Makefile --- asterisk-addons-455.orig/Makefile 2007-10-03 10:30:09.000000000 +0700 +++ asterisk-addons-455.patched-saycountpl/Makefile 2007-10-03 14:28:22.000000000 +0700 @@ -57,7 +57,7 @@ endif MODULES_DIR=$(ASTLIBDIR)/modules -MODS:=app_addon_sql_mysql app_saycountpl cdr_addon_mysql chan_ooh323 format_mp3 res_config_mysql chan_mobile +MODS:=app_addon_sql_mysql cdr_addon_mysql chan_ooh323 format_mp3 res_config_mysql chan_mobile SELECTED_MODS:=$(patsubst %,%.so,$(filter-out $(MENUSELECT_ADDONS),$(MODS))) diff -Naur asterisk-addons-455.orig/UPGRADE.txt asterisk-addons-455.patched-saycountpl/UPGRADE.txt --- asterisk-addons-455.orig/UPGRADE.txt 1970-01-01 06:00:00.000000000 +0600 +++ asterisk-addons-455.patched-saycountpl/UPGRADE.txt 2007-10-08 17:08:12.000000000 +0700 @@ -0,0 +1,7 @@ +Information for Upgrading From Previous Asterisk Releases +========================================================= + +Applications: + +* Application SayCountPL now deleted from distribution. Information about + upgrade can be found in doc/saycountpl.txt file. diff -Naur asterisk-addons-455.orig/app_saycountpl.c asterisk-addons-455.patched-saycountpl/app_saycountpl.c --- asterisk-addons-455.orig/app_saycountpl.c 2007-06-04 09:36:42.000000000 +0700 +++ asterisk-addons-455.patched-saycountpl/app_saycountpl.c 1970-01-01 06:00:00.000000000 +0600 @@ -1,123 +0,0 @@ -/* - * Asterisk -- A telephony toolkit for Linux. - * - * saycountpl application - * - * Copyright (C) 2004, Andy Powell & TAAN Softworks Corp. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define AST_MODULE "ast_saycountpl" - -static char *app = "SayCountPL"; - -static char *synopsis = "Say the counting word the fits to a number"; - -static char *descrip = -"Polish grammar has some funny rules for counting words. for example 1 zloty, 2 zlote, 5 zlotych. This application will take the words for 1, 2-4 and 5 and\n" -"decide based on grammar rules which one to use with the number you pass to it.\n\n" -"Example: saycountpl(zloty,zlote,zlotych,122) will give: zlote\n"; - -static int saywords(struct ast_channel *chan, char *word1, char *word2, char *word5, int num) -{ - /* Put this in a separate proc because it's bound to change */ - - int md; - int d=0; - - if (num >0) { - md = num % 1000; - if (md == 1) { - ast_streamfile(chan, word1, chan->language); - d = ast_waitstream(chan,""); - } - else { - if (((md % 10) >= 2) && ( (md % 10) <= 4 ) && ( ( md % 100) < 10 || (md % 100) > 20)) { - ast_streamfile(chan, word2, chan->language); - d = ast_waitstream(chan,""); - } - else { - ast_streamfile(chan, word5, chan->language); - d = ast_waitstream(chan,""); - } - } - } - - return d; - -} - - -static int sayword_exec(struct ast_channel *chan, void *data) -{ - int res=0; - - char *word1, *word2, *word5, *num; - char *s; - - int inum; - - struct ast_module_user *u; - - if (!data) { - ast_log(LOG_WARNING, "You didn't pass any arguments - I need 4 arguments, word-1,word-2,word-5,number\n"); - return -1; - } - u = ast_module_user_add(chan); - /* Do our shit here */ - - s = ast_strdupa((void *) data); - - word1 = strsep(&s, "|"); - word2 = strsep(&s, "|"); - word5 = strsep(&s, "|"); - num = strsep(&s, "|"); - - /* check to see if params passed */ - - if (!word1 || !word2 || !word5 || !num) { - ast_log(LOG_WARNING, "Saycountpl requires the arguments word-1|word-2|word-3|number\n"); - ast_module_user_remove(u); - return -1; - } - - if (sscanf(num, "%d", &inum) != 1) { - ast_log(LOG_WARNING, "'%s' is not a valid number\n", num); - ast_module_user_remove(u); - return -1; - } - - /* do the saying part (after a bit of maths) */ - - res = saywords(chan,word1,word2,word5,inum); - - - ast_module_user_remove(u); - - return res; -} - -static int unload_module(void) -{ - ast_module_user_hangup_all(); - return ast_unregister_application(app); -} - -static int load_module(void) -{ - return ast_register_application(app, sayword_exec, synopsis, descrip); -} - -AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Say polish counting words"); diff -Naur asterisk-addons-455.orig/doc/saycountpl.txt asterisk-addons-455.patched-saycountpl/doc/saycountpl.txt --- asterisk-addons-455.orig/doc/saycountpl.txt 1970-01-01 06:00:00.000000000 +0600 +++ asterisk-addons-455.patched-saycountpl/doc/saycountpl.txt 2007-10-08 17:45:08.000000000 +0700 @@ -0,0 +1,25 @@ + +In this release app_saycountpl removed from asterisk-addons. +In can be simple replaced by folowing Macro: + +[macro-saycountpl] +exten => s,1,NoOp(Say Word In Poland) +exten => s,n,GotoIf($[${ARG4}%10 = 1]:one) +exten => s,n,GotoIf($[${ARG4}%10 = 2]:two) +exten => s,n,GotoIf($[${ARG4}%10 = 3]:two) +exten => s,n,GotoIf($[${ARG4}%10 = 4]:two) +exten => s,n,Goto(three) +exten => s,n(one),Playback(${ARG1}) +exten => s,n(two),Playback(${ARG2}) +exten => s,n(three),Playback(${ARG3}) + +And you can use: + +exten => _X.,n,Macro(saycountpl,word1,word2,word3,120) + +instead of: + +exten => _X.,n,Saycountpl(word1,word2,word3,120) + +This macros can be used with some modification for other languages when you +need different cases for counting words with some numbers (Russian for ex.) diff -Naur asterisk-addons-455.orig/menuselect-tree asterisk-addons-455.patched-saycountpl/menuselect-tree --- asterisk-addons-455.orig/menuselect-tree 2007-06-04 09:36:42.000000000 +0700 +++ asterisk-addons-455.patched-saycountpl/menuselect-tree 2007-10-03 14:28:34.000000000 +0700 @@ -6,9 +6,6 @@ mysqlclient asterisk - - asterisk - mysqlclient asterisk