[asterisk-commits] branch oej/codecnegotiation r18633 - in
/team/oej/codecnegotiation: ./ apps/ ...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Apr 9 12:22:09 MST 2006
Author: oej
Date: Sun Apr 9 14:20:41 2006
New Revision: 18633
URL: http://svn.digium.com/view/asterisk?rev=18633&view=rev
Log:
Reset, resolve, go
Modified:
team/oej/codecnegotiation/ (props changed)
team/oej/codecnegotiation/Makefile
team/oej/codecnegotiation/UPGRADE.txt
team/oej/codecnegotiation/apps/Makefile
team/oej/codecnegotiation/apps/app_adsiprog.c
team/oej/codecnegotiation/apps/app_alarmreceiver.c
team/oej/codecnegotiation/apps/app_amd.c
team/oej/codecnegotiation/apps/app_authenticate.c
team/oej/codecnegotiation/apps/app_cdr.c
team/oej/codecnegotiation/apps/app_chanisavail.c
team/oej/codecnegotiation/apps/app_channelredirect.c
team/oej/codecnegotiation/apps/app_chanspy.c
team/oej/codecnegotiation/apps/app_controlplayback.c
team/oej/codecnegotiation/apps/app_db.c
team/oej/codecnegotiation/apps/app_dial.c
team/oej/codecnegotiation/apps/app_dictate.c
team/oej/codecnegotiation/apps/app_directed_pickup.c
team/oej/codecnegotiation/apps/app_directory.c
team/oej/codecnegotiation/apps/app_disa.c
team/oej/codecnegotiation/apps/app_dumpchan.c
team/oej/codecnegotiation/apps/app_echo.c
team/oej/codecnegotiation/apps/app_exec.c
team/oej/codecnegotiation/apps/app_externalivr.c
team/oej/codecnegotiation/apps/app_festival.c
team/oej/codecnegotiation/apps/app_flash.c
team/oej/codecnegotiation/apps/app_forkcdr.c
team/oej/codecnegotiation/apps/app_getcpeid.c
team/oej/codecnegotiation/apps/app_hasnewvoicemail.c
team/oej/codecnegotiation/apps/app_ices.c
team/oej/codecnegotiation/apps/app_image.c
team/oej/codecnegotiation/apps/app_ivrdemo.c
team/oej/codecnegotiation/apps/app_lookupblacklist.c
team/oej/codecnegotiation/apps/app_lookupcidname.c
team/oej/codecnegotiation/apps/app_macro.c
team/oej/codecnegotiation/apps/app_meetme.c
team/oej/codecnegotiation/apps/app_milliwatt.c
team/oej/codecnegotiation/apps/app_mixmonitor.c
team/oej/codecnegotiation/apps/app_morsecode.c
team/oej/codecnegotiation/apps/app_mp3.c
team/oej/codecnegotiation/apps/app_nbscat.c
team/oej/codecnegotiation/apps/app_osplookup.c
team/oej/codecnegotiation/apps/app_page.c
team/oej/codecnegotiation/apps/app_parkandannounce.c
team/oej/codecnegotiation/apps/app_playback.c
team/oej/codecnegotiation/apps/app_privacy.c
team/oej/codecnegotiation/apps/app_queue.c
team/oej/codecnegotiation/apps/app_random.c
team/oej/codecnegotiation/apps/app_read.c
team/oej/codecnegotiation/apps/app_readfile.c
team/oej/codecnegotiation/apps/app_realtime.c
team/oej/codecnegotiation/apps/app_record.c
team/oej/codecnegotiation/apps/app_rpt.c
team/oej/codecnegotiation/apps/app_sayunixtime.c
team/oej/codecnegotiation/apps/app_senddtmf.c
team/oej/codecnegotiation/apps/app_sendtext.c
team/oej/codecnegotiation/apps/app_setcallerid.c
team/oej/codecnegotiation/apps/app_setcdruserfield.c
team/oej/codecnegotiation/apps/app_settransfercapability.c
team/oej/codecnegotiation/apps/app_skel.c
team/oej/codecnegotiation/apps/app_sms.c
team/oej/codecnegotiation/apps/app_softhangup.c
team/oej/codecnegotiation/apps/app_stack.c
team/oej/codecnegotiation/apps/app_system.c
team/oej/codecnegotiation/apps/app_talkdetect.c
team/oej/codecnegotiation/apps/app_test.c
team/oej/codecnegotiation/apps/app_transfer.c
team/oej/codecnegotiation/apps/app_url.c
team/oej/codecnegotiation/apps/app_userevent.c
team/oej/codecnegotiation/apps/app_verbose.c
team/oej/codecnegotiation/apps/app_voicemail.c
team/oej/codecnegotiation/apps/app_waitforring.c
team/oej/codecnegotiation/apps/app_waitforsilence.c
team/oej/codecnegotiation/apps/app_while.c
team/oej/codecnegotiation/apps/app_zapateller.c
team/oej/codecnegotiation/apps/app_zapbarge.c
team/oej/codecnegotiation/apps/app_zapras.c
team/oej/codecnegotiation/apps/app_zapscan.c
team/oej/codecnegotiation/cdr/cdr_csv.c
team/oej/codecnegotiation/cdr/cdr_custom.c
team/oej/codecnegotiation/cdr/cdr_manager.c
team/oej/codecnegotiation/cdr/cdr_odbc.c
team/oej/codecnegotiation/cdr/cdr_pgsql.c
team/oej/codecnegotiation/cdr/cdr_sqlite.c
team/oej/codecnegotiation/cdr/cdr_tds.c
team/oej/codecnegotiation/channels/chan_agent.c
team/oej/codecnegotiation/channels/chan_alsa.c
team/oej/codecnegotiation/channels/chan_features.c
team/oej/codecnegotiation/channels/chan_h323.c
team/oej/codecnegotiation/channels/chan_iax2.c
team/oej/codecnegotiation/channels/chan_local.c
team/oej/codecnegotiation/channels/chan_mgcp.c
team/oej/codecnegotiation/channels/chan_misdn.c
team/oej/codecnegotiation/channels/chan_nbs.c
team/oej/codecnegotiation/channels/chan_oss.c
team/oej/codecnegotiation/channels/chan_phone.c
team/oej/codecnegotiation/channels/chan_sip.c
team/oej/codecnegotiation/channels/chan_skinny.c
team/oej/codecnegotiation/channels/chan_vpb.c
team/oej/codecnegotiation/channels/chan_zap.c
team/oej/codecnegotiation/codecs/codec_a_mu.c
team/oej/codecnegotiation/codecs/codec_adpcm.c
team/oej/codecnegotiation/codecs/codec_alaw.c
team/oej/codecnegotiation/codecs/codec_g723_1.c
team/oej/codecnegotiation/codecs/codec_g726.c
team/oej/codecnegotiation/codecs/codec_gsm.c
team/oej/codecnegotiation/codecs/codec_ilbc.c
team/oej/codecnegotiation/codecs/codec_lpc10.c
team/oej/codecnegotiation/codecs/codec_speex.c
team/oej/codecnegotiation/codecs/codec_ulaw.c
team/oej/codecnegotiation/configs/osp.conf.sample
team/oej/codecnegotiation/doc/channelvariables.txt
team/oej/codecnegotiation/formats/format_g723.c
team/oej/codecnegotiation/formats/format_g726.c
team/oej/codecnegotiation/formats/format_g729.c
team/oej/codecnegotiation/formats/format_gsm.c
team/oej/codecnegotiation/formats/format_h263.c
team/oej/codecnegotiation/formats/format_h264.c
team/oej/codecnegotiation/formats/format_ilbc.c
team/oej/codecnegotiation/formats/format_jpeg.c
team/oej/codecnegotiation/formats/format_ogg_vorbis.c
team/oej/codecnegotiation/formats/format_pcm.c
team/oej/codecnegotiation/formats/format_sln.c
team/oej/codecnegotiation/formats/format_vox.c
team/oej/codecnegotiation/formats/format_wav.c
team/oej/codecnegotiation/formats/format_wav_gsm.c
team/oej/codecnegotiation/funcs/func_base64.c
team/oej/codecnegotiation/funcs/func_callerid.c
team/oej/codecnegotiation/funcs/func_cdr.c
team/oej/codecnegotiation/funcs/func_channel.c
team/oej/codecnegotiation/funcs/func_curl.c
team/oej/codecnegotiation/funcs/func_cut.c
team/oej/codecnegotiation/funcs/func_db.c
team/oej/codecnegotiation/funcs/func_enum.c
team/oej/codecnegotiation/funcs/func_env.c
team/oej/codecnegotiation/funcs/func_groupcount.c
team/oej/codecnegotiation/funcs/func_language.c
team/oej/codecnegotiation/funcs/func_logic.c
team/oej/codecnegotiation/funcs/func_math.c
team/oej/codecnegotiation/funcs/func_md5.c
team/oej/codecnegotiation/funcs/func_moh.c
team/oej/codecnegotiation/funcs/func_odbc.c
team/oej/codecnegotiation/funcs/func_rand.c
team/oej/codecnegotiation/funcs/func_sha1.c
team/oej/codecnegotiation/funcs/func_strings.c
team/oej/codecnegotiation/funcs/func_timeout.c
team/oej/codecnegotiation/funcs/func_uri.c
team/oej/codecnegotiation/include/asterisk/astosp.h
team/oej/codecnegotiation/include/asterisk/module.h
team/oej/codecnegotiation/include/asterisk/translate.h
team/oej/codecnegotiation/loader.c
team/oej/codecnegotiation/pbx/pbx_ael.c
team/oej/codecnegotiation/pbx/pbx_config.c
team/oej/codecnegotiation/pbx/pbx_dundi.c
team/oej/codecnegotiation/pbx/pbx_gtkconsole.c
team/oej/codecnegotiation/pbx/pbx_loopback.c
team/oej/codecnegotiation/pbx/pbx_realtime.c
team/oej/codecnegotiation/pbx/pbx_spool.c
team/oej/codecnegotiation/res/res_adsi.c
team/oej/codecnegotiation/res/res_agi.c
team/oej/codecnegotiation/res/res_clioriginate.c
team/oej/codecnegotiation/res/res_config_odbc.c
team/oej/codecnegotiation/res/res_config_pgsql.c
team/oej/codecnegotiation/res/res_convert.c
team/oej/codecnegotiation/res/res_crypto.c
team/oej/codecnegotiation/res/res_features.c
team/oej/codecnegotiation/res/res_indications.c
team/oej/codecnegotiation/res/res_monitor.c
team/oej/codecnegotiation/res/res_musiconhold.c
team/oej/codecnegotiation/res/res_odbc.c
team/oej/codecnegotiation/res/res_osp.c
team/oej/codecnegotiation/res/res_smdi.c
team/oej/codecnegotiation/res/res_snmp.c
team/oej/codecnegotiation/translate.c
Propchange: team/oej/codecnegotiation/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/codecnegotiation/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/oej/codecnegotiation/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Apr 9 14:20:41 2006
@@ -1,1 +1,1 @@
-/trunk:1-18006
+/trunk:1-18632
Modified: team/oej/codecnegotiation/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/Makefile?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/Makefile (original)
+++ team/oej/codecnegotiation/Makefile Sun Apr 9 14:20:41 2006
@@ -124,35 +124,56 @@
# Don't use together with -DBUSYDETECT_TONEONLY
BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
-ifneq ($(OSARCH),SunOS)
+# Define standard directories for various platforms
+# These apply if they are not redefined in asterisk.conf
+ifeq ($(OSARCH),SunOS)
+ ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
+ ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
+ ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
+ ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
+ ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
+ ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
+ ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
+ ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
+ ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
+ ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
+else
+ifeq ($(OSARCH),FreeBSD)
+ PREFIX?=/usr/local
+ ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
+ ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
+ ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
+ ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
+ ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
+ ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
+ ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
+ ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
+ ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
+ ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
+else
+ ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
- ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
- ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
- MODULES_DIR=$(ASTLIBDIR)/modules
- AGI_DIR=$(ASTVARLIBDIR)/agi-bin
-else
- ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
- ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
- ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
- ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
- ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
- ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
- ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
- ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
- ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
- MODULES_DIR=$(ASTLIBDIR)/modules
- AGI_DIR=$(ASTVARLIBDIR)/agi-bin
-endif
+endif
+endif
+
+# Asterisk.conf is located in ASTETCDIR or by using the -C flag
+# when starting Asterisk
+ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
+MODULES_DIR=$(ASTLIBDIR)/modules
+AGI_DIR=$(ASTVARLIBDIR)/agi-bin
+
+# If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
+HTTP_DOCSDIR=/var/www/html
+# Determine by a grep 'ScriptAlias' of your Apache httpd.conf file
+HTTP_CGIDIR=/var/www/cgi-bin
ASTCFLAGS=
@@ -161,11 +182,6 @@
# Uncomment this to use the older DSP routines
#ASTCFLAGS+=-DOLD_DSP_ROUTINES
-
-# Determine by a grep 'DocumentRoot' of your httpd.conf file
-HTTP_DOCSDIR=/var/www/html
-# Determine by a grep 'ScriptAlias' of your httpd.conf file
-HTTP_CGIDIR=/var/www/cgi-bin
# If the file .asterisk.makeopts is present in your home directory, you can
# include all of your favorite Makefile options so that every time you download
@@ -262,22 +278,6 @@
ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/spandsp
endif
MPG123TARG=freebsd
-
- # XXX FreeBSD paths
- PREFIX?=/usr/local
- ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
- ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
- ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
- ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
- ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
- ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
- ASTCONFPATH=$(ASTETCDIR)/asterisk.conf
- ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
- ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
- ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
- # XXX end FreeBSD paths
-
endif # FreeBSD
ifeq ($(OSARCH),NetBSD)
Modified: team/oej/codecnegotiation/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/UPGRADE.txt?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/UPGRADE.txt (original)
+++ team/oej/codecnegotiation/UPGRADE.txt Sun Apr 9 14:20:41 2006
@@ -29,6 +29,8 @@
"noanswer" will not work. Use s or n. Also there is a new feature i, for
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.
+
Variables:
* The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
@@ -39,6 +41,10 @@
* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now
adjustable from cdr.conf, instead of recompiling.
+
+* OSP applications exports several new variables, ${OSPINHANDLE},
+ ${OSPOUTHANDLE}, ${OSPINTOKEN}, ${OSPOUTTOKEN}, ${OSPCALLING},
+ ${OSPINTIMELIMIT}, and ${OSPOUTTIMELIMIT}
Functions:
@@ -66,6 +72,10 @@
* The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf.
+* OSP support code is removed from SIP channel to OSP applications. ospauth
+ option in sip.conf is removed to osp.conf as authpolicy. allowguest option
+ in sip.conf cannot be set as osp anymore.
+
Installation:
* On BSD systems, the installation directories have changed to more "FreeBSDish" directories. On startup, Asterisk will look for the main configuration in /usr/local/etc/asterisk/asterisk.conf
Modified: team/oej/codecnegotiation/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/Makefile?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/Makefile (original)
+++ team/oej/codecnegotiation/apps/Makefile Sun Apr 9 14:20:41 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/codecnegotiation/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_adsiprog.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_adsiprog.c (original)
+++ team/oej/codecnegotiation/apps/app_adsiprog.c Sun Apr 9 14:20:41 2006
@@ -1586,7 +1586,7 @@
return ast_register_application(app, adsi_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -1598,7 +1598,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_alarmreceiver.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_alarmreceiver.c (original)
+++ team/oej/codecnegotiation/apps/app_alarmreceiver.c Sun Apr 9 14:20:41 2006
@@ -837,7 +837,7 @@
return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -849,7 +849,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_amd.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_amd.c (original)
+++ team/oej/codecnegotiation/apps/app_amd.c Sun Apr 9 14:20:41 2006
@@ -91,7 +91,7 @@
static void isAnsweringMachine(struct ast_channel *chan, void *data)
{
- int res = 0;
+ int res = 0, ret = 0;
struct ast_frame *f = NULL;
@@ -136,8 +136,8 @@
AST_APP_ARG(argMaximumNumberOfWords);
AST_APP_ARG(argSilenceThreshold);
);
-
- ast_verbose(VERBOSE_PREFIX_3 "AMD: %s %s %s (Fmt: %d)\n", chan->name ,chan->cid.cid_ani, chan->cid.cid_rdnis, ast_get_read_format(chan));
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: %s %s %s (Fmt: %d)\n", chan->name ,chan->cid.cid_ani, chan->cid.cid_rdnis, chan->readformat);
/* Lets parse the arguments. */
if (ast_strlen_zero(data)) {
@@ -180,8 +180,9 @@
}
/* Now we're ready to roll! */
-
- ast_verbose(VERBOSE_PREFIX_3 "AMD: initialSilence [%d] greeting [%d] afterGreetingSilence [%d] "
+
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: initialSilence [%d] greeting [%d] afterGreetingSilence [%d] "
"totalAnalysisTime [%d] minimumWordLength [%d] betweenWordsSilence [%d] maximumNumberOfWords [%d] silenceThreshold [%d] \n",
initialSilence, greeting, afterGreetingSilence, totalAnalysisTime,
minimumWordLength, betweenWordsSilence, maximumNumberOfWords, silenceThreshold );
@@ -204,42 +205,45 @@
}
ast_dsp_set_threshold(silenceDetector, silenceThreshold );
- while (ast_waitfor(chan, -1) > -1)
+ while ((ret = ast_waitfor(chan, totalAnalysisTime)))
{
- f = ast_read(chan);
- if (!f ) {
- /* No Frame: Called Party Must Have Dropped */
- ast_verbose(VERBOSE_PREFIX_3 "AMD: HANGUP\n");
- ast_log(LOG_DEBUG, "Got hangup\n");
+ if (ret < 0 || !(f = ast_read(chan))) {
+ /* No Frame OR Error on ast_waitfor : Called Party Must Have Dropped */
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: HANGUP\n");
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Got hangup\n");
strcpy(amdStatus , "HANGUP" );
strcpy(amdCause , "" );
break;
}
- framelength = (ast_codec_get_samples(f) / 8);
- iTotalTime += framelength;
- if (iTotalTime >= totalAnalysisTime ) {
- ast_verbose(VERBOSE_PREFIX_3 "AMD: Channel [%s]. Too long...\n", chan->name );
- ast_frfree(f);
- strcpy(amdStatus , "NOTSURE" );
- sprintf(amdCause , "TOOLONG-%d", iTotalTime );
- break;
- }
if (f->frametype == AST_FRAME_VOICE ) {
+ framelength = (ast_codec_get_samples(f) / DEFAULT_SAMPLES_PER_MS);
+ iTotalTime += framelength;
+ if (iTotalTime >= totalAnalysisTime ) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: Channel [%s]. Too long...\n", chan->name );
+ ast_frfree(f);
+ strcpy(amdStatus , "NOTSURE" );
+ sprintf(amdCause , "TOOLONG-%d", iTotalTime );
+ break;
+ }
dspsilence = 0;
ast_dsp_silence(silenceDetector, f, &dspsilence);
if (dspsilence ) {
silenceDuration = dspsilence;
- /* ast_verbose(VERBOSE_PREFIX_3 "AMD: %d SILENCE: silenceDuration:%d afterGreetingSilence:%d inGreeting:%d\n", currentState, silenceDuration, afterGreetingSilence, inGreeting ); */
if (silenceDuration >= betweenWordsSilence ) {
if (currentState != STATE_IN_SILENCE ) {
previousState = currentState;
- ast_verbose(VERBOSE_PREFIX_3 "AMD: Changed state to STATE_IN_SILENCE\n");
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: Changed state to STATE_IN_SILENCE\n");
}
currentState = STATE_IN_SILENCE;
consecutiveVoiceDuration = 0;
}
if (inInitialSilence == 1 && silenceDuration >= initialSilence ) {
- ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: silenceDuration:%d initialSilence:%d\n",
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: silenceDuration:%d initialSilence:%d\n",
silenceDuration, initialSilence );
ast_frfree(f);
strcpy(amdStatus , "MACHINE" );
@@ -248,7 +252,8 @@
}
if (silenceDuration >= afterGreetingSilence && inGreeting == 1 ) {
- ast_verbose(VERBOSE_PREFIX_3 "AMD: HUMAN: silenceDuration:%d afterGreetingSilence:%d\n",
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: HUMAN: silenceDuration:%d afterGreetingSilence:%d\n",
silenceDuration, afterGreetingSilence );
ast_frfree(f);
strcpy(amdStatus , "HUMAN" );
@@ -258,21 +263,22 @@
} else {
consecutiveVoiceDuration += framelength;
voiceDuration += framelength;
- /* ast_verbose(VERBOSE_PREFIX_3 "AMD: %d VOICE: ConsecutiveVoice:%d voiceDuration:%d inGreeting:%d\n", currentState, consecutiveVoiceDuration, voiceDuration, inGreeting ); */
/* If I have enough consecutive voice to say that I am in a Word, I can only increment the
number of words if my previous state was Silence, which means that I moved into a word. */
if (consecutiveVoiceDuration >= minimumWordLength ) {
if (currentState == STATE_IN_SILENCE ) {
iWordsCount++;
- ast_verbose(VERBOSE_PREFIX_3 "AMD: Word detected. iWordsCount:%d\n", iWordsCount );
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: Word detected. iWordsCount:%d\n", iWordsCount );
previousState = currentState;
currentState = STATE_IN_WORD;
}
}
if (iWordsCount >= maximumNumberOfWords ) {
- ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: iWordsCount:%d\n", iWordsCount );
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: iWordsCount:%d\n", iWordsCount );
ast_frfree(f);
strcpy(amdStatus , "MACHINE" );
sprintf(amdCause , "MAXWORDS-%d-%d", iWordsCount, maximumNumberOfWords );
@@ -280,9 +286,9 @@
}
if (inGreeting == 1 && voiceDuration >= greeting ) {
- ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: voiceDuration:%d greeting:%d\n",
- voiceDuration, greeting );
- ast_frfree(f);
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: voiceDuration:%d greeting:%d\n", voiceDuration, greeting);
+ ast_frfree(f);
strcpy(amdStatus , "MACHINE" );
sprintf(amdCause , "LONGGREETING-%d-%d", voiceDuration, greeting );
break;
@@ -296,12 +302,19 @@
}
ast_frfree(f);
}
+ if (!ret) {
+ /* It took too long to get a frame back. Giving up. */
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD: Channel [%s]. Too long...\n", chan->name );
+ strcpy(amdStatus , "NOTSURE" );
+ sprintf(amdCause , "TOOLONG-%d", iTotalTime );
+ }
pbx_builtin_setvar_helper(chan , "AMDSTATUS" , amdStatus );
pbx_builtin_setvar_helper(chan , "AMDCAUSE" , amdCause );
/* If We Started With A Valid Read Format, Return To It... */
- if (readFormat) {
+ if (readFormat && chan->_state == AST_STATE_UP) {
res = ast_set_read_format(chan, readFormat );
if (res)
ast_log(LOG_WARNING, "AMD: Unable to restore read format on '%s'\n", chan->name);
@@ -371,7 +384,8 @@
}
ast_config_destroy(cfg);
- ast_verbose(VERBOSE_PREFIX_3 "AMD defaults: initialSilence [%d] greeting [%d] afterGreetingSilence [%d] "
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "AMD defaults: initialSilence [%d] greeting [%d] afterGreetingSilence [%d] "
"totalAnalysisTime [%d] minimumWordLength [%d] betweenWordsSilence [%d] maximumNumberOfWords [%d] silenceThreshold [%d] \n",
dfltInitialSilence, dfltGreeting, dfltAfterGreetingSilence, dfltTotalAnalysisTime,
dfltMinimumWordLength, dfltBetweenWordsSilence, dfltMaximumNumberOfWords, dfltSilenceThreshold );
@@ -397,7 +411,7 @@
return 0;
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -409,7 +423,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_authenticate.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_authenticate.c (original)
+++ team/oej/codecnegotiation/apps/app_authenticate.c Sun Apr 9 14:20:41 2006
@@ -252,7 +252,7 @@
return ast_register_application(app, auth_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -264,7 +264,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_cdr.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_cdr.c (original)
+++ team/oej/codecnegotiation/apps/app_cdr.c Sun Apr 9 14:20:41 2006
@@ -79,7 +79,7 @@
return ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip);
}
-STATIC_MODULE char *description(void)
+STATIC_MODULE const char *description(void)
{
return "Tell Asterisk to not maintain a CDR for the current call";
}
@@ -91,7 +91,7 @@
return res;
}
-STATIC_MODULE char *key(void)
+STATIC_MODULE const char *key(void)
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_chanisavail.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_chanisavail.c (original)
+++ team/oej/codecnegotiation/apps/app_chanisavail.c Sun Apr 9 14:20:41 2006
@@ -173,7 +173,7 @@
return ast_register_application(app, chanavail_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -185,7 +185,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_channelredirect.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_channelredirect.c (original)
+++ team/oej/codecnegotiation/apps/app_channelredirect.c Sun Apr 9 14:20:41 2006
@@ -137,7 +137,7 @@
return ast_register_application(app, asyncgoto_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -151,7 +151,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_chanspy.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_chanspy.c (original)
+++ team/oej/codecnegotiation/apps/app_chanspy.c Sun Apr 9 14:20:41 2006
@@ -570,7 +570,7 @@
return ast_register_application(app, chanspy_exec, synopsis, desc);
}
-char *description(void)
+const char *description(void)
{
return (char *) synopsis;
}
@@ -582,7 +582,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_controlplayback.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_controlplayback.c (original)
+++ team/oej/codecnegotiation/apps/app_controlplayback.c Sun Apr 9 14:20:41 2006
@@ -172,7 +172,7 @@
return ast_register_application(app, controlplayback_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return (char *) tdesc;
}
@@ -185,7 +185,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_db.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_db.c (original)
+++ team/oej/codecnegotiation/apps/app_db.c Sun Apr 9 14:20:41 2006
@@ -167,7 +167,7 @@
return retval;
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -179,7 +179,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_dial.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_dial.c (original)
+++ team/oej/codecnegotiation/apps/app_dial.c Sun Apr 9 14:20:41 2006
@@ -1189,10 +1189,6 @@
}
if (peer) {
time(&answer_time);
-#ifdef OSP_SUPPORT
- /* Once call is answered, ditch the OSP Handle */
- pbx_builtin_setvar_helper(chan, "_OSPHANDLE", "");
-#endif
strcpy(status, "ANSWER");
/* Ah ha! Someone answered within the desired timeframe. Of course after this
we will always return with -1 so that it is hung up properly after the
@@ -1742,7 +1738,7 @@
return res;
}
-STATIC_MODULE char *description(void)
+STATIC_MODULE const char *description(void)
{
return tdesc;
}
@@ -1754,7 +1750,7 @@
return res;
}
-STATIC_MODULE char *key(void)
+STATIC_MODULE const char *key(void)
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_dictate.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_dictate.c (original)
+++ team/oej/codecnegotiation/apps/app_dictate.c Sun Apr 9 14:20:41 2006
@@ -352,7 +352,7 @@
return ast_register_application(app, dictate_exec, synopsis, desc);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -364,7 +364,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_directed_pickup.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_directed_pickup.c (original)
+++ team/oej/codecnegotiation/apps/app_directed_pickup.c Sun Apr 9 14:20:41 2006
@@ -150,7 +150,7 @@
return ast_register_application(app, pickup_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return (char *) tdesc;
}
@@ -164,7 +164,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_directory.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_directory.c (original)
+++ team/oej/codecnegotiation/apps/app_directory.c Sun Apr 9 14:20:41 2006
@@ -505,7 +505,7 @@
return ast_register_application(app, directory_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -517,7 +517,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_disa.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_disa.c (original)
+++ team/oej/codecnegotiation/apps/app_disa.c Sun Apr 9 14:20:41 2006
@@ -392,7 +392,7 @@
return ast_register_application(app, disa_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -404,7 +404,7 @@
return res;
}
-char *key(void)
+const char *key(void)
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_dumpchan.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_dumpchan.c (original)
+++ team/oej/codecnegotiation/apps/app_dumpchan.c Sun Apr 9 14:20:41 2006
@@ -173,7 +173,7 @@
return ast_register_application(app, dumpchan_exec, synopsis, desc);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -185,7 +185,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_echo.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_echo.c (original)
+++ team/oej/codecnegotiation/apps/app_echo.c Sun Apr 9 14:20:41 2006
@@ -109,7 +109,7 @@
return ast_register_application(app, echo_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -121,7 +121,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_exec.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_exec.c (original)
+++ team/oej/codecnegotiation/apps/app_exec.c Sun Apr 9 14:20:41 2006
@@ -179,7 +179,7 @@
return res;
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -191,7 +191,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_externalivr.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_externalivr.c (original)
+++ team/oej/codecnegotiation/apps/app_externalivr.c Sun Apr 9 14:20:41 2006
@@ -567,7 +567,7 @@
return ast_register_application(app, app_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return (char *) tdesc;
}
@@ -581,7 +581,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_festival.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_festival.c (original)
+++ team/oej/codecnegotiation/apps/app_festival.c Sun Apr 9 14:20:41 2006
@@ -518,7 +518,7 @@
return ast_register_application(app, festival_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -530,7 +530,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_flash.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_flash.c (original)
+++ team/oej/codecnegotiation/apps/app_flash.c Sun Apr 9 14:20:41 2006
@@ -123,7 +123,7 @@
return ast_register_application(app, flash_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -135,7 +135,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_forkcdr.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_forkcdr.c (original)
+++ team/oej/codecnegotiation/apps/app_forkcdr.c Sun Apr 9 14:20:41 2006
@@ -114,7 +114,7 @@
return ast_register_application(app, forkcdr_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -126,7 +126,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_getcpeid.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/apps/app_getcpeid.c?rev=18633&r1=18632&r2=18633&view=diff
==============================================================================
--- team/oej/codecnegotiation/apps/app_getcpeid.c (original)
+++ team/oej/codecnegotiation/apps/app_getcpeid.c Sun Apr 9 14:20:41 2006
@@ -149,7 +149,7 @@
return ast_register_application(app, cpeid_exec, synopsis, descrip);
}
-char *description(void)
+const char *description(void)
{
return tdesc;
}
@@ -161,7 +161,7 @@
return res;
}
-char *key()
+const char *key()
{
return ASTERISK_GPL_KEY;
}
Modified: team/oej/codecnegotiation/apps/app_hasnewvoicemail.c
[... 13104 lines stripped ...]
More information about the asterisk-commits
mailing list