[asterisk-commits] branch oej/peermatch r21307 - in
/team/oej/peermatch: ./ apps/ cdr/ channels/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Apr 18 22:39:33 MST 2006
Author: oej
Date: Wed Apr 19 00:34:00 2006
New Revision: 21307
URL: http://svn.digium.com/view/asterisk?rev=21307&view=rev
Log:
Update
Added:
team/oej/peermatch/apps/app_speech_utils.c
- copied unchanged from r20264, trunk/apps/app_speech_utils.c
team/oej/peermatch/doc/datastores.txt
- copied unchanged from r20264, trunk/doc/datastores.txt
team/oej/peermatch/doc/speechrec.txt
- copied unchanged from r20264, trunk/doc/speechrec.txt
team/oej/peermatch/include/asterisk/speech.h
- copied unchanged from r20264, trunk/include/asterisk/speech.h
team/oej/peermatch/res/res_speech.c
- copied unchanged from r20264, trunk/res/res_speech.c
Modified:
team/oej/peermatch/ (props changed)
team/oej/peermatch/.cleancount
team/oej/peermatch/Makefile
team/oej/peermatch/UPGRADE.txt
team/oej/peermatch/acl.c
team/oej/peermatch/app.c
team/oej/peermatch/apps/Makefile
team/oej/peermatch/apps/app_adsiprog.c
team/oej/peermatch/apps/app_alarmreceiver.c
team/oej/peermatch/apps/app_amd.c
team/oej/peermatch/apps/app_authenticate.c
team/oej/peermatch/apps/app_cdr.c
team/oej/peermatch/apps/app_chanisavail.c
team/oej/peermatch/apps/app_channelredirect.c
team/oej/peermatch/apps/app_chanspy.c
team/oej/peermatch/apps/app_controlplayback.c
team/oej/peermatch/apps/app_db.c
team/oej/peermatch/apps/app_dial.c
team/oej/peermatch/apps/app_dictate.c
team/oej/peermatch/apps/app_directed_pickup.c
team/oej/peermatch/apps/app_directory.c
team/oej/peermatch/apps/app_disa.c
team/oej/peermatch/apps/app_dumpchan.c
team/oej/peermatch/apps/app_echo.c
team/oej/peermatch/apps/app_exec.c
team/oej/peermatch/apps/app_externalivr.c
team/oej/peermatch/apps/app_festival.c
team/oej/peermatch/apps/app_flash.c
team/oej/peermatch/apps/app_forkcdr.c
team/oej/peermatch/apps/app_getcpeid.c
team/oej/peermatch/apps/app_hasnewvoicemail.c
team/oej/peermatch/apps/app_ices.c
team/oej/peermatch/apps/app_image.c
team/oej/peermatch/apps/app_ivrdemo.c
team/oej/peermatch/apps/app_lookupblacklist.c
team/oej/peermatch/apps/app_lookupcidname.c
team/oej/peermatch/apps/app_macro.c
team/oej/peermatch/apps/app_meetme.c
team/oej/peermatch/apps/app_milliwatt.c
team/oej/peermatch/apps/app_mixmonitor.c
team/oej/peermatch/apps/app_morsecode.c
team/oej/peermatch/apps/app_mp3.c
team/oej/peermatch/apps/app_nbscat.c
team/oej/peermatch/apps/app_osplookup.c
team/oej/peermatch/apps/app_page.c
team/oej/peermatch/apps/app_parkandannounce.c
team/oej/peermatch/apps/app_playback.c
team/oej/peermatch/apps/app_privacy.c
team/oej/peermatch/apps/app_queue.c
team/oej/peermatch/apps/app_random.c
team/oej/peermatch/apps/app_read.c
team/oej/peermatch/apps/app_readfile.c
team/oej/peermatch/apps/app_realtime.c
team/oej/peermatch/apps/app_record.c
team/oej/peermatch/apps/app_rpt.c
team/oej/peermatch/apps/app_sayunixtime.c
team/oej/peermatch/apps/app_senddtmf.c
team/oej/peermatch/apps/app_sendtext.c
team/oej/peermatch/apps/app_setcallerid.c
team/oej/peermatch/apps/app_setcdruserfield.c
team/oej/peermatch/apps/app_settransfercapability.c
team/oej/peermatch/apps/app_skel.c
team/oej/peermatch/apps/app_sms.c
team/oej/peermatch/apps/app_softhangup.c
team/oej/peermatch/apps/app_stack.c
team/oej/peermatch/apps/app_system.c
team/oej/peermatch/apps/app_talkdetect.c
team/oej/peermatch/apps/app_test.c
team/oej/peermatch/apps/app_transfer.c
team/oej/peermatch/apps/app_url.c
team/oej/peermatch/apps/app_userevent.c
team/oej/peermatch/apps/app_verbose.c
team/oej/peermatch/apps/app_voicemail.c
team/oej/peermatch/apps/app_waitforring.c
team/oej/peermatch/apps/app_waitforsilence.c
team/oej/peermatch/apps/app_while.c
team/oej/peermatch/apps/app_zapateller.c
team/oej/peermatch/apps/app_zapbarge.c
team/oej/peermatch/apps/app_zapras.c
team/oej/peermatch/apps/app_zapscan.c
team/oej/peermatch/asterisk.c
team/oej/peermatch/cdr.c
team/oej/peermatch/cdr/cdr_csv.c
team/oej/peermatch/cdr/cdr_custom.c
team/oej/peermatch/cdr/cdr_manager.c
team/oej/peermatch/cdr/cdr_odbc.c
team/oej/peermatch/cdr/cdr_pgsql.c
team/oej/peermatch/cdr/cdr_sqlite.c
team/oej/peermatch/cdr/cdr_tds.c
team/oej/peermatch/channel.c
team/oej/peermatch/channels/chan_agent.c
team/oej/peermatch/channels/chan_alsa.c
team/oej/peermatch/channels/chan_features.c
team/oej/peermatch/channels/chan_h323.c
team/oej/peermatch/channels/chan_iax2.c
team/oej/peermatch/channels/chan_local.c
team/oej/peermatch/channels/chan_mgcp.c
team/oej/peermatch/channels/chan_misdn.c
team/oej/peermatch/channels/chan_nbs.c
team/oej/peermatch/channels/chan_oss.c
team/oej/peermatch/channels/chan_phone.c
team/oej/peermatch/channels/chan_sip.c
team/oej/peermatch/channels/chan_skinny.c
team/oej/peermatch/channels/chan_vpb.c
team/oej/peermatch/channels/chan_zap.c
team/oej/peermatch/channels/misdn/isdn_lib.c
team/oej/peermatch/cli.c
team/oej/peermatch/codecs/codec_a_mu.c
team/oej/peermatch/codecs/codec_adpcm.c
team/oej/peermatch/codecs/codec_alaw.c
team/oej/peermatch/codecs/codec_g723_1.c
team/oej/peermatch/codecs/codec_g726.c
team/oej/peermatch/codecs/codec_gsm.c
team/oej/peermatch/codecs/codec_ilbc.c
team/oej/peermatch/codecs/codec_lpc10.c
team/oej/peermatch/codecs/codec_speex.c
team/oej/peermatch/codecs/codec_ulaw.c
team/oej/peermatch/configs/iax.conf.sample
team/oej/peermatch/configs/modules.conf.sample
team/oej/peermatch/doc/00README.1st
team/oej/peermatch/doc/CODING-GUIDELINES
team/oej/peermatch/file.c
team/oej/peermatch/formats/format_g723.c
team/oej/peermatch/formats/format_g726.c
team/oej/peermatch/formats/format_g729.c
team/oej/peermatch/formats/format_gsm.c
team/oej/peermatch/formats/format_h263.c
team/oej/peermatch/formats/format_h264.c
team/oej/peermatch/formats/format_ilbc.c
team/oej/peermatch/formats/format_jpeg.c
team/oej/peermatch/formats/format_ogg_vorbis.c
team/oej/peermatch/formats/format_pcm.c
team/oej/peermatch/formats/format_sln.c
team/oej/peermatch/formats/format_vox.c
team/oej/peermatch/formats/format_wav.c
team/oej/peermatch/formats/format_wav_gsm.c
team/oej/peermatch/funcs/func_base64.c
team/oej/peermatch/funcs/func_callerid.c
team/oej/peermatch/funcs/func_cdr.c
team/oej/peermatch/funcs/func_channel.c
team/oej/peermatch/funcs/func_curl.c
team/oej/peermatch/funcs/func_cut.c
team/oej/peermatch/funcs/func_db.c
team/oej/peermatch/funcs/func_enum.c
team/oej/peermatch/funcs/func_env.c
team/oej/peermatch/funcs/func_groupcount.c
team/oej/peermatch/funcs/func_language.c
team/oej/peermatch/funcs/func_logic.c
team/oej/peermatch/funcs/func_math.c
team/oej/peermatch/funcs/func_md5.c
team/oej/peermatch/funcs/func_moh.c
team/oej/peermatch/funcs/func_odbc.c
team/oej/peermatch/funcs/func_rand.c
team/oej/peermatch/funcs/func_sha1.c
team/oej/peermatch/funcs/func_strings.c
team/oej/peermatch/funcs/func_timeout.c
team/oej/peermatch/funcs/func_uri.c
team/oej/peermatch/http.c
team/oej/peermatch/include/asterisk.h
team/oej/peermatch/include/asterisk/adsi.h
team/oej/peermatch/include/asterisk/channel.h
team/oej/peermatch/include/asterisk/compat.h
team/oej/peermatch/include/asterisk/doxyref.h
team/oej/peermatch/include/asterisk/file.h
team/oej/peermatch/include/asterisk/frame.h
team/oej/peermatch/include/asterisk/linkedlists.h
team/oej/peermatch/include/asterisk/lock.h
team/oej/peermatch/include/asterisk/module.h
team/oej/peermatch/include/asterisk/pbx.h
team/oej/peermatch/include/asterisk/translate.h
team/oej/peermatch/include/asterisk/utils.h
team/oej/peermatch/loader.c
team/oej/peermatch/manager.c
team/oej/peermatch/pbx.c
team/oej/peermatch/pbx/pbx_ael.c
team/oej/peermatch/pbx/pbx_config.c
team/oej/peermatch/pbx/pbx_dundi.c
team/oej/peermatch/pbx/pbx_gtkconsole.c
team/oej/peermatch/pbx/pbx_loopback.c
team/oej/peermatch/pbx/pbx_realtime.c
team/oej/peermatch/pbx/pbx_spool.c
team/oej/peermatch/res/res_adsi.c
team/oej/peermatch/res/res_agi.c
team/oej/peermatch/res/res_clioriginate.c
team/oej/peermatch/res/res_config_odbc.c
team/oej/peermatch/res/res_config_pgsql.c
team/oej/peermatch/res/res_convert.c
team/oej/peermatch/res/res_crypto.c
team/oej/peermatch/res/res_features.c
team/oej/peermatch/res/res_indications.c
team/oej/peermatch/res/res_monitor.c
team/oej/peermatch/res/res_musiconhold.c
team/oej/peermatch/res/res_odbc.c
team/oej/peermatch/res/res_osp.c
team/oej/peermatch/res/res_smdi.c
team/oej/peermatch/res/res_snmp.c
team/oej/peermatch/rtp.c
team/oej/peermatch/sounds.txt
team/oej/peermatch/translate.c
team/oej/peermatch/utils.c
team/oej/peermatch/utils/astman.c
Propchange: team/oej/peermatch/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/peermatch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.
Propchange: team/oej/peermatch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/peermatch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Apr 19 00:34:00 2006
@@ -1,1 +1,1 @@
-/trunk:1-18482
+/trunk:1-20293
Modified: team/oej/peermatch/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/.cleancount?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/.cleancount (original)
+++ team/oej/peermatch/.cleancount Wed Apr 19 00:34:00 2006
@@ -1,1 +1,1 @@
-13
+15
Modified: team/oej/peermatch/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/Makefile?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/Makefile (original)
+++ team/oej/peermatch/Makefile Wed Apr 19 00:34:00 2006
@@ -89,6 +89,10 @@
# Optional debugging parameters
DEBUG_THREADS = #-DDUMP_SCHEDULER #-DDEBUG_SCHEDULER #-DDEBUG_THREADS #-DDO_CRASH #-DDETECT_DEADLOCKS
+
+# If you want to debug channel locking, try this (depends on code using
+# ast_channel_lock and companions to work)
+DEBUG_THREADS += #-DDEBUG_CHANNEL_LOCKS
# Uncomment next one to enable ast_frame tracing (for debugging)
TRACE_FRAMES = #-DTRACE_FRAMES
@@ -674,7 +678,6 @@
if [ -n "$(OLDHEADERS)" ]; then \
rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
fi
- rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
@@ -693,7 +696,6 @@
else \
echo "You need to do cvs update -d not just cvs update" ; \
fi
- ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . )
if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
@echo " +---- Asterisk Installation Complete -------+"
@echo " + +"
Modified: team/oej/peermatch/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/UPGRADE.txt?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/UPGRADE.txt (original)
+++ team/oej/peermatch/UPGRADE.txt Wed Apr 19 00:34:00 2006
@@ -1,5 +1,10 @@
Information for Upgrading From Previous Asterisk Releases
=========================================================
+
+PBX Core:
+
+* The (very old and undocumented) ability to use BYEXTENSION for dialing
+ instead of ${EXTEN} has been removed.
Command Line Interface:
@@ -30,6 +35,15 @@
using indication tones, so typing in skip would give you unexpected results.
* OSPAuth is added to authenticate OSP tokens in in_bound call setup messages.
+
+Manager:
+
+* After executing the 'status' manager action, the "Status" manager events
+ included the header "CallerID:" which was actually only the CallerID number,
+ and not the full CallerID string. This header has been renamed to
+ "CallerIDNum". For compatibility purposes, the CallerID parameter will remain
+ until after the release of 1.4, when it will be removed. Please use the time
+ during the 1.4 release to make this transition.
Variables:
Modified: team/oej/peermatch/acl.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/acl.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/acl.c (original)
+++ team/oej/peermatch/acl.c Wed Apr 19 00:34:00 2006
@@ -70,10 +70,6 @@
#include "asterisk/lock.h"
#include "asterisk/srv.h"
#include "asterisk/compat.h"
-
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)
-AST_MUTEX_DEFINE_STATIC(routeseq_lock);
-#endif
struct ast_ha {
/* Host access rule */
Modified: team/oej/peermatch/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/app.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/app.c (original)
+++ team/oej/peermatch/app.c Wed Apr 19 00:34:00 2006
@@ -552,7 +552,6 @@
struct ast_dsp *sildet=NULL; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
- int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
struct ast_silence_generator *silgen = NULL;
@@ -675,7 +674,7 @@
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
- gotsilence = 1;
+ res = 'S';
outmsg=2;
break;
}
@@ -740,19 +739,13 @@
for (x=0;x<fmtcnt;x++) {
if (!others[x])
break;
- if (res > 0) {
- if (totalsilence)
- ast_stream_rewind(others[x], totalsilence-200);
- else
- ast_stream_rewind(others[x], 200);
- }
+ if (res > 0)
+ ast_stream_rewind(others[x], totalsilence ? totalsilence-200 : 200);
ast_truncstream(others[x]);
ast_closestream(others[x]);
}
- if (rfmt) {
- if (ast_set_read_format(chan, rfmt)) {
- ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
- }
+ if (rfmt && ast_set_read_format(chan, rfmt)) {
+ ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
}
if (outmsg > 1) {
/* Let them know recording is stopped */
@@ -779,7 +772,6 @@
struct ast_dsp *sildet; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
- int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
char prependfile[80];
@@ -898,7 +890,7 @@
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
- gotsilence = 1;
+ res = 'S';
outmsg=2;
break;
}
@@ -984,17 +976,13 @@
ast_filedelete(prependfile, sfmt[x]);
}
}
- if (rfmt) {
- if (ast_set_read_format(chan, rfmt)) {
- ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
- }
- }
- if (outmsg) {
- if (outmsg > 1) {
- /* Let them know it worked */
- ast_streamfile(chan, "auth-thankyou", chan->language);
- ast_waitstream(chan, "");
- }
+ if (rfmt && ast_set_read_format(chan, rfmt)) {
+ ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
+ }
+ if (outmsg > 1) {
+ /* Let them know it worked */
+ ast_streamfile(chan, "auth-thankyou", chan->language);
+ ast_waitstream(chan, "");
}
return res;
}
Modified: team/oej/peermatch/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/Makefile?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/Makefile (original)
+++ team/oej/peermatch/apps/Makefile Wed Apr 19 00:34:00 2006
@@ -59,7 +59,7 @@
rm -f .depend
clean: clean-depend
- rm -f *.so *.o look
+ rm -f *.so *.o
%.so : %.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
@@ -75,14 +75,10 @@
uninstall:
-look: look.c
- $(CC) -pipe -O6 -g look.c -o look -lncurses
-
ifeq (SunOS,$(shell uname))
app_chanspy.so: app_chanspy.o
$(CC) $(SOLINK) -o $@ $< -lrt
endif
-
ifneq ($(wildcard .depend),)
include .depend
Modified: team/oej/peermatch/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_adsiprog.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_adsiprog.c (original)
+++ team/oej/peermatch/apps/app_adsiprog.c Wed Apr 19 00:34:00 2006
@@ -49,8 +49,6 @@
#include "asterisk/utils.h"
#include "asterisk/lock.h"
-static char *tdesc = "Asterisk ADSI Programming Application";
-
static char *app = "ADSIProg";
static char *synopsis = "Load Asterisk ADSI Scripts into phone";
@@ -60,8 +58,6 @@
static char *descrip =
" ADSIProg(script): This application programs an ADSI Phone with the given\n"
"script. If nothing is specified, the default script (asterisk.adsi) is used.\n";
-
-LOCAL_USER_DECL;
struct adsi_event {
int id;
@@ -1570,35 +1566,32 @@
return res;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
int res;
+
+ STANDARD_HANGUP_LOCALUSERS;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
return res;
}
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+ __mod_desc = mod;
return ast_register_application(app, adsi_exec, synopsis, descrip);
}
-char *description(void)
-{
- return tdesc;
-}
-
-int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-char *key()
+static const char *description(void)
+{
+ return "Asterisk ADSI Programming Application";
+}
+
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
+STD_MOD(MOD_1, NULL, NULL, NULL);
Modified: team/oej/peermatch/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_alarmreceiver.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_alarmreceiver.c (original)
+++ team/oej/peermatch/apps/app_alarmreceiver.c Wed Apr 19 00:34:00 2006
@@ -68,8 +68,6 @@
typedef struct event_node event_node_t;
-static char *tdesc = "Alarm Receiver for Asterisk";
-
static char *app = "AlarmReceiver";
static char *synopsis = "Provide support for receving alarm reports from a burglar or fire alarm panel";
@@ -98,8 +96,6 @@
/* Misc variables */
static char event_file[14] = "/event-XXXXXX";
-
-LOCAL_USER_DECL;
/*
* Attempt to access a database variable and increment it,
@@ -820,7 +816,7 @@
*/
-int unload_module(void)
+static int unload_module(void *mod)
{
int res;
@@ -831,25 +827,21 @@
return res;
}
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+ __mod_desc = mod;
load_config();
return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
}
-char *description(void)
-{
- return tdesc;
-}
-
-int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-char *key()
+static const char *description(void)
+{
+ return "Alarm Receiver for Asterisk";
+}
+
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
+STD_MOD1;
Modified: team/oej/peermatch/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_amd.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_amd.c (original)
+++ team/oej/peermatch/apps/app_amd.c Wed Apr 19 00:34:00 2006
@@ -35,7 +35,6 @@
#include "asterisk/app.h"
-static char *tdesc = "Answering Machine Detection Application";
static char *app = "AMD";
static char *synopsis = "Attempts to detect answering machines";
static char *descrip =
@@ -73,9 +72,6 @@
" MAXWORDS-<%d wordsCount>-<%d maximumNumberOfWords>\n"
" LONGGREETING-<%d voiceDuration>-<%d greeting>\n";
-
-LOCAL_USER_DECL;
-
#define STATE_IN_WORD 1
#define STATE_IN_SILENCE 2
@@ -393,38 +389,33 @@
return;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+ __mod_desc = mod;
load_config();
return ast_register_application(app, amd_exec, synopsis, descrip);
}
-int reload(void)
+static int reload(void *mod)
{
load_config();
return 0;
}
-char *description(void)
-{
- return tdesc;
-}
-
-int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-char *key()
+static const char *description(void)
+{
+ return "Answering Machine Detection Application";
+}
+
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+STD_MOD(MOD_1, reload, NULL, NULL);
Modified: team/oej/peermatch/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_authenticate.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_authenticate.c (original)
+++ team/oej/peermatch/apps/app_authenticate.c Wed Apr 19 00:34:00 2006
@@ -62,7 +62,6 @@
AST_APP_OPTION('r', OPT_REMOVE),
});
-static char *tdesc = "Authentication Application";
static char *app = "Authenticate";
@@ -91,8 +90,6 @@
" press the '#' key).\n"
" Defaults to 0 - no limit - wait for the user press the '#' key.\n"
;
-
-LOCAL_USER_DECL;
static int auth_exec(struct ast_channel *chan, void *data)
{
@@ -236,35 +233,31 @@
return res;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
int res;
+ STANDARD_HANGUP_LOCALUSERS;
+
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
return res;
}
-int load_module(void)
+static int load_module(void *mod)
{
return ast_register_application(app, auth_exec, synopsis, descrip);
}
-char *description(void)
-{
- return tdesc;
-}
-
-int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-char *key()
+static const char *description(void)
+{
+ return "Authentication Application";
+}
+
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
+STD_MOD(MOD_1, NULL, NULL, NULL);
Modified: team/oej/peermatch/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_cdr.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_cdr.c (original)
+++ team/oej/peermatch/apps/app_cdr.c Wed Apr 19 00:34:00 2006
@@ -27,8 +27,6 @@
#include <sys/types.h>
#include <stdlib.h>
-
-#define STATIC_MODULE
#include "asterisk.h"
@@ -63,7 +61,7 @@
return 0;
}
-STATIC_MODULE int unload_module(void)
+static int unload_module(void *mod)
{
int res;
@@ -74,24 +72,17 @@
return res;
}
-STATIC_MODULE int load_module(void)
+static int load_module(void *mod)
{
return ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip);
}
-STATIC_MODULE char *description(void)
+static const char *description(void)
{
return "Tell Asterisk to not maintain a CDR for the current call";
}
-STATIC_MODULE int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-STATIC_MODULE char *key(void)
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/peermatch/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_chanisavail.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_chanisavail.c (original)
+++ team/oej/peermatch/apps/app_chanisavail.c Wed Apr 19 00:34:00 2006
@@ -47,8 +47,6 @@
#include "asterisk/app.h"
#include "asterisk/devicestate.h"
#include "asterisk/options.h"
-
-static char *tdesc = "Check channel availability";
static char *app = "ChanIsAvail";
@@ -157,7 +155,7 @@
return 0;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
int res = 0;
@@ -168,24 +166,20 @@
return res;
}
-int load_module(void)
+static int load_module(void *mod)
{
+ __mod_desc = mod;
return ast_register_application(app, chanavail_exec, synopsis, descrip);
}
-char *description(void)
+static const char *description(void)
{
- return tdesc;
+ return "Check channel availability";
}
-int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
+STD_MOD1;
Modified: team/oej/peermatch/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_channelredirect.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_channelredirect.c (original)
+++ team/oej/peermatch/apps/app_channelredirect.c Wed Apr 19 00:34:00 2006
@@ -41,7 +41,6 @@
#include "asterisk/app.h"
#include "asterisk/features.h"
-static char *tdesc = "Channel Redirect";
static char *app = "ChannelRedirect";
static char *synopsis = "Redirects given channel to a dialplan target.";
static char *descrip =
@@ -121,7 +120,7 @@
return res;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
int res;
@@ -132,26 +131,20 @@
return res;
}
-int load_module(void)
+static int load_module(void *mod)
{
+ __mod_desc = mod;
return ast_register_application(app, asyncgoto_exec, synopsis, descrip);
}
-char *description(void)
+static const char *description(void)
{
- return tdesc;
+ return "Channel Redirect";
}
-int usecount(void)
-{
- int res;
-
- STANDARD_USECOUNT(res);
-
- return res;
-}
-
-char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
+STD_MOD1;
Modified: team/oej/peermatch/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_chanspy.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_chanspy.c (original)
+++ team/oej/peermatch/apps/app_chanspy.c Wed Apr 19 00:34:00 2006
@@ -554,7 +554,7 @@
ALL_DONE(u, res);
}
-int unload_module(void)
+static int unload_module(void *mod)
{
int res;
@@ -565,24 +565,20 @@
return res;
}
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+ __mod_desc = mod;
return ast_register_application(app, chanspy_exec, synopsis, desc);
}
-char *description(void)
+static const char *description(void)
{
return (char *) synopsis;
}
-int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
+STD_MOD(MOD_1, NULL, NULL, NULL);
Modified: team/oej/peermatch/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_controlplayback.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_controlplayback.c (original)
+++ team/oej/peermatch/apps/app_controlplayback.c Wed Apr 19 00:34:00 2006
@@ -43,8 +43,6 @@
#include "asterisk/translate.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
-
-static const char *tdesc = "Control Playback Application";
static const char *app = "ControlPlayback";
@@ -156,36 +154,26 @@
return res;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
int res;
-
res = ast_unregister_application(app);
-
- STANDARD_HANGUP_LOCALUSERS;
-
return res;
}
-int load_module(void)
+static int load_module(void *mod)
{
return ast_register_application(app, controlplayback_exec, synopsis, descrip);
}
-char *description(void)
+static const char *description(void)
{
- return (char *) tdesc;
+ return "Control Playback Application";
}
-int usecount(void)
-{
- int res;
-
- STANDARD_USECOUNT(res);
- return res;
-}
-
-char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
+STD_MOD(MOD_1, NULL, NULL, NULL);
Modified: team/oej/peermatch/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_db.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_db.c (original)
+++ team/oej/peermatch/apps/app_db.c Wed Apr 19 00:34:00 2006
@@ -47,8 +47,6 @@
#include "asterisk/astdb.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
-
-static char *tdesc = "Database Access Functions";
static char *d_descrip =
" DBdel(family/key): This applicaiton will delete a key from the Asterisk\n"
@@ -145,41 +143,35 @@
return 0;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
int retval;
retval = ast_unregister_application(dt_app);
retval |= ast_unregister_application(d_app);
- STANDARD_HANGUP_LOCALUSERS;
-
return retval;
}
-int load_module(void)
+static int load_module(void *mod)
{
int retval;
+ __mod_desc = mod;
retval = ast_register_application(d_app, del_exec, d_synopsis, d_descrip);
retval |= ast_register_application(dt_app, deltree_exec, dt_synopsis, dt_descrip);
return retval;
}
-char *description(void)
+static const char *description(void)
{
- return tdesc;
+ return "Database Access Functions";
}
-int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
+STD_MOD(MOD_1, NULL, NULL, NULL);
Modified: team/oej/peermatch/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_dial.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_dial.c (original)
+++ team/oej/peermatch/apps/app_dial.c Wed Apr 19 00:34:00 2006
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster at digium.com>
*
@@ -35,7 +35,6 @@
#include <sys/signal.h>
#include <netinet/in.h>
-#define STATIC_MODULE
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -60,8 +59,6 @@
#include "asterisk/manager.h"
#include "asterisk/privacy.h"
#include "asterisk/stringfields.h"
-
-static char *tdesc = "Dialing Application";
static char *app = "Dial";
@@ -308,6 +305,8 @@
if (chan->cdr) \
ast_cdr_failed(chan->cdr); \
numnochan++; \
+ break; \
+ case AST_CAUSE_NORMAL_CLEARING: \
break; \
default: \
numnochan++; \
@@ -734,12 +733,12 @@
static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags *peerflags)
{
- int res=-1;
+ int res = -1;
struct localuser *u;
char *tech, *number, *rest, *cur;
char privcid[256];
char privintro[1024];
- struct dial_localuser *outgoing=NULL, *tmp;
+ struct dial_localuser *outgoing = NULL, *tmp;
struct ast_channel *peer;
int to;
int numbusy = 0;
@@ -747,25 +746,23 @@
int numnochan = 0;
int cause;
char numsubst[AST_MAX_EXTENSION];
- char restofit[AST_MAX_EXTENSION];
char cidname[AST_MAX_EXTENSION];
char toast[80];
- char *newnum;
char *l;
- int privdb_val=0;
- unsigned int calldurationlimit=0;
+ int privdb_val = 0;
+ unsigned int calldurationlimit = 0;
struct ast_bridge_config config;
long timelimit = 0;
long play_warning = 0;
- long warning_freq=0;
- const char *warning_sound=NULL;
- const char *end_sound=NULL;
- const char *start_sound=NULL;
- char *dtmfcalled=NULL, *dtmfcalling=NULL;
+ long warning_freq = 0;
+ const char *warning_sound = NULL;
+ const char *end_sound = NULL;
+ const char *start_sound = NULL;
+ char *dtmfcalled = NULL, *dtmfcalling = NULL;
const char *var;
char status[256];
- int play_to_caller=0,play_to_callee=0;
- int sentringing=0, moh=0;
+ int play_to_caller = 0, play_to_callee = 0;
+ int sentringing = 0, moh = 0;
const char *outbound_group = NULL;
const char *macro_result = NULL;
char *macro_transfer_dest = NULL;
@@ -812,8 +809,13 @@
if (ast_test_flag(&opts, OPT_DURATION_STOP) && !ast_strlen_zero(opt_args[OPT_ARG_DURATION_STOP])) {
calldurationlimit = atoi(opt_args[OPT_ARG_DURATION_STOP]);
+ if (!calldurationlimit) {
+ ast_log(LOG_WARNING, "Dial does not accept S(%s), hanging up.\n", opt_args[OPT_ARG_DURATION_STOP]);
+ LOCAL_USER_REMOVE(u);
+ return -1;
+ }
if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %d seconds.\n", calldurationlimit);
+ ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %d seconds.\n", calldurationlimit);
}
if (ast_test_flag(&opts, OPT_SENDDTMF) && !ast_strlen_zero(opt_args[OPT_ARG_SENDDTMF])) {
@@ -837,8 +839,24 @@
warning_freq = atol(warnfreq_str);
if (!timelimit) {
- timelimit = play_to_caller = play_to_callee = play_warning = warning_freq = 0;
- warning_sound = NULL;
+ ast_log(LOG_WARNING, "Dial does not accept L(%s), hanging up.\n", limit_str);
+ LOCAL_USER_REMOVE(u);
+ return -1;
+ } else if (play_warning > timelimit) {
+ /* If the first warning is requested _after_ the entire call would end,
+ and no warning frequency is requested, then turn off the warning. If
+ a warning frequency is requested, reduce the 'first warning' time by
+ that frequency until it falls within the call's total time limit.
+ */
+
+ if (!warning_freq) {
+ play_warning = 0;
+ } else {
+ while (play_warning > timelimit)
+ play_warning -= warning_freq;
+ if (play_warning < 1)
+ play_warning = warning_freq = 0;
+ }
}
var = pbx_builtin_getvar_helper(chan,"LIMIT_PLAYAUDIO_CALLER");
@@ -848,33 +866,35 @@
play_to_callee = var ? ast_true(var) : 0;
if (!play_to_caller && !play_to_callee)
- play_to_caller=1;
+ play_to_caller = 1;
var = pbx_builtin_getvar_helper(chan,"LIMIT_WARNING_FILE");
- warning_sound = var ? var : "timeleft";
+ warning_sound = (!ast_strlen_zero(var)) ? var : "timeleft";
var = pbx_builtin_getvar_helper(chan,"LIMIT_TIMEOUT_FILE");
- end_sound = var ? var : NULL;
+ end_sound = (!ast_strlen_zero(var)) ? var : NULL;
var = pbx_builtin_getvar_helper(chan,"LIMIT_CONNECT_FILE");
- start_sound = var ? var : NULL;
+ start_sound = (!ast_strlen_zero(var)) ? var : NULL;
/* undo effect of S(x) in case they are both used */
- calldurationlimit = 0;
- /* more efficient do it like S(x) does since no advanced opts*/
- if (!play_warning && !start_sound && !end_sound && timelimit) {
- calldurationlimit = timelimit/1000;
+ calldurationlimit = 0;
+ /* more efficient to do it like S(x) does since no advanced opts */
+ if (!play_warning && !start_sound && !end_sound && timelimit) {
+ calldurationlimit = timelimit / 1000;
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Setting call duration limit to %d seconds.\n", calldurationlimit);
timelimit = play_to_caller = play_to_callee = play_warning = warning_freq = 0;
} else if (option_verbose > 2) {
ast_verbose(VERBOSE_PREFIX_3 "Limit Data for this call:\n");
- ast_verbose(VERBOSE_PREFIX_3 "- timelimit = %ld\n", timelimit);
- ast_verbose(VERBOSE_PREFIX_3 "- play_warning = %ld\n", play_warning);
- ast_verbose(VERBOSE_PREFIX_3 "- play_to_caller= %s\n", play_to_caller ? "yes" : "no");
- ast_verbose(VERBOSE_PREFIX_3 "- play_to_callee= %s\n", play_to_callee ? "yes" : "no");
- ast_verbose(VERBOSE_PREFIX_3 "- warning_freq = %ld\n", warning_freq);
- ast_verbose(VERBOSE_PREFIX_3 "- start_sound = %s\n", start_sound ? start_sound : "UNDEF");
- ast_verbose(VERBOSE_PREFIX_3 "- warning_sound = %s\n", warning_sound ? warning_sound : "UNDEF");
- ast_verbose(VERBOSE_PREFIX_3 "- end_sound = %s\n", end_sound ? end_sound : "UNDEF");
+ ast_verbose(VERBOSE_PREFIX_4 "timelimit = %ld\n", timelimit);
+ ast_verbose(VERBOSE_PREFIX_4 "play_warning = %ld\n", play_warning);
+ ast_verbose(VERBOSE_PREFIX_4 "play_to_caller = %s\n", play_to_caller ? "yes" : "no");
+ ast_verbose(VERBOSE_PREFIX_4 "play_to_callee = %s\n", play_to_callee ? "yes" : "no");
+ ast_verbose(VERBOSE_PREFIX_4 "warning_freq = %ld\n", warning_freq);
+ ast_verbose(VERBOSE_PREFIX_4 "start_sound = %s\n", start_sound);
+ ast_verbose(VERBOSE_PREFIX_4 "warning_sound = %s\n", warning_sound);
+ ast_verbose(VERBOSE_PREFIX_4 "end_sound = %s\n", end_sound);
}
}
@@ -1007,14 +1027,6 @@
ast_set2_flag(tmp, args.url, DIAL_NOFORWARDHTML);
}
ast_copy_string(numsubst, number, sizeof(numsubst));
- /* If we're dialing by extension, look at the extension to know what to dial */
- if ((newnum = strstr(numsubst, "BYEXTENSION"))) {
- /* strlen("BYEXTENSION") == 11 */
- ast_copy_string(restofit, newnum + 11, sizeof(restofit));
- snprintf(newnum, sizeof(numsubst) - (newnum - numsubst), "%s%s", chan->exten,restofit);
- if (option_debug)
- ast_log(LOG_DEBUG, "Dialing by extension %s\n", numsubst);
- }
/* Request the peer */
tmp->chan = ast_request(tech, chan->nativeformats, numsubst, &cause);
if (!tmp->chan) {
@@ -1716,7 +1728,7 @@
}
-STATIC_MODULE int unload_module(void)
+static int unload_module(void *mod)
{
int res;
@@ -1728,29 +1740,24 @@
return res;
}
-STATIC_MODULE int load_module(void)
+static int load_module(void *mod)
{
int res;
+ __mod_desc = mod;
res = ast_register_application(app, dial_exec, synopsis, descrip);
res |= ast_register_application(rapp, retrydial_exec, rsynopsis, rdescrip);
return res;
}
-STATIC_MODULE char *description(void)
+static const char *description(void)
{
- return tdesc;
+ return "Dialing Application";
+
}
-STATIC_MODULE int usecount(void)
-{
- int res;
- STANDARD_USECOUNT(res);
- return res;
-}
-
-STATIC_MODULE char *key(void)
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/peermatch/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/oej/peermatch/apps/app_dictate.c?rev=21307&r1=21306&r2=21307&view=diff
==============================================================================
--- team/oej/peermatch/apps/app_dictate.c (original)
+++ team/oej/peermatch/apps/app_dictate.c Wed Apr 19 00:34:00 2006
@@ -46,7 +46,6 @@
#include "asterisk/lock.h"
#include "asterisk/app.h"
-static char *tdesc = "Virtual Dictation Machine";
static char *app = "Dictate";
static char *synopsis = "Virtual Dictation Machine";
static char *desc = " Dictate([<base_dir>[|<filename>]])\n"
@@ -336,36 +335,27 @@
return res;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
int res;
-
res = ast_unregister_application(app);
-
- STANDARD_HANGUP_LOCALUSERS;
-
return res;
}
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+ __mod_desc = mod;
[... 22661 lines stripped ...]
More information about the asterisk-commits
mailing list