[svn-commits] russell: branch group/cdr_backend_ast_str r111661 - in /team/group/cdr_backen...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 28 11:28:34 CDT 2008


Author: russell
Date: Fri Mar 28 11:28:34 2008
New Revision: 111661

URL: http://svn.digium.com/view/asterisk?view=rev&rev=111661
Log:
resolve reset for juggie

Added:
    team/group/cdr_backend_ast_str/contrib/scripts/get_ilbc_source.sh
      - copied unchanged from r111659, trunk/contrib/scripts/get_ilbc_source.sh
Modified:
    team/group/cdr_backend_ast_str/   (props changed)
    team/group/cdr_backend_ast_str/CHANGES
    team/group/cdr_backend_ast_str/UPGRADE.txt
    team/group/cdr_backend_ast_str/apps/app_playback.c
    team/group/cdr_backend_ast_str/apps/app_queue.c
    team/group/cdr_backend_ast_str/apps/app_voicemail.c
    team/group/cdr_backend_ast_str/channels/chan_iax2.c
    team/group/cdr_backend_ast_str/channels/chan_sip.c
    team/group/cdr_backend_ast_str/channels/iax2-provision.c
    team/group/cdr_backend_ast_str/channels/misdn_config.c
    team/group/cdr_backend_ast_str/codecs/ilbc/   (props changed)
    team/group/cdr_backend_ast_str/contrib/scripts/autosupport
    team/group/cdr_backend_ast_str/doc/valgrind.txt
    team/group/cdr_backend_ast_str/formats/format_wav_gsm.c
    team/group/cdr_backend_ast_str/include/asterisk/ael_structs.h
    team/group/cdr_backend_ast_str/include/asterisk/config.h
    team/group/cdr_backend_ast_str/include/asterisk/dsp.h
    team/group/cdr_backend_ast_str/include/asterisk/linkedlists.h
    team/group/cdr_backend_ast_str/include/asterisk/pval.h
    team/group/cdr_backend_ast_str/include/asterisk/udptl.h
    team/group/cdr_backend_ast_str/main/acl.c
    team/group/cdr_backend_ast_str/main/asterisk.c
    team/group/cdr_backend_ast_str/main/cdr.c
    team/group/cdr_backend_ast_str/main/config.c
    team/group/cdr_backend_ast_str/main/dnsmgr.c
    team/group/cdr_backend_ast_str/main/dsp.c
    team/group/cdr_backend_ast_str/main/enum.c
    team/group/cdr_backend_ast_str/main/features.c
    team/group/cdr_backend_ast_str/main/frame.c
    team/group/cdr_backend_ast_str/main/http.c
    team/group/cdr_backend_ast_str/main/loader.c
    team/group/cdr_backend_ast_str/main/logger.c
    team/group/cdr_backend_ast_str/main/manager.c
    team/group/cdr_backend_ast_str/main/pbx.c
    team/group/cdr_backend_ast_str/main/rtp.c
    team/group/cdr_backend_ast_str/main/udptl.c
    team/group/cdr_backend_ast_str/pbx/pbx_ael.c
    team/group/cdr_backend_ast_str/res/ael/pval.c

Propchange: team/group/cdr_backend_ast_str/
------------------------------------------------------------------------------
    automerge = *

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

Propchange: team/group/cdr_backend_ast_str/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Mar 28 11:28:34 2008
@@ -1,1 +1,1 @@
-/trunk:1-111011
+/trunk:1-111660

Modified: team/group/cdr_backend_ast_str/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/CHANGES?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/CHANGES (original)
+++ team/group/cdr_backend_ast_str/CHANGES Fri Mar 28 11:28:34 2008
@@ -24,6 +24,12 @@
 -----------
  * The ATTENDED_TRANSFER_COMPLETE_SOUND can now be set using setvar to cause a given
    audio file to be played upon completion of an attended transfer.
+
+CLI Changes
+-----------
+  * New CLI command, "config reload <file.conf>" which reloads any module that
+     references that particular configuration file.  Also added "config list"
+     which shows which configuration files are in use.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0  -------------

Modified: team/group/cdr_backend_ast_str/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/UPGRADE.txt?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/UPGRADE.txt (original)
+++ team/group/cdr_backend_ast_str/UPGRADE.txt Fri Mar 28 11:28:34 2008
@@ -195,15 +195,8 @@
   (http://www.gipscorp.com). This code is not licensed for
   distribution, and thus has been removed from the Asterisk source
   code distribution. If you wish to use codec_ilbc to support iLBC
-  channels in Asterisk, you must go to:
-
-  http://ilbcfreeware.org
-
-  and obtain the iLBC source code from that site, including agreeing
-  to the license agreement specified. The site has instructions on how
-  to extract the source code from the RFC file where it has been
-  published; after you have done that, copy the resulting *.c and *.h
-  files into the codecs/ilbc directory of the Asterisk source code
-  tree and follow your normal steps of building Asterisk. You will
-  need to run 'menuselect' and enable the iLBC codec in the 'Codec
-  Translators' category.
+  channels in Asterisk, you can run the contrib/scripts/get_ilbc_source.sh
+  script to download the source and put it in the proper place in
+  the Asterisk build tree. Once that is done you can follow your normal
+  steps of building Asterisk. You will need to run 'menuselect' and enable
+  the iLBC codec in the 'Codec  Translators' category.

Modified: team/group/cdr_backend_ast_str/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/apps/app_playback.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/apps/app_playback.c (original)
+++ team/group/cdr_backend_ast_str/apps/app_playback.c Fri Mar 28 11:28:34 2008
@@ -55,6 +55,8 @@
 "This application sets the following channel variable upon completion:\n"
 " PLAYBACKSTATUS    The status of the playback attempt as a text string, one of\n"
 "               SUCCESS | FAILED\n"
+"See Also: Background (application) -- for playing soundfiles that are interruptible\n"
+"          WaitExten (application) -- wait for digits from caller, optionally play music on hold\n"
 ;
 
 

Modified: team/group/cdr_backend_ast_str/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/apps/app_queue.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/apps/app_queue.c (original)
+++ team/group/cdr_backend_ast_str/apps/app_queue.c Fri Mar 28 11:28:34 2008
@@ -1408,8 +1408,6 @@
 {
 	struct call_queue *q = obj;
 	int i;
-
-	ast_debug(0, "Queue destructor called for queue '%s'!\n", q->name);
 
 	free_members(q, 1);
 	ast_string_field_free_memory(q);
@@ -6178,6 +6176,8 @@
 {
 	int res;
 	struct ast_context *con;
+	struct ao2_iterator q_iter;
+	struct call_queue *q = NULL;
 
 	if (device_state.thread != AST_PTHREADT_NULL) {
 		device_state.stop = 1;
@@ -6190,7 +6190,7 @@
 	ast_cli_unregister_multiple(cli_queue, sizeof(cli_queue) / sizeof(struct ast_cli_entry));
 	res = ast_manager_unregister("QueueStatus");
 	res |= ast_manager_unregister("Queues");
-	res |= ast_manager_unregister("QueueStatus");
+	res |= ast_manager_unregister("QueueRule");
 	res |= ast_manager_unregister("QueueSummary");
 	res |= ast_manager_unregister("QueueAdd");
 	res |= ast_manager_unregister("QueueRemove");
@@ -6220,6 +6220,11 @@
 
 	clear_and_free_interfaces();
 
+	q_iter = ao2_iterator_init(queues, 0);
+	while ((q = ao2_iterator_next(&q_iter))) {
+		ao2_unlink(queues, q);
+		queue_unref(q);
+	}
 	ao2_ref(queues, -1);
 
 	return res;

Modified: team/group/cdr_backend_ast_str/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/apps/app_voicemail.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/apps/app_voicemail.c (original)
+++ team/group/cdr_backend_ast_str/apps/app_voicemail.c Fri Mar 28 11:28:34 2008
@@ -416,6 +416,7 @@
 	int starting;
 	int repeats;
 #ifdef IMAP_STORAGE
+	ast_mutex_t lock;
 	int updated;                         /*!< decremented on each mail check until 1 -allows delay */
 	long msgArray[256];
 	MAILSTREAM *mailstream;
@@ -5042,7 +5043,9 @@
 #endif
 		/* Connect to mailbox to get mailstream so we can get delimiter */ 
 		imap_mailbox_name(tmp, sizeof(tmp), vms, 0, 1);
+		ast_mutex_lock(&vms->lock);
 		stream = mail_open (stream, tmp, debug ? OP_DEBUG : NIL);
+		ast_mutex_unlock(&vms->lock);
 		if (stream == NIL) {
 			ast_log(LOG_ERROR, "Can't connect to imap server %s\n", tmp);
 			return -1;
@@ -5057,7 +5060,9 @@
 	/* Now connect to the target folder */
 	imap_mailbox_name(tmp, sizeof(tmp), vms, box, 1);
 	ast_debug(3, "Before mail_open, server: %s, box:%d\n", tmp, box);
-	vms->mailstream = mail_open(stream, tmp, debug ? OP_DEBUG : NIL);
+	ast_mutex_lock(&vms->lock);
+	vms->mailstream = mail_open (stream, tmp, debug ? OP_DEBUG : NIL);
+	ast_mutex_unlock(&vms->lock);
 	if (vms->mailstream == NIL) {
 		return -1;
 	} else {
@@ -9793,8 +9798,10 @@
 	AST_LIST_TRAVERSE_SAFE_END
 	AST_LIST_UNLOCK(&vmstates);
 	
-	if (vc)
+	if (vc) {
+		ast_mutex_destroy(&vc->vms->lock);
 		ast_free(vc);
+	}
 	else
 		ast_log(LOG_ERROR, "No vmstate found for user:%s, mailbox %s\n", vms->imapuser, vms->username);
 }
@@ -9823,6 +9830,7 @@
 	for (x = 0; x < 256; x++) {
 		vms->msgArray[x] = 0;
 	}
+	ast_mutex_init(&vms->lock);
 }
 
 static void check_msgArray(struct vm_state *vms) 

Modified: team/group/cdr_backend_ast_str/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/channels/chan_iax2.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/channels/chan_iax2.c (original)
+++ team/group/cdr_backend_ast_str/channels/chan_iax2.c Fri Mar 28 11:28:34 2008
@@ -488,6 +488,8 @@
 	unsigned int last;
 	/*! Last sent timestamp - never send the same timestamp twice in a single call */
 	unsigned int lastsent;
+	/*! Timestamp of the last video frame sent */
+	unsigned int lastvsent;
 	/*! Next outgoing timestamp if everything is good */
 	unsigned int nextpred;
 	/*! True if the last voice we transmitted was not silence/CNG */
@@ -4084,6 +4086,17 @@
 				p->nextpred = ms;
 				p->notsilenttx = 1;
 			}
+		} else if ( f->frametype == AST_FRAME_VIDEO ) {
+			/*
+			* IAX2 draft 03 says that timestamps MUST be in order.
+			* It does not say anything about several frames having the same timestamp
+			* When transporting video, we can have a frame that spans multiple iax packets
+			* (so called slices), so it would make sense to use the same timestamp for all of
+			* them
+			* We do want to make sure that frames don't go backwards though
+			*/
+			if ( (unsigned int)ms < p->lastsent )
+				ms = p->lastsent;
 		} else {
 			/* On a dataframe, use last value + 3 (to accomodate jitter buffer shrinking) if appropriate unless
 			   it's a genuine frame */
@@ -4467,11 +4480,22 @@
 			/* Mark that mini-style frame is appropriate */
 			sendmini = 1;
 	}
-	if (((fts & 0xFFFF8000L) == (lastsent & 0xFFFF8000L)) && 
-		(f->frametype == AST_FRAME_VIDEO) &&
-		((f->subclass & ~0x1) == pvt->svideoformat)) {
+	if ( f->frametype == AST_FRAME_VIDEO ) {
+		/*
+		 * If the lower 15 bits of the timestamp roll over, or if
+		 * the video format changed then send a full frame.
+		 * Otherwise send a mini video frame
+		 */
+		if (((fts & 0xFFFF8000L) == (pvt->lastvsent & 0xFFFF8000L)) &&
+		    ((f->subclass & ~0x1) == pvt->svideoformat)
+		   ) {
 			now = 1;
 			sendmini = 1;
+		} else {
+			now = 0;
+			sendmini = 0;
+		}
+		pvt->lastvsent = fts;
 	}
 	/* Allocate an iax_frame */
 	if (now) {

Modified: team/group/cdr_backend_ast_str/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/channels/chan_sip.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/channels/chan_sip.c (original)
+++ team/group/cdr_backend_ast_str/channels/chan_sip.c Fri Mar 28 11:28:34 2008
@@ -8799,7 +8799,7 @@
 		ast_channel_unlock(chan);
 	}
 	if (sdp) {
-		if (p->udptl && p->t38.state == T38_LOCAL_DIRECT) {
+		if (p->udptl && (p->t38.state == T38_LOCAL_DIRECT || p->t38.state == T38_LOCAL_REINVITE)) {
 			ast_udptl_offered_from_local(p->udptl, 1);
 			ast_debug(1, "T38 is in state %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>");
 			add_t38_sdp(&req, p);
@@ -13143,8 +13143,9 @@
 	int numchans;   /* return value */
 };
 
-#define FORMAT3 "%-15.15s  %-10.10s  %-15.15s  %-15.15s  %-13.13s  %-15.15s %-10.10s\n"
-#define FORMAT2 "%-15.15s  %-10.10s  %-15.15s  %-15.15s  %-7.7s  %-15.15s\n"
+#define FORMAT4 "%-15.15s  %-10.10s  %-15.15s  %-15.15s  %-13.13s  %-15.15s %-10.10s %-6.6d\n"
+#define FORMAT3 "%-15.15s  %-10.10s  %-15.15s  %-15.15s  %-13.13s  %-15.15s %-10.10s %-6.6s\n"
+#define FORMAT2 "%-15.15s  %-10.10s  %-15.15s  %-15.15s  %-7.7s  %-15.15s %-6.6s\n"
 #define FORMAT  "%-15.15s  %-10.10s  %-15.15s  %-15.15s  %-3.3s %-3.3s  %-15.15s %-10.10s\n"
 
 /*! \brief callback for show channel|subscription */
@@ -13175,14 +13176,15 @@
 			struct ast_str *mailbox_str = ast_str_alloca(512);
 			if (cur->subscribed == MWI_NOTIFICATION && cur->relatedpeer)
 				peer_mailboxes_to_str(&mailbox_str, cur->relatedpeer);
-			ast_cli(arg->fd, FORMAT3, ast_inet_ntoa(dst->sin_addr),
+			ast_cli(arg->fd, FORMAT4, ast_inet_ntoa(dst->sin_addr),
 				S_OR(cur->username, S_OR(cur->cid_num, "(None)")), 
 			   	cur->callid,
 				/* the 'complete' exten/context is hidden in the refer_to field for subscriptions */
 				cur->subscribed == MWI_NOTIFICATION ? "--" : cur->subscribeuri,
 				cur->subscribed == MWI_NOTIFICATION ? "<none>" : ast_extension_state2str(cur->laststate), 
 				subscription_type2str(cur->subscribed),
-				cur->subscribed == MWI_NOTIFICATION ? S_OR(mailbox_str->str, "<none>") : "<none>"
+				cur->subscribed == MWI_NOTIFICATION ? S_OR(mailbox_str->str, "<none>") : "<none>",
+				cur->expiry
 );
 			arg->numchans++;
 		}
@@ -13215,9 +13217,9 @@
 		return CLI_SHOWUSAGE;
 	arg.subscriptions = !strcasecmp(a->argv[e->args - 1], "subscriptions");
 	if (!arg.subscriptions)
-		ast_cli(arg.fd, FORMAT2, "Peer", "User/ANR", "Call ID", "Format", "Hold", "Last Message");
+		ast_cli(arg.fd, FORMAT2, "Peer", "User/ANR", "Call ID", "Format", "Hold", "Last Message", "Expiry");
 	else
-		ast_cli(arg.fd, FORMAT3, "Peer", "User", "Call ID", "Extension", "Last state", "Type", "Mailbox");
+		ast_cli(arg.fd, FORMAT3, "Peer", "User", "Call ID", "Extension", "Last state", "Type", "Mailbox", "Expiry");
 
 	/* iterate on the container and invoke the callback on each item */
 	dialoglist_lock();

Modified: team/group/cdr_backend_ast_str/channels/iax2-provision.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/channels/iax2-provision.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/channels/iax2-provision.c (original)
+++ team/group/cdr_backend_ast_str/channels/iax2-provision.c Fri Mar 28 11:28:34 2008
@@ -497,7 +497,7 @@
 		cur->dead = 1;
 		cur = cur->next;
 	}
-	cfg = ast_config_load("iaxprov.conf", config_flags);
+	cfg = ast_config_load2("iaxprov.conf", "chan_iax2", config_flags);
 	if (cfg != NULL && cfg != CONFIG_STATUS_FILEUNCHANGED) {
 		/* Load as appropriate */
 		cat = ast_category_browse(cfg, NULL);

Modified: team/group/cdr_backend_ast_str/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/channels/misdn_config.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/channels/misdn_config.c (original)
+++ team/group/cdr_backend_ast_str/channels/misdn_config.c Fri Mar 28 11:28:34 2008
@@ -38,9 +38,6 @@
 #include "asterisk/pbx.h"
 #include "asterisk/strings.h"
 #include "asterisk/utils.h"
-
-#define AST_LOAD_CFG ast_config_load
-#define AST_DESTROY_CFG ast_config_destroy
 
 #define NO_DEFAULT "<>"
 #define NONE 0
@@ -1095,7 +1092,7 @@
 	struct ast_variable *v;
 	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 
-	if (!(cfg = AST_LOAD_CFG(config, config_flags))) {
+	if (!(cfg = ast_config_load2(config, "chan_misdn", config_flags))) {
 		ast_log(LOG_WARNING, "missing file: misdn.conf\n");
 		return -1;
 	} else if (cfg == CONFIG_STATUS_FILEUNCHANGED)
@@ -1149,7 +1146,7 @@
 	_fill_defaults();
 
 	misdn_cfg_unlock();
-	AST_DESTROY_CFG(cfg);
+	ast_config_destroy(cfg);
 
 	return 0;
 }

Propchange: team/group/cdr_backend_ast_str/codecs/ilbc/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Mar 28 11:28:34 2008
@@ -3,3 +3,7 @@
 *.d
 *.a
 *.so
+*.c
+*.h
+rfc3951.txt
+extract-cfile.awk

Modified: team/group/cdr_backend_ast_str/contrib/scripts/autosupport
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/contrib/scripts/autosupport?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/contrib/scripts/autosupport (original)
+++ team/group/cdr_backend_ast_str/contrib/scripts/autosupport Fri Mar 28 11:28:34 2008
@@ -12,12 +12,15 @@
 
 OUTPUT=$HOME/digiuminfo
 
-if [ $UID -ne  0 ]; then
+MYUID=$(id -u);
+
+if [ $MYUID -ne  0 ]; then
 
   echo "You must be root to run this."
- 
-exit 1
+  exit 1
 fi
+
+clear
 
 echo
 echo "This will gather information about your system such as:"
@@ -31,9 +34,16 @@
   rm -f $OUTPUT
 
   echo "------------------" >> $OUTPUT;
-  echo "PCI LIST " >> $OUTPUT;
+  echo "PCI LIST" >> $OUTPUT;
   echo "------------------" >> $OUTPUT;
-  lspci -vb >> $OUTPUT;
+  lspci -vvvb >> $OUTPUT;
+  echo >> $OUTPUT;
+  echo >> $OUTPUT;
+
+  echo "------------------" >> $OUTPUT;
+  echo "PCI LIST(no lookup)" >> $OUTPUT;
+  echo "------------------" >> $OUTPUT;
+  lspci -vvvbn >> $OUTPUT;
   echo >> $OUTPUT;
   echo >> $OUTPUT;
 
@@ -41,13 +51,6 @@
   echo "INTERRUPTS" >> $OUTPUT;
   echo "------------------" >> $OUTPUT;
   cat /proc/interrupts >> $OUTPUT;
-  echo >> $OUTPUT;
-  echo >> $OUTPUT;
-
-  echo "------------------" >> $OUTPUT;
-  echo "DMESG OUTPUT" >> $OUTPUT;
-  echo "------------------" >> $OUTPUT;
-  dmesg >> $OUTPUT;
   echo >> $OUTPUT;
   echo >> $OUTPUT;
 
@@ -73,10 +76,44 @@
   echo >> $OUTPUT;
 
   echo "------------------" >> $OUTPUT;
-  echo "HDPARM STATUS" >> $OUTPUT;
+  echo "VERSION INFO" >> $OUTPUT;
   echo "------------------" >> $OUTPUT;
-  hdparm /dev/hda >> $OUTPUT;
-  hdparm -i /dev/hda >> $OUTPUT;
+  cat /proc/version >> $OUTPUT;
+  echo >> $OUTPUT;
+  echo >> $OUTPUT;
+
+  echo "------------------" >> $OUTPUT;
+  echo "CMDLINE INFO" >> $OUTPUT;
+  echo "------------------" >> $OUTPUT;
+  cat /proc/cmdline >> $OUTPUT;
+  echo >> $OUTPUT;
+  echo >> $OUTPUT;
+
+  echo "------------------" >> $OUTPUT;
+  echo "LOADED MODULES" >> $OUTPUT;
+  echo "------------------" >> $OUTPUT;
+  lsmod >> $OUTPUT;
+  echo >> $OUTPUT;
+  echo >> $OUTPUT;
+
+  echo "------------------" >> $OUTPUT;
+  echo "ZTTEST" >> $OUTPUT;
+  echo "------------------" >> $OUTPUT;
+  zttest -c 20 >> $OUTPUT;
+  echo >> $OUTPUT;
+  echo >> $OUTPUT;
+
+  echo "------------------" >> $OUTPUT;
+  echo "DMESG OUTPUT" >> $OUTPUT;
+  echo "------------------" >> $OUTPUT;
+  dmesg >> $OUTPUT;
+  echo >> $OUTPUT;
+  echo >> $OUTPUT;
+
+  echo "------------------" >> $OUTPUT;
+  echo "DMIDECODE" >> $OUTPUT;
+  echo "------------------" >> $OUTPUT;
+  dmidecode >> $OUTPUT;
   echo >> $OUTPUT;
   echo >> $OUTPUT;
 
@@ -101,22 +138,18 @@
   echo >> $OUTPUT;
   echo >> $OUTPUT;
 
-  echo "------------------" >> $OUTPUT;
-  echo "ZTTEST" >> $OUTPUT;
-  echo "------------------" >> $OUTPUT;
-  /usr/src/zaptel/zttest -c 20 >> $OUTPUT;
-  echo >> $OUTPUT;
-  echo >> $OUTPUT;
-
 else
   echo "terminated";
 exit
 fi
 
+clear
+
 echo
 echo "Digium may require root level access to the system to help debug";
 echo "the problem you are experiencing. Do you want to provide login";
-echo "information at this time?";
+echo "information at this time? Please note that if you do so, change";
+echo "your root password to a secure temporary password for Digium support";
 echo "Press 'y' for yes and any other key to exit and save the previous info collected"
 read login
 
@@ -146,15 +179,17 @@
 
   echo "Additional login info: "$adinfo >> $OUTPUT
 
+  clear
   echo 
   echo "All information has been stored in $OUTPUT,"
-  echo "Please attach this file to an email ticket you already"
+  echo "Please attach this file to an email case you already"
   echo "have open with Digium Tech Support."
 
 else
+  clear
   echo
   echo "All information except login info has been stored in $OUTPUT,"
-  echo "Please send this file to an email ticket you already"
+  echo "Please send this file to an email case you already"
   echo "have open with Digium Tech Support."
 exit
 fi

Modified: team/group/cdr_backend_ast_str/doc/valgrind.txt
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/doc/valgrind.txt?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/doc/valgrind.txt (original)
+++ team/group/cdr_backend_ast_str/doc/valgrind.txt Fri Mar 28 11:28:34 2008
@@ -13,7 +13,14 @@
 3.  Run Asterisk as follows:
 	valgrind --log-file-exactly=valgrind.txt asterisk -vvvvcg 2>malloc_debug.txt
 
+	UPDATE:  The newest version of valgrind has eliminated the
+	--log-file-exactly option.  If you are running valgrind 3.3.0 or higher,
+	just use the --log-file option, keeping in mind that Valgrind will append
+	a trailing suffix onto valgrind.txt.
+
 4.  Reproduce the issue.  Following the manifestation of the issue (or when
 	the process crashes), upload the two files, valgrind.txt and
-	malloc_debug.txt to the issue tracker.
+	malloc_debug.txt to the issue tracker.  If you are using the --log-file
+	option, note that valgrind.txt will have a trailing suffix.  That's fine,
+	just upload that file.
 

Modified: team/group/cdr_backend_ast_str/formats/format_wav_gsm.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/formats/format_wav_gsm.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/formats/format_wav_gsm.c (original)
+++ team/group/cdr_backend_ast_str/formats/format_wav_gsm.c Fri Mar 28 11:28:34 2008
@@ -214,8 +214,8 @@
 	/* in a gsm WAV, data starts 60 bytes in */
 	bytes = end - MSGSM_DATA_OFFSET;
 	samples = htoll(bytes / MSGSM_FRAME_SIZE * MSGSM_SAMPLES);
-	datalen = htoll((bytes + 1) & ~0x1);
-	filelen = htoll(MSGSM_DATA_OFFSET - 8 + ((bytes + 1) & ~0x1));
+	datalen = htoll(bytes);
+	filelen = htoll(MSGSM_DATA_OFFSET - 8 + bytes);
 	if (cur < 0) {
 		ast_log(LOG_WARNING, "Unable to find our position\n");
 		return -1;
@@ -387,15 +387,6 @@
 	if (write_header(s->f))
 		return -1;
 	return 0;
-}
-
-static void wav_close(struct ast_filestream *s)
-{
-	char zero = 0;
-	/* Pad to even length */
-	fseek(s->f, 0, SEEK_END);
-	if (ftello(s->f) & 0x1)
-		fwrite(&zero, 1, 1, s->f);
 }
 
 static struct ast_frame *wav_read(struct ast_filestream *s, int *whennext)
@@ -539,7 +530,6 @@
 	.trunc = wav_trunc,
 	.tell = wav_tell,
 	.read = wav_read,
-	.close = wav_close,
 	.buf_size = 2*GSM_FRAME_SIZE + AST_FRIENDLY_OFFSET,
 	.desc_size = sizeof(struct wavg_desc),
 };

Modified: team/group/cdr_backend_ast_str/include/asterisk/ael_structs.h
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/include/asterisk/ael_structs.h?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/include/asterisk/ael_structs.h (original)
+++ team/group/cdr_backend_ast_str/include/asterisk/ael_structs.h Fri Mar 28 11:28:34 2008
@@ -107,6 +107,7 @@
 	char *hints;
 	int regexten;
 	int is_switch;
+	int has_switch;
 	
 	struct ast_context *context;
 	

Modified: team/group/cdr_backend_ast_str/include/asterisk/config.h
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/include/asterisk/config.h?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/include/asterisk/config.h (original)
+++ team/group/cdr_backend_ast_str/include/asterisk/config.h Fri Mar 28 11:28:34 2008
@@ -97,7 +97,7 @@
  */
 struct ast_config *ast_config_load2(const char *filename, const char *who_asked, struct ast_flags flags);
 
-#define ast_config_load(filename, flags)	ast_config_load2(filename, __FILE__, flags)
+#define ast_config_load(filename, flags)	ast_config_load2(filename, AST_MODULE, flags)
 
 /*! \brief Destroys a config 
  * \param config pointer to config data structure

Modified: team/group/cdr_backend_ast_str/include/asterisk/dsp.h
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/include/asterisk/dsp.h?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/include/asterisk/dsp.h (original)
+++ team/group/cdr_backend_ast_str/include/asterisk/dsp.h Fri Mar 28 11:28:34 2008
@@ -120,6 +120,10 @@
 /*! \brief Set fax mode */
 int ast_dsp_set_faxmode(struct ast_dsp *dsp, int faxmode);
 
+/*! \brief Returns true if DSP code was muting any fragment of the last processed frame.
+  Muting (squelching) happens when DSP code removes DTMF/MF/generic tones from the audio */
+int ast_dsp_was_muted(struct ast_dsp *dsp);
+
 /*! \brief Get tstate (Tone State) */
 int ast_dsp_get_tstate(struct ast_dsp *dsp);
 

Modified: team/group/cdr_backend_ast_str/include/asterisk/linkedlists.h
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/include/asterisk/linkedlists.h?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/include/asterisk/linkedlists.h (original)
+++ team/group/cdr_backend_ast_str/include/asterisk/linkedlists.h Fri Mar 28 11:28:34 2008
@@ -456,6 +456,7 @@
   \li AST_LIST_INSERT_AFTER()
   \li AST_LIST_INSERT_HEAD()
   \li AST_LIST_INSERT_TAIL()
+  \li AST_LIST_INSERT_SORTALPHA()
 */
 #define AST_LIST_TRAVERSE(head,var,field) 				\
 	for((var) = (head)->first; (var); (var) = (var)->field.next)
@@ -693,6 +694,35 @@
 } while (0)
 
 #define AST_RWLIST_INSERT_TAIL AST_LIST_INSERT_TAIL
+
+/*!
+ * \brief Inserts a list entry into a alphabetically sorted list
+ * \param head Pointer to the list head structure
+ * \param elm Pointer to the entry to be inserted
+ * \param field Name of the list entry field (declared using AST_LIST_ENTRY())
+ * \param sortfield Name of the field on which the list is sorted
+ */
+#define AST_LIST_INSERT_SORTALPHA(head, elm, field, sortfield) do { \
+	if (!(head)->first) {                                           \
+		(head)->first = (elm);                                      \
+		(head)->last = (elm);                                       \
+	} else {                                                        \
+		typeof((head)->first) cur = (head)->first, prev = NULL;     \
+		while (cur && strcmp(cur->sortfield, elm->sortfield) < 0) { \
+			prev = cur;                                             \
+			cur = cur->field.next;                                  \
+		}                                                           \
+		if (!prev) {                                                \
+			AST_LIST_INSERT_HEAD(head, elm, field);                 \
+		} else if (!cur) {                                          \
+			AST_LIST_INSERT_TAIL(head, elm, field);                 \
+		} else {                                                    \
+			AST_LIST_INSERT_AFTER(head, prev, elm, field);          \
+		}                                                           \
+	}                                                               \
+} while (0)
+
+#define AST_RWLIST_INSERT_SORTALPHA	AST_LIST_INSERT_SORTALPHA
 
 /*!
   \brief Appends a whole list to the tail of a list.

Modified: team/group/cdr_backend_ast_str/include/asterisk/pval.h
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/include/asterisk/pval.h?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/include/asterisk/pval.h (original)
+++ team/group/cdr_backend_ast_str/include/asterisk/pval.h Fri Mar 28 11:28:34 2008
@@ -138,7 +138,7 @@
 struct pval *find_macro(char *name);
 struct ael_priority *new_prio(void);
 struct ael_extension *new_exten(void);
-void linkprio(struct ael_extension *exten, struct ael_priority *prio);
+void linkprio(struct ael_extension *exten, struct ael_priority *prio, struct ael_extension *mother_exten);
 void destroy_extensions(struct ael_extension *exten);
 /* static void linkexten(struct ael_extension *exten, struct ael_extension *add);
    static void gen_prios(struct ael_extension *exten, char *label, pval *statement, struct ael_extension *mother_exten, struct ast_context *context ); */

Modified: team/group/cdr_backend_ast_str/include/asterisk/udptl.h
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/include/asterisk/udptl.h?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/include/asterisk/udptl.h (original)
+++ team/group/cdr_backend_ast_str/include/asterisk/udptl.h Fri Mar 28 11:28:34 2008
@@ -118,7 +118,7 @@
 
 void ast_udptl_init(void);
 
-void ast_udptl_reload(void);
+int ast_udptl_reload(void);
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }

Modified: team/group/cdr_backend_ast_str/main/acl.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/main/acl.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/main/acl.c (original)
+++ team/group/cdr_backend_ast_str/main/acl.c Fri Mar 28 11:28:34 2008
@@ -144,7 +144,7 @@
 #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
 		for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) {
 
-			if (ifap->ifa_addr->sa_family == AF_INET) {
+			if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_INET) {
 				sin = (const struct sockaddr_in *) ifap->ifa_addr;
 				score_address(sin, &best_addr, &best_score);
 				res = 0;

Modified: team/group/cdr_backend_ast_str/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/main/asterisk.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/main/asterisk.c (original)
+++ team/group/cdr_backend_ast_str/main/asterisk.c Fri Mar 28 11:28:34 2008
@@ -2509,11 +2509,11 @@
 	} found = { 0, 0 };
 
 	if (ast_opt_override_config) {
-		cfg = ast_config_load(ast_config_AST_CONFIG_FILE, config_flags);
+		cfg = ast_config_load2(ast_config_AST_CONFIG_FILE, "" /* core, can't reload */, config_flags);
 		if (!cfg)
 			ast_log(LOG_WARNING, "Unable to open specified master config file '%s', using built-in defaults\n", ast_config_AST_CONFIG_FILE);
 	} else 
-		cfg = ast_config_load(config, config_flags);
+		cfg = ast_config_load2(config, "" /* core, can't reload */, config_flags);
 
 	/* init with buildtime config */
 	ast_copy_string(cfg_paths.config_dir, DEFAULT_CONFIG_DIR, sizeof(cfg_paths.config_dir));
@@ -2756,7 +2756,7 @@
 	struct ast_flags cfg_flags = { 0 };
 	struct ast_variable *v;
 
-	if (!(cfg = ast_config_load("cli.conf", cfg_flags)))
+	if (!(cfg = ast_config_load2("cli.conf", "" /* core, can't reload */, cfg_flags)))
 		return;
 
 	fd = open("/dev/null", O_RDWR);

Modified: team/group/cdr_backend_ast_str/main/cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/main/cdr.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/main/cdr.c (original)
+++ team/group/cdr_backend_ast_str/main/cdr.c Fri Mar 28 11:28:34 2008
@@ -1330,7 +1330,7 @@
 	int res=0;
 	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 
-	if ((config = ast_config_load("cdr.conf", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
+	if ((config = ast_config_load2("cdr.conf", "cdr", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
 		return 0;
 
 	ast_mutex_lock(&cdr_batch_lock);

Modified: team/group/cdr_backend_ast_str/main/config.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/main/config.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/main/config.c (original)
+++ team/group/cdr_backend_ast_str/main/config.c Fri Mar 28 11:28:34 2008
@@ -878,7 +878,7 @@
 		cfmtime->who_asked = cfmtime->filename + strlen(configfile) + 1;
 		strcpy(cfmtime->who_asked, who_asked);
 		/* Note that the file mtime is initialized to 0, i.e. 1970 */
-		AST_LIST_INSERT_TAIL(&cfmtime_head, cfmtime, list);
+		AST_LIST_INSERT_SORTALPHA(&cfmtime_head, cfmtime, list, filename);
 	}
 
 	if (!stat(configfile, &statbuf))
@@ -1211,7 +1211,7 @@
 				cfmtime->who_asked = cfmtime->filename + strlen(fn) + 1;
 				strcpy(cfmtime->who_asked, who_asked);
 				/* Note that the file mtime is initialized to 0, i.e. 1970 */
-				AST_LIST_INSERT_TAIL(&cfmtime_head, cfmtime, list);
+				AST_LIST_INSERT_SORTALPHA(&cfmtime_head, cfmtime, list, filename);
 			}
 		}
 
@@ -1821,7 +1821,7 @@
 
 	configtmp = ast_config_new();
 	configtmp->max_include_level = 1;
-	config = ast_config_internal_load(extconfig_conf, configtmp, flags, "", "config.c");
+	config = ast_config_internal_load(extconfig_conf, configtmp, flags, "", "extconfig");
 	if (!config) {
 		ast_config_destroy(configtmp);
 		return 0;
@@ -2339,8 +2339,96 @@
 	return CLI_SUCCESS;
 }
 
+static char *handle_cli_config_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+{
+	struct cache_file_mtime *cfmtime;
+	char *prev = "", *completion_value = NULL;
+	int wordlen, which = 0;
+
+	switch (cmd) {
+	case CLI_INIT:
+		e->command = "config reload";
+		e->usage =
+			"Usage: config reload <filename.conf>\n"
+			"   Reloads all modules that reference <filename.conf>\n";
+		return NULL;
+	case CLI_GENERATE:
+		if (a->pos > 2) {
+			return NULL;
+		}
+
+		wordlen = strlen(a->word);
+
+		AST_LIST_LOCK(&cfmtime_head);
+		AST_LIST_TRAVERSE(&cfmtime_head, cfmtime, list) {
+			/* Skip duplicates - this only works because the list is sorted by filename */
+			if (strcmp(cfmtime->filename, prev) == 0) {
+				continue;
+			}
+
+			/* Core configs cannot be reloaded */
+			if (ast_strlen_zero(cfmtime->who_asked)) {
+				continue;
+			}
+
+			if (++which > a->n && strncmp(cfmtime->filename, a->word, wordlen) == 0) {
+				completion_value = ast_strdup(cfmtime->filename);
+				break;
+			}
+
+			/* Otherwise save that we've seen this filename */
+			prev = cfmtime->filename;
+		}
+		AST_LIST_UNLOCK(&cfmtime_head);
+
+		return completion_value;
+	}
+
+	if (a->argc != 3) {
+		return CLI_SHOWUSAGE;
+	}
+
+	AST_LIST_LOCK(&cfmtime_head);
+	AST_LIST_TRAVERSE(&cfmtime_head, cfmtime, list) {
+		if (!strcmp(cfmtime->filename, a->argv[2])) {
+			char *buf = alloca(strlen("module reload ") + strlen(cfmtime->who_asked) + 1);
+			sprintf(buf, "module reload %s", cfmtime->who_asked);
+			ast_cli_command(a->fd, buf);
+		}
+	}
+	AST_LIST_UNLOCK(&cfmtime_head);
+
+	return CLI_SUCCESS;
+}
+
+static char *handle_cli_config_list(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+{
+	struct cache_file_mtime *cfmtime;
+
+	switch (cmd) {
+	case CLI_INIT:
+		e->command = "config list";
+		e->usage =
+			"Usage: config list\n"
+			"   Show all modules that have loaded a configuration file\n";
+		return NULL;
+	case CLI_GENERATE:
+		return NULL;
+	}
+
+	AST_LIST_LOCK(&cfmtime_head);
+	AST_LIST_TRAVERSE(&cfmtime_head, cfmtime, list) {
+		ast_cli(a->fd, "%-20.20s %-50s\n", S_OR(cfmtime->who_asked, "core"), cfmtime->filename);
+	}
+	AST_LIST_UNLOCK(&cfmtime_head);
+
+	return CLI_SUCCESS;
+}
+
 static struct ast_cli_entry cli_config[] = {
 	AST_CLI_DEFINE(handle_cli_core_show_config_mappings, "Display config mappings (file names to config engines)"),
+	AST_CLI_DEFINE(handle_cli_config_reload, "Force a reload on modules using a particular configuration file"),
+	AST_CLI_DEFINE(handle_cli_config_list, "Show all files that have loaded a configuration file"),
 };
 
 int register_config_cli() 

Modified: team/group/cdr_backend_ast_str/main/dnsmgr.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/main/dnsmgr.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/main/dnsmgr.c (original)
+++ team/group/cdr_backend_ast_str/main/dnsmgr.c Fri Mar 28 11:28:34 2008
@@ -360,7 +360,7 @@
 	int was_enabled;
 	int res = -1;
 
-	if ((config = ast_config_load("dnsmgr.conf", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
+	if ((config = ast_config_load2("dnsmgr.conf", "dnsmgr", config_flags)) == CONFIG_STATUS_FILEUNCHANGED)
 		return 0;
 
 	/* ensure that no refresh cycles run while the reload is in progress */

Modified: team/group/cdr_backend_ast_str/main/dsp.c
URL: http://svn.digium.com/view/asterisk/team/group/cdr_backend_ast_str/main/dsp.c?view=diff&rev=111661&r1=111660&r2=111661
==============================================================================
--- team/group/cdr_backend_ast_str/main/dsp.c (original)
+++ team/group/cdr_backend_ast_str/main/dsp.c Fri Mar 28 11:28:34 2008
@@ -150,13 +150,13 @@
 #define FAX_2ND_HARMONIC	2.0     /* 4dB */
 #define DTMF_NORMAL_TWIST	6.3     /* 8dB */
 #ifdef	RADIO_RELAX
-#define DTMF_REVERSE_TWIST          ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 6.5 : 2.5)     /* 4dB normal */
+#define DTMF_REVERSE_TWIST          (relax ? 6.5 : 2.5)     /* 4dB normal */
 #else
-#define DTMF_REVERSE_TWIST          ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 4.0 : 2.5)     /* 4dB normal */
+#define DTMF_REVERSE_TWIST          (relax ? 4.0 : 2.5)     /* 4dB normal */
 #endif
 #define DTMF_RELATIVE_PEAK_ROW	6.3     /* 8dB */
 #define DTMF_RELATIVE_PEAK_COL	6.3     /* 8dB */
-#define DTMF_2ND_HARMONIC_ROW       ((digitmode & DSP_DIGITMODE_RELAXDTMF) ? 1.7 : 2.5)     /* 4dB normal */
+#define DTMF_2ND_HARMONIC_ROW       (relax ? 1.7 : 2.5)     /* 4dB normal */
 #define DTMF_2ND_HARMONIC_COL	63.1    /* 18dB */
 #define DTMF_TO_TOTAL_ENERGY	42.0
 
@@ -193,6 +193,16 @@
  */
 #define SAMPLES_IN_FRAME	160
 
+/* MF goertzel size */
+#define MF_GSIZE		120
+
+/* DTMF goertzel size */
+#define DTMF_GSIZE		102
+
+/* How many successive hits needed to consider begin of a digit */
+#define DTMF_HITS_TO_BEGIN	2
+/* How many successive misses needed to consider end of a digit */
+#define DTMF_MISSES_TO_END	3
 
 #define CONFIG_FILE_NAME "dsp.conf"
 
@@ -217,6 +227,7 @@
 	goertzel_state_t tone;
 	float energy;		/* Accumulated energy of the current block */
 	int samples_pending;	/* Samples remain to complete the current block */
+	int mute_samples;	/* How many additional samples needs to be muted to suppress already detected tone */
 

[... 1546 lines stripped ...]



More information about the svn-commits mailing list