[svn-commits] branch oej/securertp-trunk r24251 - in /team/oej/securertp-trunk: ./ apps/ cd...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue May 2 11:17:48 MST 2006


Author: oej
Date: Tue May  2 13:17:47 2006
New Revision: 24251

URL: http://svn.digium.com/view/asterisk?rev=24251&view=rev
Log:
Reset automerge

Added:
    team/oej/securertp-trunk/doc/ajam.txt
      - copied unchanged from r18723, trunk/doc/ajam.txt
    team/oej/securertp-trunk/res/res_config_pgsql.c
      - copied unchanged from r18723, trunk/res/res_config_pgsql.c
    team/oej/securertp-trunk/static-http/
      - copied from r18723, trunk/static-http/
    team/oej/securertp-trunk/static-http/ajamdemo.html
      - copied unchanged from r18723, trunk/static-http/ajamdemo.html
    team/oej/securertp-trunk/static-http/astman.css
      - copied unchanged from r18723, trunk/static-http/astman.css
    team/oej/securertp-trunk/static-http/astman.js
      - copied unchanged from r18723, trunk/static-http/astman.js
    team/oej/securertp-trunk/static-http/prototype.js
      - copied unchanged from r18723, trunk/static-http/prototype.js
Removed:
    team/oej/securertp-trunk/formats/format_au.c
    team/oej/securertp-trunk/formats/format_pcm_alaw.c
Modified:
    team/oej/securertp-trunk/   (props changed)
    team/oej/securertp-trunk/.cleancount
    team/oej/securertp-trunk/CREDITS
    team/oej/securertp-trunk/Makefile
    team/oej/securertp-trunk/README
    team/oej/securertp-trunk/UPGRADE.txt
    team/oej/securertp-trunk/app.c
    team/oej/securertp-trunk/apps/Makefile
    team/oej/securertp-trunk/apps/app_adsiprog.c
    team/oej/securertp-trunk/apps/app_alarmreceiver.c
    team/oej/securertp-trunk/apps/app_amd.c
    team/oej/securertp-trunk/apps/app_authenticate.c
    team/oej/securertp-trunk/apps/app_cdr.c
    team/oej/securertp-trunk/apps/app_chanisavail.c
    team/oej/securertp-trunk/apps/app_channelredirect.c
    team/oej/securertp-trunk/apps/app_chanspy.c
    team/oej/securertp-trunk/apps/app_controlplayback.c
    team/oej/securertp-trunk/apps/app_db.c
    team/oej/securertp-trunk/apps/app_dial.c
    team/oej/securertp-trunk/apps/app_dictate.c
    team/oej/securertp-trunk/apps/app_directed_pickup.c
    team/oej/securertp-trunk/apps/app_directory.c
    team/oej/securertp-trunk/apps/app_disa.c
    team/oej/securertp-trunk/apps/app_dumpchan.c
    team/oej/securertp-trunk/apps/app_echo.c
    team/oej/securertp-trunk/apps/app_exec.c
    team/oej/securertp-trunk/apps/app_externalivr.c
    team/oej/securertp-trunk/apps/app_festival.c
    team/oej/securertp-trunk/apps/app_flash.c
    team/oej/securertp-trunk/apps/app_forkcdr.c
    team/oej/securertp-trunk/apps/app_getcpeid.c
    team/oej/securertp-trunk/apps/app_hasnewvoicemail.c
    team/oej/securertp-trunk/apps/app_ices.c
    team/oej/securertp-trunk/apps/app_image.c
    team/oej/securertp-trunk/apps/app_ivrdemo.c
    team/oej/securertp-trunk/apps/app_lookupblacklist.c
    team/oej/securertp-trunk/apps/app_lookupcidname.c
    team/oej/securertp-trunk/apps/app_macro.c
    team/oej/securertp-trunk/apps/app_meetme.c
    team/oej/securertp-trunk/apps/app_milliwatt.c
    team/oej/securertp-trunk/apps/app_mixmonitor.c
    team/oej/securertp-trunk/apps/app_morsecode.c
    team/oej/securertp-trunk/apps/app_mp3.c
    team/oej/securertp-trunk/apps/app_nbscat.c
    team/oej/securertp-trunk/apps/app_osplookup.c
    team/oej/securertp-trunk/apps/app_page.c
    team/oej/securertp-trunk/apps/app_parkandannounce.c
    team/oej/securertp-trunk/apps/app_playback.c
    team/oej/securertp-trunk/apps/app_privacy.c
    team/oej/securertp-trunk/apps/app_queue.c
    team/oej/securertp-trunk/apps/app_random.c
    team/oej/securertp-trunk/apps/app_read.c
    team/oej/securertp-trunk/apps/app_readfile.c
    team/oej/securertp-trunk/apps/app_realtime.c
    team/oej/securertp-trunk/apps/app_record.c
    team/oej/securertp-trunk/apps/app_rpt.c
    team/oej/securertp-trunk/apps/app_sayunixtime.c
    team/oej/securertp-trunk/apps/app_senddtmf.c
    team/oej/securertp-trunk/apps/app_sendtext.c
    team/oej/securertp-trunk/apps/app_setcallerid.c
    team/oej/securertp-trunk/apps/app_setcdruserfield.c
    team/oej/securertp-trunk/apps/app_settransfercapability.c
    team/oej/securertp-trunk/apps/app_skel.c
    team/oej/securertp-trunk/apps/app_sms.c
    team/oej/securertp-trunk/apps/app_softhangup.c
    team/oej/securertp-trunk/apps/app_stack.c
    team/oej/securertp-trunk/apps/app_system.c
    team/oej/securertp-trunk/apps/app_talkdetect.c
    team/oej/securertp-trunk/apps/app_test.c
    team/oej/securertp-trunk/apps/app_transfer.c
    team/oej/securertp-trunk/apps/app_url.c
    team/oej/securertp-trunk/apps/app_userevent.c
    team/oej/securertp-trunk/apps/app_verbose.c
    team/oej/securertp-trunk/apps/app_voicemail.c
    team/oej/securertp-trunk/apps/app_waitforring.c
    team/oej/securertp-trunk/apps/app_waitforsilence.c
    team/oej/securertp-trunk/apps/app_while.c
    team/oej/securertp-trunk/apps/app_zapateller.c
    team/oej/securertp-trunk/apps/app_zapbarge.c
    team/oej/securertp-trunk/apps/app_zapras.c
    team/oej/securertp-trunk/apps/app_zapscan.c
    team/oej/securertp-trunk/asterisk.8
    team/oej/securertp-trunk/asterisk.c
    team/oej/securertp-trunk/asterisk.sgml
    team/oej/securertp-trunk/cdr.c
    team/oej/securertp-trunk/cdr/cdr_csv.c
    team/oej/securertp-trunk/cdr/cdr_custom.c
    team/oej/securertp-trunk/cdr/cdr_manager.c
    team/oej/securertp-trunk/cdr/cdr_odbc.c
    team/oej/securertp-trunk/cdr/cdr_pgsql.c
    team/oej/securertp-trunk/cdr/cdr_sqlite.c
    team/oej/securertp-trunk/cdr/cdr_tds.c
    team/oej/securertp-trunk/channel.c
    team/oej/securertp-trunk/channels/chan_agent.c
    team/oej/securertp-trunk/channels/chan_alsa.c
    team/oej/securertp-trunk/channels/chan_features.c
    team/oej/securertp-trunk/channels/chan_h323.c
    team/oej/securertp-trunk/channels/chan_iax2.c
    team/oej/securertp-trunk/channels/chan_local.c
    team/oej/securertp-trunk/channels/chan_mgcp.c
    team/oej/securertp-trunk/channels/chan_misdn.c
    team/oej/securertp-trunk/channels/chan_nbs.c
    team/oej/securertp-trunk/channels/chan_oss.c
    team/oej/securertp-trunk/channels/chan_phone.c
    team/oej/securertp-trunk/channels/chan_sip.c
    team/oej/securertp-trunk/channels/chan_skinny.c
    team/oej/securertp-trunk/channels/chan_vpb.c
    team/oej/securertp-trunk/channels/chan_zap.c
    team/oej/securertp-trunk/channels/h323/ast_h323.cpp
    team/oej/securertp-trunk/channels/iax2-provision.h
    team/oej/securertp-trunk/channels/misdn/Makefile
    team/oej/securertp-trunk/channels/misdn/isdn_lib.c
    team/oej/securertp-trunk/channels/misdn/isdn_lib.h
    team/oej/securertp-trunk/channels/misdn/isdn_msg_parser.c
    team/oej/securertp-trunk/channels/misdn/portinfo.c
    team/oej/securertp-trunk/cli.c
    team/oej/securertp-trunk/codecs/codec_a_mu.c
    team/oej/securertp-trunk/codecs/codec_adpcm.c
    team/oej/securertp-trunk/codecs/codec_alaw.c
    team/oej/securertp-trunk/codecs/codec_g723_1.c
    team/oej/securertp-trunk/codecs/codec_g726.c
    team/oej/securertp-trunk/codecs/codec_gsm.c
    team/oej/securertp-trunk/codecs/codec_ilbc.c
    team/oej/securertp-trunk/codecs/codec_lpc10.c
    team/oej/securertp-trunk/codecs/codec_speex.c
    team/oej/securertp-trunk/codecs/codec_ulaw.c
    team/oej/securertp-trunk/codecs/gsm/Makefile
    team/oej/securertp-trunk/config.c
    team/oej/securertp-trunk/configs/extensions.conf.sample
    team/oej/securertp-trunk/configs/features.conf.sample
    team/oej/securertp-trunk/configs/http.conf.sample
    team/oej/securertp-trunk/configs/iax.conf.sample
    team/oej/securertp-trunk/configs/manager.conf.sample
    team/oej/securertp-trunk/configs/meetme.conf.sample
    team/oej/securertp-trunk/configs/mgcp.conf.sample
    team/oej/securertp-trunk/configs/osp.conf.sample
    team/oej/securertp-trunk/configs/queues.conf.sample
    team/oej/securertp-trunk/configs/sip.conf.sample
    team/oej/securertp-trunk/configs/skinny.conf.sample
    team/oej/securertp-trunk/configs/voicemail.conf.sample
    team/oej/securertp-trunk/devicestate.c
    team/oej/securertp-trunk/dns.c
    team/oej/securertp-trunk/doc/00README.1st
    team/oej/securertp-trunk/doc/CODING-GUIDELINES
    team/oej/securertp-trunk/doc/asterisk-conf.txt
    team/oej/securertp-trunk/doc/channelvariables.txt
    team/oej/securertp-trunk/doc/manager.txt
    team/oej/securertp-trunk/enum.c
    team/oej/securertp-trunk/file.c
    team/oej/securertp-trunk/formats/Makefile
    team/oej/securertp-trunk/formats/format_g723.c
    team/oej/securertp-trunk/formats/format_g726.c
    team/oej/securertp-trunk/formats/format_g729.c
    team/oej/securertp-trunk/formats/format_gsm.c
    team/oej/securertp-trunk/formats/format_h263.c
    team/oej/securertp-trunk/formats/format_h264.c
    team/oej/securertp-trunk/formats/format_ilbc.c
    team/oej/securertp-trunk/formats/format_jpeg.c
    team/oej/securertp-trunk/formats/format_ogg_vorbis.c
    team/oej/securertp-trunk/formats/format_pcm.c
    team/oej/securertp-trunk/formats/format_sln.c
    team/oej/securertp-trunk/formats/format_vox.c
    team/oej/securertp-trunk/formats/format_wav.c
    team/oej/securertp-trunk/formats/format_wav_gsm.c
    team/oej/securertp-trunk/funcs/func_base64.c
    team/oej/securertp-trunk/funcs/func_callerid.c
    team/oej/securertp-trunk/funcs/func_cdr.c
    team/oej/securertp-trunk/funcs/func_channel.c
    team/oej/securertp-trunk/funcs/func_curl.c
    team/oej/securertp-trunk/funcs/func_cut.c
    team/oej/securertp-trunk/funcs/func_db.c
    team/oej/securertp-trunk/funcs/func_enum.c
    team/oej/securertp-trunk/funcs/func_env.c
    team/oej/securertp-trunk/funcs/func_groupcount.c
    team/oej/securertp-trunk/funcs/func_language.c
    team/oej/securertp-trunk/funcs/func_logic.c
    team/oej/securertp-trunk/funcs/func_math.c
    team/oej/securertp-trunk/funcs/func_md5.c
    team/oej/securertp-trunk/funcs/func_moh.c
    team/oej/securertp-trunk/funcs/func_odbc.c
    team/oej/securertp-trunk/funcs/func_rand.c
    team/oej/securertp-trunk/funcs/func_sha1.c
    team/oej/securertp-trunk/funcs/func_strings.c
    team/oej/securertp-trunk/funcs/func_timeout.c
    team/oej/securertp-trunk/funcs/func_uri.c
    team/oej/securertp-trunk/http.c
    team/oej/securertp-trunk/include/asterisk/adsi.h
    team/oej/securertp-trunk/include/asterisk/app.h
    team/oej/securertp-trunk/include/asterisk/astosp.h
    team/oej/securertp-trunk/include/asterisk/callerid.h
    team/oej/securertp-trunk/include/asterisk/channel.h
    team/oej/securertp-trunk/include/asterisk/cli.h
    team/oej/securertp-trunk/include/asterisk/crypto.h
    team/oej/securertp-trunk/include/asterisk/dns.h
    team/oej/securertp-trunk/include/asterisk/doxyref.h
    team/oej/securertp-trunk/include/asterisk/enum.h
    team/oej/securertp-trunk/include/asterisk/features.h
    team/oej/securertp-trunk/include/asterisk/file.h
    team/oej/securertp-trunk/include/asterisk/frame.h
    team/oej/securertp-trunk/include/asterisk/fskmodem.h
    team/oej/securertp-trunk/include/asterisk/http.h
    team/oej/securertp-trunk/include/asterisk/image.h
    team/oej/securertp-trunk/include/asterisk/indications.h
    team/oej/securertp-trunk/include/asterisk/io.h
    team/oej/securertp-trunk/include/asterisk/linkedlists.h
    team/oej/securertp-trunk/include/asterisk/localtime.h
    team/oej/securertp-trunk/include/asterisk/lock.h
    team/oej/securertp-trunk/include/asterisk/logger.h
    team/oej/securertp-trunk/include/asterisk/manager.h
    team/oej/securertp-trunk/include/asterisk/module.h
    team/oej/securertp-trunk/include/asterisk/musiconhold.h
    team/oej/securertp-trunk/include/asterisk/options.h
    team/oej/securertp-trunk/include/asterisk/pbx.h
    team/oej/securertp-trunk/include/asterisk/rtp.h
    team/oej/securertp-trunk/include/asterisk/sched.h
    team/oej/securertp-trunk/include/asterisk/tdd.h
    team/oej/securertp-trunk/include/asterisk/term.h
    team/oej/securertp-trunk/include/asterisk/translate.h
    team/oej/securertp-trunk/indications.c
    team/oej/securertp-trunk/loader.c
    team/oej/securertp-trunk/manager.c
    team/oej/securertp-trunk/pbx.c
    team/oej/securertp-trunk/pbx/pbx_ael.c
    team/oej/securertp-trunk/pbx/pbx_config.c
    team/oej/securertp-trunk/pbx/pbx_dundi.c
    team/oej/securertp-trunk/pbx/pbx_gtkconsole.c
    team/oej/securertp-trunk/pbx/pbx_loopback.c
    team/oej/securertp-trunk/pbx/pbx_realtime.c
    team/oej/securertp-trunk/pbx/pbx_spool.c
    team/oej/securertp-trunk/res/Makefile
    team/oej/securertp-trunk/res/res_adsi.c
    team/oej/securertp-trunk/res/res_agi.c
    team/oej/securertp-trunk/res/res_clioriginate.c
    team/oej/securertp-trunk/res/res_config_odbc.c
    team/oej/securertp-trunk/res/res_convert.c
    team/oej/securertp-trunk/res/res_crypto.c
    team/oej/securertp-trunk/res/res_features.c
    team/oej/securertp-trunk/res/res_indications.c
    team/oej/securertp-trunk/res/res_monitor.c
    team/oej/securertp-trunk/res/res_musiconhold.c
    team/oej/securertp-trunk/res/res_odbc.c
    team/oej/securertp-trunk/res/res_osp.c
    team/oej/securertp-trunk/res/res_smdi.c
    team/oej/securertp-trunk/res/res_snmp.c
    team/oej/securertp-trunk/res/snmp/agent.c
    team/oej/securertp-trunk/rtp.c
    team/oej/securertp-trunk/sched.c
    team/oej/securertp-trunk/translate.c
    team/oej/securertp-trunk/udptl.c
    team/oej/securertp-trunk/utils.c

Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/securertp-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue May  2 13:17:47 2006
@@ -1,1 +1,1 @@
-/trunk:1-16450
+/trunk:1-18753

Modified: team/oej/securertp-trunk/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/.cleancount?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/.cleancount (original)
+++ team/oej/securertp-trunk/.cleancount Tue May  2 13:17:47 2006
@@ -1,1 +1,1 @@
-12
+13

Modified: team/oej/securertp-trunk/CREDITS
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/CREDITS?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/CREDITS (original)
+++ team/oej/securertp-trunk/CREDITS Tue May  2 13:17:47 2006
@@ -12,6 +12,8 @@
 Telesthetic - for supporting SIP development
 
 Christos Ricudis - for substantial code contributions
+
+nic.at - ENUM support in Asterisk
 
 Paul Bagyenda, Digital Solutions - for initial Voicetronix driver development
 
@@ -90,6 +92,11 @@
 Music provided by www.freeplaymusic.com
 
 === OTHER SOURCE CODE IN ASTERISK ===
+Asterisk uses libedit, the lightweight readline replacement from
+NetBSD. It is BSD-licensed and requires the following statement:
+
+      This product includes software developed by the NetBSD
+      Foundation, Inc. and its contributors.
 
 Digium did not implement the codecs in Asterisk.  Here is the copyright on the
 GSM source:

Modified: team/oej/securertp-trunk/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/Makefile?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/Makefile (original)
+++ team/oej/securertp-trunk/Makefile Tue May  2 13:17:47 2006
@@ -15,22 +15,33 @@
 
 # Create OPTIONS variable
 OPTIONS=
+
 # If cross compiling, define these to suit
-# CROSS_COMPILE=/opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be-
-# CROSS_COMPILE_BIN=/opt/montavista/pro/devkit/arm/xscale_be/bin/
-# CROSS_COMPILE_TARGET=/opt/montavista/pro/devkit/arm/xscale_be/target
+#CROSS_COMPILE=/opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be-
+#CROSS_COMPILE_BIN=/opt/montavista/pro/devkit/arm/xscale_be/bin/
+#CROSS_COMPILE_TARGET=/opt/montavista/pro/devkit/arm/xscale_be/target
+#CROSS_ARCH=Linux
+#CROSS_PROC=arm
+#SUB_PROC=xscale # or maverick
+
+# Pentium Pro Optimize
+#PROC=i686
+
+# Pentium & VIA processors optimize
+#PROC=i586
+
+#PROC=k6
+#PROC=ppc
+
 CC=$(CROSS_COMPILE)gcc
 HOST_CC=gcc
-# CROSS_ARCH=Linux
-# CROSS_PROC=arm
-# SUB_PROC=xscale # or maverick
 
 ifeq ($(CROSS_COMPILE),)
   OSARCH=$(shell uname -s)
-  OSREV=$(shell uname -r)
+  PROC?=$(shell uname -m)
 else
   OSARCH=$(CROSS_ARCH)
-  OSREV=$(CROSS_REV)
+  PROC=$(CROSS_PROC)
 endif
 
 PWD=$(shell pwd)
@@ -39,13 +50,13 @@
 MAKETOPLEVEL?=$(MAKELEVEL)
 
 ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
-######### More GSM codec optimization
-######### Uncomment to enable MMXTM optimizations for x86 architecture CPU's
-######### which support MMX instructions.  This should be newer pentiums,
-######### ppro's, etc, as well as the AMD K6 and K7.  
+# More GSM codec optimization
+# Uncomment to enable MMXTM optimizations for x86 architecture CPU's
+# which support MMX instructions.  This should be newer pentiums,
+# ppro's, etc, as well as the AMD K6 and K7.  
 #K6OPT  = -DK6OPT
 
-#Tell gcc to optimize the code
+# Tell gcc to optimize the code
 OPTIMIZE+=-O6
 else
   # Stack backtraces, while useful for debugging, are incompatible with optimizations
@@ -54,14 +65,13 @@
   endif
 endif
 
-#Overwite config files on "make samples"
+# Overwite config files on "make samples"
 OVERWRITE=y
 
-#Include debug and macro symbols in the executables (-g) and profiling info (-pg)
+# Include debug and macro symbols in the executables (-g) and profiling info (-pg)
 DEBUG=-g3 #-pg
 
-#Set NOCRYPTO to yes if you do not want to have crypto support or 
-#dependencies
+# Set NOCRYPTO to yes if you do not want to have crypto support or dependencies
 #NOCRYPTO=yes
 
 # If you are running a radio application, define RADIO_RELAX so that the DTMF
@@ -70,14 +80,11 @@
 
 # If you don't have a lot of memory (e.g. embedded Asterisk), define LOW_MEMORY
 # to reduce the size of certain static buffers
-
 #ifneq ($(CROSS_COMPILE),)
 #OPTIONS += -DLOW_MEMORY
 #endif
 
-#
 # Asterisk SMDI integration
-#
 WITH_SMDI = 1
 
 # Optional debugging parameters
@@ -101,7 +108,7 @@
 # Files are copied here temporarily during the install process
 # For example, make DESTDIR=/tmp/asterisk woud put things in
 # /tmp/asterisk/etc/asterisk
-# XXX watch out, put no spaces or comments after the value
+# !!! Watch out, put no spaces or comments after the value !!!
 DESTDIR?=
 #DESTDIR?=/tmp/asterisk
 
@@ -117,57 +124,64 @@
 # 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=
 
 # Define this to use files larger than 2GB (useful for sound files longer than 37 hours and logfiles)
 ASTCFLAGS+=-D_FILE_OFFSET_BITS=64
 
-# Pentium Pro Optimize
-#PROC=i686
-
-# Pentium & VIA processors optimize
-#PROC=i586
-
-#PROC=k6
-#PROC=ppc
-
-#Uncomment this to use the older DSP routines
+# 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
@@ -184,12 +198,6 @@
 endif
 
 ifeq ($(OSARCH),Linux)
-  ifeq ($(CROSS_COMPILE),)
-    PROC?=$(shell uname -m)
-  else
-    PROC=$(CROSS_PROC)
-  endif
-
   ifeq ($(PROC),x86_64)
     # You must have GCC 3.4 to use k8, otherwise use athlon
     PROC=k8
@@ -243,7 +251,6 @@
 ASTOBJ=-o asterisk
 
 ifeq ($(findstring BSD,$(OSARCH)),BSD)
-  PROC=$(shell uname -m)
   ASTCFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
 endif
 
@@ -271,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)
@@ -311,7 +302,6 @@
   ASTLINK=
   LIBS+=-lpthread -lncurses -lm -lresolv
   ASTSBINDIR=$(MODULES_DIR)
-  PROC=$(shell uname -m)
 endif
 
 ifndef WITHOUT_ZAPTEL
@@ -397,10 +387,13 @@
   AUDIO_LIBS=-framework CoreAudio
   ASTLINK=-Wl,-dynamic
   SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
-  OBJS+=poll.o
-  ASTCFLAGS+=-DPOLLCOMPAT
+  # Mac on Intel CoreDuo does not need poll compatibility layer
+  ifneq ($(PROC),i386)
+    OBJS+=poll.o
+    ASTCFLAGS+=-DPOLLCOMPAT
+  endif
 else
-#These are used for all but Darwin
+# These are used for all but Darwin
   ASTLINK=-Wl,-E 
   SOLINK=-shared -Xlinker -x
   ifeq ($(findstring BSD,$(OSARCH)),BSD)
@@ -566,6 +559,13 @@
 
 datafiles: all
 	if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+	# Should static HTTP be installed during make samples or even with its own target ala
+	# webvoicemail?  There are portions here that *could* be customized but might also be
+	# improved a lot.  I'll put it here for now.
+	mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/static-http
+	for x in static-http/*; do \
+		install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/static-http ; \
+	done
 	mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
 	mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
 	for x in sounds/digits/*.gsm; do \
@@ -788,6 +788,8 @@
 		echo ";astctlowner = root" ; \
 		echo ";astctlgroup = apache" ; \
 		echo ";astctl = asterisk.ctl" ; \
+		echo ";[options]" ; \
+		echo ";internal_timing = yes" ; \
 		) > $(DESTDIR)$(ASTCONFPATH) ; \
 	else \
 		echo "Skipping asterisk.conf creation"; \
@@ -954,11 +956,9 @@
 	@echo " +            $(MAKE) uninstall-all             +"  
 	@echo " +-------------------------------------------+"  
 
-
 uninstall-all: _uninstall
 	rm -rf $(DESTDIR)$(ASTLIBDIR)
 	rm -rf $(DESTDIR)$(ASTVARLIBDIR)
 	rm -rf $(DESTDIR)$(ASTSPOOLDIR)
 	rm -rf $(DESTDIR)$(ASTETCDIR)
 	rm -rf $(DESTDIR)$(ASTLOGDIR)
-

Modified: team/oej/securertp-trunk/README
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/README?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/README (original)
+++ team/oej/securertp-trunk/README Tue May  2 13:17:47 2006
@@ -2,14 +2,14 @@
 by Mark Spencer <markster at digium.com>
 and the Asterisk.org developer community
 
-Copyright (C) 2001-2005 Digium, Inc.
+Copyright (C) 2001-2006 Digium, Inc.
 and other copyright holders.
 ================================================================
 
 * SECURITY
   It is imperative that you read and fully understand the contents of
-the SECURITY file before you attempt to configure and run an Asterisk
-server.
+the security information file (doc/security.txt) before you attempt 
+to configure and run an Asterisk server.
 
 * WHAT IS ASTERISK ?
   Asterisk is an Open Source PBX and telephony toolkit.  It is, in a
@@ -84,11 +84,18 @@
 
   So let's proceed:
 
-1) Run "make"
+1) Read the README files.
+   There are more README files than this one in the doc/ directory.
+   Start with doc/00README.1st
+   You may also want to check the configuration files that contain
+   examples and reference guides. They are all in the configs/
+   directory.
+
+2) Run "make"
 
   Assuming the build completes successfully:
 
-2) Run "make install"
+3) Run "make install"
 
   Each time you update or checkout from the repository, you are strongly
 encouraged to ensure all previous object files are removed to avoid internal 
@@ -99,7 +106,7 @@
   If this is your first time working with Asterisk, you may wish to install
 the sample PBX, with demonstration extensions, etc.  If so, run:
 
-3) "make samples"
+4) "make samples"
 
   Doing so will overwrite any existing config files you have.
 

Modified: team/oej/securertp-trunk/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/UPGRADE.txt?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/UPGRADE.txt (original)
+++ team/oej/securertp-trunk/UPGRADE.txt Tue May  2 13:17:47 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/securertp-trunk/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/app.c?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/app.c (original)
+++ team/oej/securertp-trunk/app.c Tue May  2 13:17:47 2006
@@ -1157,7 +1157,7 @@
 		return AST_LOCK_FAILURE;
 	}
 
-	snprintf(fs, strlen(path) + 19, "%s/.lock-%08x", path, rand());
+	snprintf(fs, strlen(path) + 19, "%s/.lock-%08lx", path, ast_random());
 	fd = open(fs, O_WRONLY | O_CREAT | O_EXCL, 0600);
 	if (fd < 0) {
 		fprintf(stderr, "Unable to create lock file '%s': %s\n", path, strerror(errno));

Modified: team/oej/securertp-trunk/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/Makefile?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/Makefile (original)
+++ team/oej/securertp-trunk/apps/Makefile Tue May  2 13:17:47 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/securertp-trunk/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_adsiprog.c?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_adsiprog.c (original)
+++ team/oej/securertp-trunk/apps/app_adsiprog.c Tue May  2 13:17:47 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/securertp-trunk/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_alarmreceiver.c?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_alarmreceiver.c (original)
+++ team/oej/securertp-trunk/apps/app_alarmreceiver.c Tue May  2 13:17:47 2006
@@ -551,13 +551,12 @@
 
 		checksum = checksum % 15;
 
-		if(checksum){
+		if (checksum) {
 			database_increment("checksum-errors");
-			if(option_verbose >= 2){
+			if (option_verbose >= 2)
 				ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Nonzero checksum\n");
 			ast_log(LOG_DEBUG, "AlarmReceiver: Nonzero checksum\n");
 			continue;
-			}
 		}
 
 		/* Check the message type for correctness */
@@ -838,7 +837,7 @@
 	return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
 }
 
-char *description(void)
+const char *description(void)
 {
 	return tdesc;
 }
@@ -850,7 +849,7 @@
 	return res;
 }
 
-char *key()
+const char *key()
 {
 	return ASTERISK_GPL_KEY;
 }

Modified: team/oej/securertp-trunk/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp-trunk/apps/app_amd.c?rev=24251&r1=24250&r2=24251&view=diff
==============================================================================
--- team/oej/securertp-trunk/apps/app_amd.c (original)
+++ team/oej/securertp-trunk/apps/app_amd.c Tue May  2 13:17:47 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, chan->readformat);
+	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)

[... 33311 lines stripped ...]


More information about the svn-commits mailing list