[asterisk-commits] russell: branch group/res_config_ldap r77813 - in /team/group/res_config_ldap...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 31 08:39:40 CDT 2007


Author: russell
Date: Tue Jul 31 08:39:38 2007
New Revision: 77813

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77813
Log:
ensure branch is up to date for issue #5768

Modified:
    team/group/res_config_ldap/   (props changed)
    team/group/res_config_ldap/CHANGES
    team/group/res_config_ldap/LICENSE
    team/group/res_config_ldap/Makefile
    team/group/res_config_ldap/UPGRADE.txt
    team/group/res_config_ldap/acinclude.m4
    team/group/res_config_ldap/apps/app_adsiprog.c
    team/group/res_config_ldap/apps/app_alarmreceiver.c
    team/group/res_config_ldap/apps/app_amd.c
    team/group/res_config_ldap/apps/app_authenticate.c
    team/group/res_config_ldap/apps/app_chanisavail.c
    team/group/res_config_ldap/apps/app_channelredirect.c
    team/group/res_config_ldap/apps/app_chanspy.c
    team/group/res_config_ldap/apps/app_controlplayback.c
    team/group/res_config_ldap/apps/app_db.c
    team/group/res_config_ldap/apps/app_dial.c
    team/group/res_config_ldap/apps/app_dictate.c
    team/group/res_config_ldap/apps/app_directory.c
    team/group/res_config_ldap/apps/app_disa.c
    team/group/res_config_ldap/apps/app_exec.c
    team/group/res_config_ldap/apps/app_externalivr.c
    team/group/res_config_ldap/apps/app_festival.c
    team/group/res_config_ldap/apps/app_flash.c
    team/group/res_config_ldap/apps/app_followme.c
    team/group/res_config_ldap/apps/app_getcpeid.c
    team/group/res_config_ldap/apps/app_image.c
    team/group/res_config_ldap/apps/app_macro.c
    team/group/res_config_ldap/apps/app_meetme.c
    team/group/res_config_ldap/apps/app_minivm.c
    team/group/res_config_ldap/apps/app_mixmonitor.c
    team/group/res_config_ldap/apps/app_morsecode.c
    team/group/res_config_ldap/apps/app_page.c
    team/group/res_config_ldap/apps/app_parkandannounce.c
    team/group/res_config_ldap/apps/app_playback.c
    team/group/res_config_ldap/apps/app_privacy.c
    team/group/res_config_ldap/apps/app_queue.c
    team/group/res_config_ldap/apps/app_read.c
    team/group/res_config_ldap/apps/app_readfile.c
    team/group/res_config_ldap/apps/app_record.c
    team/group/res_config_ldap/apps/app_rpt.c
    team/group/res_config_ldap/apps/app_sayunixtime.c
    team/group/res_config_ldap/apps/app_senddtmf.c
    team/group/res_config_ldap/apps/app_sendtext.c
    team/group/res_config_ldap/apps/app_skel.c
    team/group/res_config_ldap/apps/app_sms.c
    team/group/res_config_ldap/apps/app_softhangup.c
    team/group/res_config_ldap/apps/app_speech_utils.c
    team/group/res_config_ldap/apps/app_stack.c
    team/group/res_config_ldap/apps/app_talkdetect.c
    team/group/res_config_ldap/apps/app_transfer.c
    team/group/res_config_ldap/apps/app_url.c
    team/group/res_config_ldap/apps/app_userevent.c
    team/group/res_config_ldap/apps/app_verbose.c
    team/group/res_config_ldap/apps/app_voicemail.c
    team/group/res_config_ldap/apps/app_waitforring.c
    team/group/res_config_ldap/apps/app_waitforsilence.c
    team/group/res_config_ldap/apps/app_while.c
    team/group/res_config_ldap/apps/app_zapras.c
    team/group/res_config_ldap/apps/app_zapscan.c
    team/group/res_config_ldap/build_tools/cflags.xml
    team/group/res_config_ldap/cdr/cdr_adaptive_odbc.c
    team/group/res_config_ldap/cdr/cdr_odbc.c
    team/group/res_config_ldap/cdr/cdr_pgsql.c
    team/group/res_config_ldap/channels/chan_agent.c
    team/group/res_config_ldap/channels/chan_alsa.c
    team/group/res_config_ldap/channels/chan_h323.c
    team/group/res_config_ldap/channels/chan_iax2.c
    team/group/res_config_ldap/channels/chan_local.c
    team/group/res_config_ldap/channels/chan_mgcp.c
    team/group/res_config_ldap/channels/chan_misdn.c
    team/group/res_config_ldap/channels/chan_oss.c
    team/group/res_config_ldap/channels/chan_phone.c
    team/group/res_config_ldap/channels/chan_sip.c
    team/group/res_config_ldap/channels/chan_skinny.c
    team/group/res_config_ldap/channels/chan_vpb.cc
    team/group/res_config_ldap/channels/chan_zap.c
    team/group/res_config_ldap/channels/iax2-provision.c
    team/group/res_config_ldap/codecs/codec_adpcm.c
    team/group/res_config_ldap/codecs/codec_alaw.c
    team/group/res_config_ldap/codecs/codec_g722.c
    team/group/res_config_ldap/codecs/codec_g726.c
    team/group/res_config_ldap/codecs/codec_gsm.c
    team/group/res_config_ldap/codecs/codec_lpc10.c
    team/group/res_config_ldap/codecs/codec_speex.c
    team/group/res_config_ldap/codecs/codec_ulaw.c
    team/group/res_config_ldap/codecs/codec_zap.c
    team/group/res_config_ldap/configure
    team/group/res_config_ldap/doc/tex/ael.tex
    team/group/res_config_ldap/doc/tex/app-sms.tex
    team/group/res_config_ldap/doc/tex/asterisk-conf.tex
    team/group/res_config_ldap/doc/tex/asterisk.tex
    team/group/res_config_ldap/doc/tex/billing.tex
    team/group/res_config_ldap/doc/tex/cdrdriver.tex
    team/group/res_config_ldap/doc/tex/channelvariables.tex
    team/group/res_config_ldap/doc/tex/dundi.tex
    team/group/res_config_ldap/doc/tex/enum.tex
    team/group/res_config_ldap/doc/tex/hardware.tex
    team/group/res_config_ldap/doc/tex/imapstorage.tex
    team/group/res_config_ldap/doc/tex/jitterbuffer.tex
    team/group/res_config_ldap/doc/tex/manager.tex
    team/group/res_config_ldap/doc/tex/misdn.tex
    team/group/res_config_ldap/doc/tex/mp3.tex
    team/group/res_config_ldap/doc/tex/odbcstorage.tex
    team/group/res_config_ldap/doc/tex/privacy.tex
    team/group/res_config_ldap/doc/tex/qos.tex
    team/group/res_config_ldap/doc/tex/queuelog.tex
    team/group/res_config_ldap/doc/tex/queues-with-callback-members.tex
    team/group/res_config_ldap/doc/tex/realtime.tex
    team/group/res_config_ldap/funcs/func_callerid.c
    team/group/res_config_ldap/funcs/func_cdr.c
    team/group/res_config_ldap/funcs/func_channel.c
    team/group/res_config_ldap/funcs/func_curl.c
    team/group/res_config_ldap/funcs/func_cut.c
    team/group/res_config_ldap/funcs/func_enum.c
    team/group/res_config_ldap/funcs/func_env.c
    team/group/res_config_ldap/funcs/func_logic.c
    team/group/res_config_ldap/funcs/func_odbc.c
    team/group/res_config_ldap/funcs/func_rand.c
    team/group/res_config_ldap/funcs/func_realtime.c
    team/group/res_config_ldap/funcs/func_strings.c
    team/group/res_config_ldap/funcs/func_timeout.c
    team/group/res_config_ldap/funcs/func_vmcount.c
    team/group/res_config_ldap/include/asterisk/agi.h
    team/group/res_config_ldap/include/asterisk/app.h
    team/group/res_config_ldap/include/asterisk/dial.h
    team/group/res_config_ldap/include/asterisk/lock.h
    team/group/res_config_ldap/main/abstract_jb.c
    team/group/res_config_ldap/main/app.c
    team/group/res_config_ldap/main/cdr.c
    team/group/res_config_ldap/main/channel.c
    team/group/res_config_ldap/main/config.c
    team/group/res_config_ldap/main/dial.c
    team/group/res_config_ldap/main/dnsmgr.c
    team/group/res_config_ldap/main/file.c
    team/group/res_config_ldap/main/image.c
    team/group/res_config_ldap/main/indications.c
    team/group/res_config_ldap/main/loader.c
    team/group/res_config_ldap/main/logger.c
    team/group/res_config_ldap/main/manager.c
    team/group/res_config_ldap/main/pbx.c
    team/group/res_config_ldap/main/rtp.c
    team/group/res_config_ldap/main/say.c
    team/group/res_config_ldap/main/srv.c
    team/group/res_config_ldap/main/translate.c
    team/group/res_config_ldap/main/udptl.c
    team/group/res_config_ldap/main/utils.c
    team/group/res_config_ldap/pbx/pbx_ael.c
    team/group/res_config_ldap/pbx/pbx_config.c
    team/group/res_config_ldap/pbx/pbx_dundi.c
    team/group/res_config_ldap/pbx/pbx_gtkconsole.c
    team/group/res_config_ldap/pbx/pbx_realtime.c
    team/group/res_config_ldap/pbx/pbx_spool.c
    team/group/res_config_ldap/res/res_agi.c
    team/group/res_config_ldap/res/res_config_odbc.c
    team/group/res_config_ldap/res/res_config_pgsql.c
    team/group/res_config_ldap/res/res_crypto.c
    team/group/res_config_ldap/res/res_features.c
    team/group/res_config_ldap/res/res_jabber.c
    team/group/res_config_ldap/res/res_monitor.c
    team/group/res_config_ldap/res/res_musiconhold.c
    team/group/res_config_ldap/res/res_odbc.c
    team/group/res_config_ldap/res/res_smdi.c
    team/group/res_config_ldap/res/res_snmp.c
    team/group/res_config_ldap/res/res_speech.c
    team/group/res_config_ldap/sounds/Makefile

Propchange: team/group/res_config_ldap/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/group/res_config_ldap/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/res_config_ldap/
------------------------------------------------------------------------------
--- svn:externals (original)
+++ svn:externals Tue Jul 31 08:39:38 2007
@@ -1,1 +1,1 @@
-menuselect	https://origsvn.digium.com/svn/menuselect/branches/1.0
+menuselect https://origsvn.digium.com/svn/menuselect/branches/1.0

Propchange: team/group/res_config_ldap/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jul 31 08:39:38 2007
@@ -1,1 +1,1 @@
-/trunk:1-76609
+/trunk:1-77812

Modified: team/group/res_config_ldap/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/CHANGES?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/CHANGES (original)
+++ team/group/res_config_ldap/CHANGES Tue Jul 31 08:39:38 2007
@@ -42,6 +42,10 @@
 
 SIP changes
 -----------
+  * Improved NAT and STUN support.
+     chan_sip now can use port numbers in bindaddr, externip and externhost
+     options, as well as contact a STUN server to detect its external address
+     for the SIP socket. See sip.conf.sample, 'NAT' section.
   * The default SIP useragent= identifier now includes the Asterisk version
   * A new option, match_auth_username in sip.conf changes the matching of incoming requests.
      If set, and the incoming request carries authentication info,

Modified: team/group/res_config_ldap/LICENSE
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/LICENSE?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/LICENSE (original)
+++ team/group/res_config_ldap/LICENSE Tue Jul 31 08:39:38 2007
@@ -50,7 +50,8 @@
 wish to use these trademarks for purposes other than simple
 redistribution of Asterisk source code obtained from Digium, you
 should contact our licensing department to determine the necessary
-steps you must take. For more information on this policy, please read
+steps you must take. For more information on this policy, please read:
+
 http://www.digium.com/en/company/profile/trademarkpolicy.php
 
 If you have any questions regarding our licensing policy, please

Modified: team/group/res_config_ldap/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/Makefile?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/Makefile (original)
+++ team/group/res_config_ldap/Makefile Tue Jul 31 08:39:38 2007
@@ -700,6 +700,7 @@
 	@echo "Generating input for menuselect ..."
 	@build_tools/prep_moduledeps > $@
 
-asterisk.pdf: doc/asterisk.pdf
+asterisk.pdf:
+	$(MAKE) -C doc/tex asterisk.pdf
 
 .PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) menuselect.makeopts

Modified: team/group/res_config_ldap/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/UPGRADE.txt?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/UPGRADE.txt (original)
+++ team/group/res_config_ldap/UPGRADE.txt Tue Jul 31 08:39:38 2007
@@ -35,6 +35,16 @@
   like sin, cos, tan, log, pow, etc. The ability to call external functions
   like CDR(), etc. was also added, without having to use the ${...} notation.
  
+* The delimiter passed to applications has been changed to the comma (','), as
+  that is what people are used to using within extensions.conf.  If you are
+  using realtime extensions, you will need to translate your existing dialplan
+  to use this separator.  To use a literal comma, you need merely to escape it
+  with a backslash ('\').  Another possible side effect is that you may need to
+  remove the obscene level of backslashing that was necessary for the dialplan
+  to work correctly in 1.4 and previous versions.  This should make writing
+  dialplans less painful in the future, albeit with the pain of a one-time
+  conversion.
+
 Voicemail:
 
 * The voicemail configuration values 'maxmessage' and 'minmessage' have
@@ -86,3 +96,7 @@
   user has not configured the automon feature, the normal "415 Unsupported media type"
   is returned, and nothing is done.
 
+* chan_local.c: the comma delimiter inside the channel name has been changed to a
+  semicolon, in order to make the Local channel driver compatible with the comma
+  delimiter change in applications.
+

Modified: team/group/res_config_ldap/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/acinclude.m4?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/acinclude.m4 (original)
+++ team/group/res_config_ldap/acinclude.m4 Tue Jul 31 08:39:38 2007
@@ -380,13 +380,22 @@
   AC_CHECK_HEADER(${PWLIBDIR}/../openh323/version.h, OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1, )
   if test "${HAS_OPENH323:-unset}" != "unset" ; then
     OPENH323DIR="${PWLIBDIR}/../openh323"
-    AC_CHECK_HEADER(${OPENH323DIR}/include/h323.h, , OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}")
+    saved_cppflags="${CPPFLAGS}"
+    CPPFLAGS="${CPPFLAGS} -I${PWLIB_INCDIR}/openh323 -I${PWLIB_INCDIR}"
+    AC_CHECK_HEADER(${OPENH323DIR}/include/h323.h, , OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}", [#include <ptlib.h>])
+    CPPFLAGS="${saved_cppflags}"
   else
+    saved_cppflags="${CPPFLAGS}"
+    CPPFLAGS="${CPPFLAGS} -I${HOME}/openh323/include -I${PWLIB_INCDIR}"
     AC_CHECK_HEADER(${HOME}/openh323/include/h323.h, HAS_OPENH323=1, )
+    CPPFLAGS="${saved_cppflags}"
     if test "${HAS_OPENH323:-unset}" != "unset" ; then
       OPENH323DIR="${HOME}/openh323"
     else
+      saved_cppflags="${CPPFLAGS}"
+      CPPFLAGS="${CPPFLAGS} -I/usr/local/include/openh323 -I${PWLIB_INCDIR}"
       AC_CHECK_HEADER(/usr/local/include/openh323/h323.h, HAS_OPENH323=1, )
+      CPPFLAGS="${saved_cppflags}"
       if test "${HAS_OPENH323:-unset}" != "unset" ; then
         OPENH323DIR="/usr/local/share/openh323"
         OPENH323_INCDIR="/usr/local/include/openh323"
@@ -396,7 +405,10 @@
           OPENH323_LIBDIR="/usr/local/lib"
         fi
       else
-        AC_CHECK_HEADER(/usr/include/openh323/h323.h, HAS_OPENH323=1, )
+        saved_cppflags="${CPPFLAGS}"
+        CPPFLAGS="${CPPFLAGS} -I/usr/include/openh323 -I${PWLIB_INCDIR}"
+        AC_CHECK_HEADER(/usr/include/openh323/h323.h, HAS_OPENH323=1, , [#include <ptlib.h>])
+        CPPFLAGS="${saved_cppflags}"
         if test "${HAS_OPENH323:-unset}" != "unset" ; then
           OPENH323DIR="/usr/share/openh323"
           OPENH323_INCDIR="/usr/include/openh323"

Modified: team/group/res_config_ldap/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_adsiprog.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_adsiprog.c (original)
+++ team/group/res_config_ldap/apps/app_adsiprog.c Tue Jul 31 08:39:38 2007
@@ -1448,8 +1448,7 @@
 	/* Now begin the download attempt */
 	if (ast_adsi_begin_download(chan, scr->desc, scr->fdn, scr->sec, scr->ver)) {
 		/* User rejected us for some reason */
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "User rejected download attempt\n");
+		ast_verb(3, "User rejected download attempt\n");
 		ast_log(LOG_NOTICE, "User rejected download on channel %s\n", chan->name);
 		ast_free(scr);
 		return -1;
@@ -1535,8 +1534,7 @@
 		return -1;
 	if (ast_adsi_end_download(chan)) {
 		/* Download failed for some reason */
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "Download attempt failed\n");
+		ast_verb(3, "Download attempt failed\n");
 		ast_log(LOG_NOTICE, "Download failed on %s\n", chan->name);
 		ast_free(scr);
 		return -1;
@@ -1554,11 +1552,9 @@
 		data = "asterisk.adsi";
 	
 	if (!ast_adsi_available(chan)) {
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "ADSI Unavailable on CPE.  Not bothering to try.\n");
+		ast_verb(3, "ADSI Unavailable on CPE.  Not bothering to try.\n");
 	} else {
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "ADSI Available on CPE.  Attempting Upload.\n");
+		ast_verb(3, "ADSI Available on CPE.  Attempting Upload.\n");
 		res = adsi_prog(chan, data);
 	}
 	

Modified: team/group/res_config_ldap/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_alarmreceiver.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_alarmreceiver.c (original)
+++ team/group/res_config_ldap/apps/app_alarmreceiver.c Tue Jul 31 08:39:38 2007
@@ -118,8 +118,7 @@
 	res = ast_db_get(db_family, key, value, sizeof(value) - 1);
 	
 	if(res){
-		if(option_verbose >= 4)
-			ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Creating database entry %s and setting to 1\n", key);
+		ast_verb(4, "AlarmReceiver: Creating database entry %s and setting to 1\n", key);
 		/* Guess we have to create it */
 		res = ast_db_put(db_family, key, "1");
 		return;
@@ -210,8 +209,7 @@
 				break;
 			}
 			if (ast_write(chan, &wf)){
-				if(option_verbose >= 4)
-					ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Failed to write frame on %s\n", chan->name);
+				ast_verb(4, "AlarmReceiver: Failed to write frame on %s\n", chan->name);
 				ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name);
 				res = -1;
 				ast_frfree(f);
@@ -523,8 +521,7 @@
 		
 		got_some_digits = 1;
 
-		if (option_verbose >= 2)
-			ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Received Event %s\n", event);
+		ast_verb(2, "AlarmReceiver: Received Event %s\n", event);
 		ast_debug(1, "AlarmReceiver: Received event: %s\n", event);
 		
 		/* Calculate checksum */
@@ -542,8 +539,7 @@
 		}
 		
 		if(i == 16){
-			if(option_verbose >= 2)
-				ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Bad DTMF character %c, trying again\n", event[j]);
+			ast_verb(2, "AlarmReceiver: Bad DTMF character %c, trying again\n", event[j]);
 			continue; /* Bad character */
 		}
 
@@ -553,8 +549,7 @@
 
 		if (checksum) {
 			database_increment("checksum-errors");
-			if (option_verbose >= 2)
-				ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Nonzero checksum\n");
+			ast_verb(2, "AlarmReceiver: Nonzero checksum\n");
 			ast_debug(1, "AlarmReceiver: Nonzero checksum\n");
 			continue;
 		}
@@ -564,8 +559,7 @@
 		if(strncmp(event + 4, "18", 2)){
 			if(strncmp(event + 4, "98", 2)){
 				database_increment("format-errors");
-				if(option_verbose >= 2)
-					ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Wrong message type\n");
+				ast_verb(2, "AlarmReceiver: Wrong message type\n");
 				ast_debug(1, "AlarmReceiver: Wrong message type\n");
 			continue;
 			}
@@ -635,8 +629,7 @@
 
 	/* Set write and read formats to ULAW */
 
-	if(option_verbose >= 4)
-		ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Setting read and write formats to ULAW\n");
+	ast_verb(4, "AlarmReceiver: Setting read and write formats to ULAW\n");
 
 	if (ast_set_write_format(chan,AST_FORMAT_ULAW)){
 		ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",chan->name);
@@ -655,8 +648,7 @@
 
 	/* Answer the channel if it is not already */
 
-	if(option_verbose >= 4)
-		ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Answering channel\n");
+	ast_verb(4, "AlarmReceiver: Answering channel\n");
 
 	if (chan->_state != AST_STATE_UP) {
 		if ((res = ast_answer(chan)))
@@ -665,8 +657,7 @@
 
 	/* Wait for the connection to settle post-answer */
 
-	if(option_verbose >= 4)
-		ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Waiting for connection to stabilize\n");
+	ast_verb(4, "AlarmReceiver: Waiting for connection to stabilize\n");
 
 	res = ast_safe_sleep(chan, 1250);
 

Modified: team/group/res_config_ldap/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_amd.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_amd.c (original)
+++ team/group/res_config_ldap/apps/app_amd.c Tue Jul 31 08:39:38 2007
@@ -47,9 +47,9 @@
 static char *app = "AMD";
 static char *synopsis = "Attempts to detect answering machines";
 static char *descrip =
-"  AMD([initialSilence][|greeting][|afterGreetingSilence][|totalAnalysisTime]\n"
-"      [|minimumWordLength][|betweenWordsSilence][|maximumNumberOfWords]\n"
-"      [|silenceThreshold])\n"
+"  AMD([initialSilence],[greeting],[afterGreetingSilence],[totalAnalysisTime]\n"
+"      ,[minimumWordLength],[betweenWordsSilence],[maximumNumberOfWords]\n"
+"      ,[silenceThreshold])\n"
 "  This application attempts to detect answering machines at the beginning\n"
 "  of outbound calls.  Simply call this application after the call\n"
 "  has been answered (outbound only, of course).\n"
@@ -136,8 +136,7 @@
 			     AST_APP_ARG(argSilenceThreshold);
 	);
 
-	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);
+	ast_verb(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(parse)) {
@@ -164,8 +163,7 @@
 	}
 
 	/* Now we're ready to roll! */
-	if (option_verbose > 2)
-		ast_verbose(VERBOSE_PREFIX_3 "AMD: initialSilence [%d] greeting [%d] afterGreetingSilence [%d] "
+	ast_verb(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 );
@@ -194,8 +192,7 @@
 	while ((res = ast_waitfor(chan, totalAnalysisTime)) > -1) {
 		/* If we fail to read in a frame, that means they hung up */
 		if (!(f = ast_read(chan))) {
-			if (option_verbose > 2)
-				ast_verbose(VERBOSE_PREFIX_3 "AMD: HANGUP\n");
+			ast_verb(3, "AMD: HANGUP\n");
 			ast_debug(1, "Got hangup\n");
 			strcpy(amdStatus, "HANGUP");
 			break;
@@ -241,8 +238,7 @@
 				}
 				
 				if (silenceDuration >= afterGreetingSilence  &&  inGreeting == 1) {
-					if (option_verbose > 2)
-						ast_verbose(VERBOSE_PREFIX_3 "AMD: HUMAN: silenceDuration:%d afterGreetingSilence:%d\n",
+					ast_verb(3, "AMD: HUMAN: silenceDuration:%d afterGreetingSilence:%d\n",
 							    silenceDuration, afterGreetingSilence);
 					ast_frfree(f);
 					strcpy(amdStatus , "HUMAN");
@@ -274,8 +270,7 @@
 				}
 				
 				if (inGreeting == 1 && voiceDuration >= greeting) {
-					if (option_verbose > 2)
-						ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: voiceDuration:%d greeting:%d\n", voiceDuration, greeting);
+					ast_verb(3, "AMD: ANSWERING MACHINE: voiceDuration:%d greeting:%d\n", voiceDuration, greeting);
 					ast_frfree(f);
 					strcpy(amdStatus , "MACHINE");
 					sprintf(amdCause , "LONGGREETING-%d-%d", voiceDuration, greeting);
@@ -295,8 +290,7 @@
 	
 	if (!res) {
 		/* 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);
+		ast_verb(3, "AMD: Channel [%s]. Too long...\n", chan->name);
 		strcpy(amdStatus , "NOTSURE");
 		sprintf(amdCause , "TOOLONG-%d", iTotalTime);
 	}
@@ -368,8 +362,7 @@
 
 	ast_config_destroy(cfg);
 
-	if (option_verbose > 2)
-		ast_verbose(VERBOSE_PREFIX_3 "AMD defaults: initialSilence [%d] greeting [%d] afterGreetingSilence [%d] "
+	ast_verb(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 );

Modified: team/group/res_config_ldap/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_authenticate.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_authenticate.c (original)
+++ team/group/res_config_ldap/apps/app_authenticate.c Tue Jul 31 08:39:38 2007
@@ -66,7 +66,7 @@
 static char *synopsis = "Authenticate a user";
 
 static char *descrip =
-"  Authenticate(password[|options[|maxdigits]]): This application asks the caller\n"
+"  Authenticate(password[,options[,maxdigits]]): This application asks the caller\n"
 "to enter a given password in order to continue dialplan execution. If the password\n"
 "begins with the '/' character, it is interpreted as a file which contains a list of\n"
 "valid passwords, listed 1 password per line in the file.\n"

Modified: team/group/res_config_ldap/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_chanisavail.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_chanisavail.c (original)
+++ team/group/res_config_ldap/apps/app_chanisavail.c Tue Jul 31 08:39:38 2007
@@ -53,7 +53,7 @@
 static char *synopsis = "Check channel availability";
 
 static char *descrip = 
-"  ChanIsAvail(Technology/resource[&Technology2/resource2...][|options]): \n"
+"  ChanIsAvail(Technology/resource[&Technology2/resource2...][,options]): \n"
 "This application will check to see if any of the specified channels are\n"
 "available. The following variables will be set by this application:\n"
 "  ${AVAILCHAN}     - the name of the available channel, if one exists\n"

Modified: team/group/res_config_ldap/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_channelredirect.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_channelredirect.c (original)
+++ team/group/res_config_ldap/apps/app_channelredirect.c Tue Jul 31 08:39:38 2007
@@ -45,15 +45,14 @@
 static char *app = "ChannelRedirect";
 static char *synopsis = "Redirects given channel to a dialplan target.";
 static char *descrip = 
-"ChannelRedirect(channel|[[context|]extension|]priority):\n"
+"ChannelRedirect(channel,[[context,]extension,]priority)\n"
 "  Sends the specified channel to the specified extension priority\n";
 
 
 static int asyncgoto_exec(struct ast_channel *chan, void *data)
 {
 	int res = -1;
-	char *info, *context, *exten, *priority;
-	int prio = 1;
+	char *info;
 	struct ast_channel *chan2 = NULL;
 
 	AST_DECLARE_APP_ARGS(args,
@@ -62,7 +61,7 @@
 	);
 
 	if (ast_strlen_zero(data)) {
-		ast_log(LOG_WARNING, "%s requires an argument (channel|[[context|]exten|]priority)\n", app);
+		ast_log(LOG_WARNING, "%s requires an argument (channel,[[context,]exten,]priority)\n", app);
 		return -1;
 	}
 
@@ -70,7 +69,7 @@
 	AST_STANDARD_APP_ARGS(args, info);
 
 	if (ast_strlen_zero(args.channel) || ast_strlen_zero(args.label)) {
-		ast_log(LOG_WARNING, "%s requires an argument (channel|[[context|]exten|]priority)\n", app);
+		ast_log(LOG_WARNING, "%s requires an argument (channel,[[context,]exten,]priority)\n", app);
 		goto quit;
 	}
 
@@ -80,38 +79,10 @@
 		goto quit;
 	}
 
-	/* Parsed right to left, so standard parsing won't work */
-	context = strsep(&args.label, "|");
-	exten = strsep(&args.label, "|");
-	if (exten) {
-		priority = strsep(&args.label, "|");
-		if (!priority) {
-			priority = exten;
-			exten = context;
-			context = NULL;
-		}
-	} else {
-		priority = context;
-		context = NULL;
-	}
+	res = ast_parseable_goto(chan2, args.label);
 
-	/* ast_findlabel_extension does not convert numeric priorities; it only does a lookup */
-	if (!(prio = atoi(priority)) && !(prio = ast_findlabel_extension(chan2, S_OR(context, chan2->context),
-									S_OR(exten, chan2->exten), priority, chan2->cid.cid_num))) {
-		ast_log(LOG_WARNING, "'%s' is not a known priority or label\n", priority);
-		goto chanquit;
-	}
-
-	ast_debug(2, "Attempting async goto (%s) to %s|%s|%d\n", args.channel, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio);
-
-	if (ast_async_goto_if_exists(chan2, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio))
-		ast_log(LOG_WARNING, "%s failed for %s\n", app, args.channel);
-	else
-		res = 0;
-
- chanquit:
 	ast_mutex_unlock(&chan2->lock);
- quit:
+quit:
 
 	return res;
 }

Modified: team/group/res_config_ldap/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_chanspy.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_chanspy.c (original)
+++ team/group/res_config_ldap/apps/app_chanspy.c Tue Jul 31 08:39:38 2007
@@ -56,7 +56,7 @@
 static const char *tdesc = "Listen to a channel, and optionally whisper into it";
 static const char *app_chan = "ChanSpy";
 static const char *desc_chan = 
-"  ChanSpy([chanprefix][|options]): This application is used to listen to the\n"
+"  ChanSpy([chanprefix][,options]): This application is used to listen to the\n"
 "audio from an Asterisk channel. This includes the audio coming in and\n"
 "out of the channel being spied on. If the 'chanprefix' parameter is specified,\n"
 "only channels beginning with this string will be spied upon.\n"
@@ -97,7 +97,7 @@
 
 static const char *app_ext = "ExtenSpy";
 static const char *desc_ext = 
-"  ExtenSpy(exten[@context][|options]): This application is used to listen to the\n"
+"  ExtenSpy(exten[@context][,options]): This application is used to listen to the\n"
 "audio from an Asterisk channel. This includes the audio coming in and\n"
 "out of the channel being spied on. Only channels created by outgoing calls for the\n"
 "specified extension will be selected for spying. If the optional context is not\n"
@@ -277,8 +277,7 @@
 		return 0;
 
 	name = ast_strdupa(spyee->name);
-	if (option_verbose >= 2)
-		ast_verbose(VERBOSE_PREFIX_2 "Spying on channel %s\n", name);
+	ast_verb(2, "Spying on channel %s\n", name);
 
 	memset(&csth, 0, sizeof(csth));
 	ast_set_flag(&csth.spy, CHANSPY_FORMAT_AUDIO);
@@ -401,8 +400,7 @@
 			(*volfactor)++;
 			if (*volfactor > 4)
 				*volfactor = -4;
-			if (option_verbose > 2)
-				ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
+			ast_verb(3, "Setting spy volume on %s to %d\n", chan->name, *volfactor);
 			csth.volfactor = *volfactor;
 			set_volume(chan, &csth);
 			if (csth.volfactor) {
@@ -626,33 +624,27 @@
 
 static int chanspy_exec(struct ast_channel *chan, void *data)
 {
-	char *options = NULL;
-	char *spec = NULL;
-	char *argv[2];
 	char *mygroup = NULL;
 	char *recbase = NULL;
 	int fd = 0;
 	struct ast_flags flags;
 	int oldwf = 0;
-	int argc = 0;
 	int volfactor = 0;
 	int res;
+	AST_DECLARE_APP_ARGS(args,
+		AST_APP_ARG(spec);
+		AST_APP_ARG(options);
+	);
+	char *opts[OPT_ARG_ARRAY_SIZE];
 
 	data = ast_strdupa(data);
-
-	if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
-		spec = argv[0];
-		if (argc > 1)
-			options = argv[1];
-
-		if (ast_strlen_zero(spec) || !strcmp(spec, "all"))
-			spec = NULL;
-	}
-
-	if (options) {
-		char *opts[OPT_ARG_ARRAY_SIZE];
-		
-		ast_app_parse_options(spy_opts, &flags, opts, options);
+	AST_STANDARD_APP_ARGS(args, data);
+
+	if (args.spec && !strcmp(args.spec, "all"))
+		args.spec = NULL;
+
+	if (args.options) {
+		ast_app_parse_options(spy_opts, &flags, opts, args.options);
 		if (ast_test_flag(&flags, OPTION_GROUP))
 			mygroup = opts[OPT_ARG_GROUP];
 
@@ -690,7 +682,7 @@
 		}
 	}
 
-	res = common_exec(chan, &flags, volfactor, fd, mygroup, spec, NULL, NULL);
+	res = common_exec(chan, &flags, volfactor, fd, mygroup, args.spec, NULL, NULL);
 
 	if (fd)
 		close(fd);
@@ -703,35 +695,35 @@
 
 static int extenspy_exec(struct ast_channel *chan, void *data)
 {
-	char *options = NULL;
-	char *exten = NULL;
-	char *context = NULL;
-	char *argv[2];
+	char *ptr, *exten = NULL;
 	char *mygroup = NULL;
 	char *recbase = NULL;
 	int fd = 0;
 	struct ast_flags flags;
 	int oldwf = 0;
-	int argc = 0;
 	int volfactor = 0;
 	int res;
+	AST_DECLARE_APP_ARGS(args,
+		AST_APP_ARG(context);
+		AST_APP_ARG(options);
+	);
 
 	data = ast_strdupa(data);
 
-	if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
-		context = argv[0];
-		if (!ast_strlen_zero(argv[0]))
-			exten = strsep(&context, "@");
-		if (ast_strlen_zero(context))
-			context = ast_strdupa(chan->context);
-		if (argc > 1)
-			options = argv[1];
-	}
-
-	if (options) {
+	AST_STANDARD_APP_ARGS(args, data);
+	if (!ast_strlen_zero(args.context) && (ptr = strchr(args.context, '@'))) {
+		exten = args.context;
+		*ptr++ = '\0';
+		args.context = ptr;
+	}
+
+	if (ast_strlen_zero(args.context))
+		args.context = ast_strdupa(chan->context);
+
+	if (args.options) {
 		char *opts[OPT_ARG_ARRAY_SIZE];
 		
-		ast_app_parse_options(spy_opts, &flags, opts, options);
+		ast_app_parse_options(spy_opts, &flags, opts, args.options);
 		if (ast_test_flag(&flags, OPTION_GROUP))
 			mygroup = opts[OPT_ARG_GROUP];
 
@@ -769,7 +761,7 @@
 		}
 	}
 
-	res = common_exec(chan, &flags, volfactor, fd, mygroup, NULL, exten, context);
+	res = common_exec(chan, &flags, volfactor, fd, mygroup, NULL, exten, args.context);
 
 	if (fd)
 		close(fd);

Modified: team/group/res_config_ldap/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_controlplayback.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_controlplayback.c (original)
+++ team/group/res_config_ldap/apps/app_controlplayback.c Tue Jul 31 08:39:38 2007
@@ -49,7 +49,7 @@
 static const char *synopsis = "Play a file with fast forward and rewind";
 
 static const char *descrip = 
-"  ControlPlayback(file[|skipms[|ff[|rew[|stop[|pause[|restart|options]]]]]]]):\n"
+"  ControlPlayback(file[,skipms[,ff[,rew[,stop[,pause[,restart,options]]]]]]]):\n"
 "This application will play back the given filename. By default, the '*' key\n"
 "can be used to rewind, and the '#' key can be used to fast-forward.\n"
 "Parameters:\n"
@@ -94,20 +94,18 @@
 	long offsetms = 0;
 	char offsetbuf[20];
 	char *tmp;
-	int argc;
-	char *argv[8] = { NULL, };
-	enum arg_ids {
-		arg_file = 0,
-		arg_skip = 1,
-		arg_fwd = 2,
-		arg_rev = 3,
-		arg_stop = 4,
-		arg_pause = 5,
-		arg_restart = 6,
-		options = 7,
-	};
 	struct ast_flags opts = { 0, };
 	char *opt_args[OPT_ARG_ARRAY_LEN];
+	AST_DECLARE_APP_ARGS(args,
+		AST_APP_ARG(filename);
+		AST_APP_ARG(skip);
+		AST_APP_ARG(fwd);
+		AST_APP_ARG(rev);
+		AST_APP_ARG(stop);
+		AST_APP_ARG(pause);
+		AST_APP_ARG(restart);
+		AST_APP_ARG(options);
+	);
 
 	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
@@ -115,39 +113,36 @@
 	}
 	
 	tmp = ast_strdupa(data);
+	AST_STANDARD_APP_ARGS(args, tmp);
 
-	argc = ast_app_separate_args(tmp, '|', argv, sizeof(argv) / sizeof(argv[0]));
-
-	if (argc < 1) {
+	if (args.argc < 1) {
 		ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
 		return -1;
 	}
 
-	skipms = argv[arg_skip] ? atoi(argv[arg_skip]) : 3000;
-	if (!skipms)
-		skipms = 3000;
+	skipms = args.skip ? (atoi(args.skip) ? atoi(args.skip) : 3000) : 3000;
 
-	if (!argv[arg_fwd] || !is_on_phonepad(*argv[arg_fwd]))
-		argv[arg_fwd] = "#";
-	if (!argv[arg_rev] || !is_on_phonepad(*argv[arg_rev]))
-		argv[arg_rev] = "*";
-	if (argv[arg_stop] && !is_on_phonepad(*argv[arg_stop]))
-		argv[arg_stop] = NULL;
-	if (argv[arg_pause] && !is_on_phonepad(*argv[arg_pause]))
-		argv[arg_pause] = NULL;
-	if (argv[arg_restart] && !is_on_phonepad(*argv[arg_restart]))
-		argv[arg_restart] = NULL;
+	if (!args.fwd || !is_on_phonepad(*args.fwd))
+		args.fwd = "#";
+	if (!args.rev || !is_on_phonepad(*args.rev))
+		args.rev = "*";
+	if (args.stop && !is_on_phonepad(*args.stop))
+		args.stop = NULL;
+	if (args.pause && !is_on_phonepad(*args.pause))
+		args.pause = NULL;
+	if (args.restart && !is_on_phonepad(*args.restart))
+		args.restart = NULL;
 
-	if (argv[options]) {
-		ast_app_parse_options(cpb_opts, &opts, opt_args, argv[options]);		
+	if (args.options) {
+		ast_app_parse_options(cpb_opts, &opts, opt_args, args.options);		
 		if (ast_test_flag(&opts, OPT_OFFSET))
 			offsetms = atol(opt_args[OPT_ARG_OFFSET]);
 	}
 
-	res = ast_control_streamfile(chan, argv[arg_file], argv[arg_fwd], argv[arg_rev], argv[arg_stop], argv[arg_pause], argv[arg_restart], skipms, &offsetms);
+	res = ast_control_streamfile(chan, args.filename, args.fwd, args.rev, args.stop, args.pause, args.restart, skipms, &offsetms);
 
 	/* If we stopped on one of our stop keys, return 0  */
-	if (argv[arg_stop] && strchr(argv[arg_stop], res)) {
+	if (args.stop && strchr(args.stop, res)) {
 		res = 0;
 		pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
 	} else {

Modified: team/group/res_config_ldap/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/group/res_config_ldap/apps/app_db.c?view=diff&rev=77813&r1=77812&r2=77813
==============================================================================
--- team/group/res_config_ldap/apps/app_db.c (original)
+++ team/group/res_config_ldap/apps/app_db.c Tue Jul 31 08:39:38 2007
@@ -85,17 +85,13 @@
 		keytree = 0;
 	}
 
-	if (option_verbose > 2)	{
 		if (keytree)
-			ast_verbose(VERBOSE_PREFIX_3 "DBdeltree: family=%s, keytree=%s\n", family, keytree);
+		ast_verb(3, "DBdeltree: family=%s, keytree=%s\n", family, keytree);
 		else
-			ast_verbose(VERBOSE_PREFIX_3 "DBdeltree: family=%s\n", family);
-	}
+		ast_verb(3, "DBdeltree: family=%s\n", family);
 
-	if (ast_db_deltree(family, keytree)) {
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "DBdeltree: Error deleting key from database.\n");
-	}
+	if (ast_db_deltree(family, keytree))
+		ast_verb(3, "DBdeltree: Error deleting key from database.\n");
 
 	return 0;
 }
@@ -119,12 +115,9 @@
 			ast_debug(1, "Ignoring; Syntax error in argument\n");
 			return 0;
 		}
-		if (option_verbose > 2)
-			ast_verbose(VERBOSE_PREFIX_3 "DBdel: family=%s, key=%s\n", family, key);
-		if (ast_db_del(family, key)) {
-			if (option_verbose > 2)
-				ast_verbose(VERBOSE_PREFIX_3 "DBdel: Error deleting key from database.\n");

[... 20389 lines stripped ...]



More information about the asterisk-commits mailing list