[svn-commits] russell: branch russell/dundi_results r62266 - in /team/russell/dundi_results...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sat Apr 28 12:26:37 MST 2007


Author: russell
Date: Sat Apr 28 14:26:36 2007
New Revision: 62266

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62266
Log:
Merged revisions 62096,62140-62141,62172,62175,62219,62242,62264 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r62096 | oej | 2007-04-27 03:22:41 -0500 (Fri, 27 Apr 2007) | 2 lines

Blocking patch to 1.4 that was alredy in trunk

................
r62140 | oej | 2007-04-27 09:37:10 -0500 (Fri, 27 Apr 2007) | 20 lines

Merged revisions 62137 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r62137 | oej | 2007-04-27 16:04:07 +0200 (Fri, 27 Apr 2007) | 12 lines

Merged revisions 62126 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r62126 | oej | 2007-04-27 15:57:45 +0200 (Fri, 27 Apr 2007) | 4 lines

Issue #7351 - SIP Cancel fails due to the wrong contact uri. Reported by PPYY, failed to fix by OEJ
final fix by wojtekka - THANKS!!!! THis was a hard one to catch.


........

................

................
r62141 | oej | 2007-04-27 09:40:28 -0500 (Fri, 27 Apr 2007) | 2 lines

Issue #9545 Autocomplete for "sip unregister" cli command. (eliel) Thanks!

................
r62172 | russell | 2007-04-27 11:15:47 -0500 (Fri, 27 Apr 2007) | 14 lines

Merged revisions 62171 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62171 | russell | 2007-04-27 11:14:11 -0500 (Fri, 27 Apr 2007) | 6 lines

If no variables were passed into pbx_substitute_variables_helper_full(), then
don't even bother creating a temporary bogus channel, since that is only for
allowing certain functions to operate on the variables as if they were on a 
channel.  Most importantly, this fixes a crash.
(issue #9613, reported by callguy, fixed by me)

........

................
r62175 | qwell | 2007-04-27 11:18:51 -0500 (Fri, 27 Apr 2007) | 19 lines

Merged revisions 62174 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r62174 | qwell | 2007-04-27 11:17:46 -0500 (Fri, 27 Apr 2007) | 11 lines

Merged revisions 62173 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r62173 | qwell | 2007-04-27 11:16:16 -0500 (Fri, 27 Apr 2007) | 3 lines

This transcoder message needn't be a NOTICE.
I've seen it cause confusion more than a few times.

........

................

................
r62219 | russell | 2007-04-27 16:11:46 -0500 (Fri, 27 Apr 2007) | 19 lines

Merged revisions 62218 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62218 | russell | 2007-04-27 16:10:51 -0500 (Fri, 27 Apr 2007) | 11 lines

Fix a weird problem where when a caller talking to someone sitting behind an
agent channel sent a digit, the digit would be played to the agent for forever.
This is because chan_agent always returned -1 from its send_digit_begin and _end
callbacks.  This non-zero return value indicates to the Asterisk core that it
would like an inband DTMF generator put on the channel.  However, this is the
wrong thing to do.  It should *always* return 0, instead.  When the digit begin
and end functions are called on the proxied channel, the underlying channel
will indicate whether inband DTMF is needed or not, and the generator will be
put on that one, and not the Agent channel.
(issue #9615, #9616, reported by jiddings and BigJimmy, and fixed by me)

........

................
r62242 | russell | 2007-04-27 17:08:54 -0500 (Fri, 27 Apr 2007) | 5 lines

Add a min-announce-frequency option to queues.conf which allows you to control the
minimum amount of time between queue announcements for use when the caller's queue
position changes frequently.
(issue #9604, patch by Matthew Roth)

................
r62264 | russell | 2007-04-28 14:23:46 -0500 (Sat, 28 Apr 2007) | 2 lines

Remove a message that goes to LOG_ERROR that's not really an error.

................

Modified:
    team/russell/dundi_results/   (props changed)
    team/russell/dundi_results/CHANGES
    team/russell/dundi_results/apps/app_queue.c
    team/russell/dundi_results/channels/chan_agent.c
    team/russell/dundi_results/channels/chan_sip.c
    team/russell/dundi_results/codecs/codec_zap.c
    team/russell/dundi_results/configs/queues.conf.sample
    team/russell/dundi_results/include/asterisk/lock.h
    team/russell/dundi_results/main/pbx.c

Propchange: team/russell/dundi_results/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/russell/dundi_results/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/russell/dundi_results/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Apr 28 14:26:36 2007
@@ -1,1 +1,1 @@
-/trunk:1-62086
+/trunk:1-62265

Modified: team/russell/dundi_results/CHANGES
URL: http://svn.digium.com/view/asterisk/team/russell/dundi_results/CHANGES?view=diff&rev=62266&r1=62265&r2=62266
==============================================================================
--- team/russell/dundi_results/CHANGES (original)
+++ team/russell/dundi_results/CHANGES Sat Apr 28 14:26:36 2007
@@ -75,7 +75,25 @@
   * Added the ability to customize which sound files are used for some of the
      prompts within the Voicemail application by changing them in voicemail.conf
   * Added the ability for the "voicemail show users" CLI command to show users
-    configured by the dynamic realtime configuration method.
+     configured by the dynamic realtime configuration method.
+
+Queue changes
+-------------
+  * Added QUEUE_VARIABLES function to set queue variables added setqueuevar and 
+     setqueueentryvar options for each queue, see queues.conf.sample for details.
+  * Added keepstats option to queues.conf which will keep queue
+     statistics during a reload.
+  * setinterfacevar option in queues.conf also now sets a variable
+     called MEMBERNAME which contains the member's name.
+  * Added 'Strategy' field to manager event QueueParams which represents
+     the queue strategy in use. 
+  * Added option to run macro when a queue member is connected to a caller, 
+     see queues.conf.sample for details.
+  * app_queue now has a 'loose' option which is almost exactly like 'strict' except it
+     does not count paused queue members as unavailable.
+  * Added min-announce-frequency option to queues.conf which allows you to control the
+     minimum amount of time between queue announcements for use when the caller's queue
+     position changes frequently.
 
 Miscellaneous 
 -------------
@@ -97,16 +115,10 @@
      can use --with-cap to specify the path.
   * H323 remote hold notification support added (by NOTIFY message
      and/or H.450 supplementary service)
-  * Added keepstats option to queues.conf which will keep queue
-     statistics during a reload.
   * Added rotatetimestamp option to logger.conf which will use
      the time to name the logger files instead of sequence number.
-  * setinterfacevar option in queues.conf also now sets a variable
-     called MEMBERNAME which contains the member's name.
   * Added Masquerade manager event for when a masquerade happens between
      two channels.
-  * Added 'Strategy' field to manager event QueueParams which represents
-     the queue strategy in use. 
   * From the to-do lists: straighten out the app timeout args:
      Wait() app now really does 0.3 seconds- was truncating arg to an int.
      WaitExten() same as Wait().
@@ -117,14 +129,8 @@
      SpeechBackground() -- clarified in the docstrings that the timeout is an integer seconds.
   * Added 'C' option to Meetme which causes a caller to continue in the dialplan
      when kicked out.
-  * Added option to run macro when a queue member is connected to a caller, 
-     see queues.conf.sample for details.
-  * Added QUEUE_VARIABLES function to set queue variables added setqueuevar and 
-    setqueueentryvar options for each queue, see queues.conf.sample for details.
   * Brazilian Portuguese (pt-BR) in VM, and say.c was added via patch from cfassoni.
   * CID matching information is now shown when doing 'dialplan show'.
-  * app_queue now has a 'loose' option which is almost exactly like 'strict' except it
-     does not count paused queue members as unavailable.
   * Added maxfiles option to options section of asterisk.conf which allows you to specify
      what Asterisk should set as the maximum number of open files when it loads.
   * Added the jittertargetextra configuration option.

Modified: team/russell/dundi_results/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/russell/dundi_results/apps/app_queue.c?view=diff&rev=62266&r1=62265&r2=62266
==============================================================================
--- team/russell/dundi_results/apps/app_queue.c (original)
+++ team/russell/dundi_results/apps/app_queue.c Sat Apr 28 14:26:36 2007
@@ -116,6 +116,8 @@
 #define DEFAULT_TIMEOUT		15
 #define RECHECK			1		/* Recheck every second to see we we're at the top yet */
 #define MAX_PERIODIC_ANNOUNCEMENTS 10 /* The maximum periodic announcements we can have */
+#define DEFAULT_MIN_ANNOUNCE_FREQUENCY 15 /* The minimum number of seconds between position announcements
+                                             The default value of 15 provides backwards compatibility */
 
 #define	RES_OKAY	0		/* Action completed */
 #define	RES_EXISTS	(-1)		/* Entry already exists */
@@ -366,6 +368,7 @@
 	unsigned int maskmemberstatus:1;
 	unsigned int realtime:1;
 	int announcefrequency;              /*!< How often to announce their position */
+	int minannouncefrequency;           /*!< The minimum number of seconds between position announcements (def. 15) */
 	int periodicannouncefrequency;      /*!< How often to play periodic announcement */
 	int roundingseconds;                /*!< How many seconds do we round to? */
 	int holdtime;                       /*!< Current avg holdtime, based on recursive boxcar filter */
@@ -673,6 +676,7 @@
 	q->timeout = -1;
 	q->maxlen = 0;
 	q->announcefrequency = 0;
+	q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY;
 	q->announceholdtime = 0;
 	q->roundingseconds = 0; /* Default - don't announce seconds */
 	q->servicelevel = 0;
@@ -847,6 +851,9 @@
 		ast_copy_string(q->sound_reporthold, val, sizeof(q->sound_reporthold));
 	} else if (!strcasecmp(param, "announce-frequency")) {
 		q->announcefrequency = atoi(val);
+	} else if (!strcasecmp(param, "min-announce-frequency")) {
+		q->minannouncefrequency = atoi(val);
+		ast_log(LOG_DEBUG, "%s=%s for queue '%s'\n", param, val, q->name);
 	} else if (!strcasecmp(param, "announce-round-seconds")) {
 		q->roundingseconds = atoi(val);
 		if (q->roundingseconds>60 || q->roundingseconds<0) {
@@ -1308,9 +1315,9 @@
 	int res = 0, avgholdmins, avgholdsecs;
 	time_t now;
 
-	/* Check to see if this is ludicrous -- if we just announced position, don't do it again*/
+	/* Let minannouncefrequency seconds pass between the start of each position announcement */
 	time(&now);
-	if ((now - qe->last_pos) < 15)
+	if ((now - qe->last_pos) < qe->parent->minannouncefrequency)
 		return 0;
 
 	/* If either our position has changed, or we are over the freq timer, say position */

Modified: team/russell/dundi_results/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/russell/dundi_results/channels/chan_agent.c?view=diff&rev=62266&r1=62265&r2=62266
==============================================================================
--- team/russell/dundi_results/channels/chan_agent.c (original)
+++ team/russell/dundi_results/channels/chan_agent.c Sat Apr 28 14:26:36 2007
@@ -604,21 +604,19 @@
 static int agent_digit_begin(struct ast_channel *ast, char digit)
 {
 	struct agent_pvt *p = ast->tech_pvt;
-	int res = -1;
 	ast_mutex_lock(&p->lock);
 	ast_senddigit_begin(p->chan, digit);
 	ast_mutex_unlock(&p->lock);
-	return res;
+	return 0;
 }
 
 static int agent_digit_end(struct ast_channel *ast, char digit, unsigned int duration)
 {
 	struct agent_pvt *p = ast->tech_pvt;
-	int res = -1;
 	ast_mutex_lock(&p->lock);
 	ast_senddigit_end(p->chan, digit, duration);
 	ast_mutex_unlock(&p->lock);
-	return res;
+	return 0;
 }
 
 static int agent_call(struct ast_channel *ast, char *dest, int timeout)

Modified: team/russell/dundi_results/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/dundi_results/channels/chan_sip.c?view=diff&rev=62266&r1=62265&r2=62266
==============================================================================
--- team/russell/dundi_results/channels/chan_sip.c (original)
+++ team/russell/dundi_results/channels/chan_sip.c Sat Apr 28 14:26:36 2007
@@ -1408,7 +1408,9 @@
 static int sip_show_subscriptions(int fd, int argc, char *argv[]);
 static char *complete_sipch(const char *line, const char *word, int pos, int state);
 static char *complete_sip_peer(const char *word, int state, int flags2);
+static char *complete_sip_registered_peer(const char *word, int state, int flags2);
 static char *complete_sip_show_peer(const char *line, const char *word, int pos, int state);
+static char *complete_sip_unregister(const char *line, const char *word, int pos, int state);
 static char *complete_sip_debug_peer(const char *line, const char *word, int pos, int state);
 static char *complete_sip_user(const char *word, int state, int flags2);
 static char *complete_sip_show_user(const char *line, const char *word, int pos, int state);
@@ -6956,6 +6958,8 @@
 		dst->header[x] += offset;
 	for (x=0; x < src->lines; x++)
 		dst->line[x] += offset;
+	dst->rlPart1 += offset;
+	dst->rlPart2 += offset;
 }
 
 /*! \brief Used for 200 OK and 183 early media */
@@ -10955,7 +10959,10 @@
 #undef FORMAT2
 }
 
-/*! \brief Unregister (force expiration) a SIP peer in the registry via CLI */
+/*! \brief Unregister (force expiration) a SIP peer in the registry via CLI 
+	\note This function does not tell the SIP device what's going on,
+	so use it with great care.
+*/
 static int sip_unregister(int fd, int argc, char *argv[])
 {
 	struct sip_peer *peer;
@@ -10968,7 +10975,7 @@
 		expire_register(peer);
 		ast_cli(fd, "Unregistered peer \'%s\'\n\n", argv[2]);
 	} else {
-		ast_cli(fd, "Attempted to unregister an unknown peer \'%s\' via CLI\n", argv[2]);
+		ast_cli(fd, "Peer unknown: \'%s\'. Not unregistered.\n", argv[2]);
 	}
 	
 	return 0;
@@ -11229,6 +11236,24 @@
 	return result;
 }
 
+/*! \brief Do completion on registered peer name */
+static char *complete_sip_registered_peer(const char *word, int state, int flags2)
+{
+       char *result = NULL;
+       int wordlen = strlen(word);
+       int which = 0;
+
+       ASTOBJ_CONTAINER_TRAVERSE(&peerl, !result, do {
+               ASTOBJ_WRLOCK(iterator);
+               if (!strncasecmp(word, iterator->name, wordlen) &&
+                               (!flags2 || ast_test_flag(&iterator->flags[1], flags2)) &&
+                               ++which > state && iterator->expire > 0)
+                       result = ast_strdup(iterator->name);
+               ASTOBJ_UNLOCK(iterator);
+       } while(0) );
+       return result;
+}
+
 /*! \brief Support routine for 'sip show peer' CLI */
 static char *complete_sip_show_peer(const char *line, const char *word, int pos, int state)
 {
@@ -11236,6 +11261,15 @@
 		return complete_sip_peer(word, state, 0);
 
 	return NULL;
+}
+
+/*! \brief Support routine for 'sip unregister' CLI */
+static char *complete_sip_unregister(const char *line, const char *word, int pos, int state)
+{
+       if (pos == 2)
+               return complete_sip_registered_peer(word, state, 0);
+
+       return NULL;
 }
 
 /*! \brief Support routine for 'sip debug peer' CLI */
@@ -18106,7 +18140,7 @@
 
 	{ { "sip", "unregister", NULL },
 	sip_unregister, "Unregister (force expiration) a SIP peer from the registery\n",
-	sip_unregister_usage },
+	sip_unregister_usage, complete_sip_unregister },
 
 	{ { "sip", "show", "settings", NULL },
 	sip_show_settings, "Show SIP global settings",

Modified: team/russell/dundi_results/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/team/russell/dundi_results/codecs/codec_zap.c?view=diff&rev=62266&r1=62265&r2=62266
==============================================================================
--- team/russell/dundi_results/codecs/codec_zap.c (original)
+++ team/russell/dundi_results/codecs/codec_zap.c Sat Apr 28 14:26:36 2007
@@ -362,7 +362,7 @@
 
 	info.op = ZT_TCOP_GETINFO;
 	if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0) {
-		ast_log(LOG_NOTICE, "No Zaptel transcoder support!\n");
+		ast_log(LOG_DEBUG, "No Zaptel transcoder support!\n");
 		return 0;
 	}
 	for (info.tcnum = 0; !(res = ioctl(fd, ZT_TRANSCODE_OP, &info)); info.tcnum++) {

Modified: team/russell/dundi_results/configs/queues.conf.sample
URL: http://svn.digium.com/view/asterisk/team/russell/dundi_results/configs/queues.conf.sample?view=diff&rev=62266&r1=62265&r2=62266
==============================================================================
--- team/russell/dundi_results/configs/queues.conf.sample (original)
+++ team/russell/dundi_results/configs/queues.conf.sample Sat Apr 28 14:26:36 2007
@@ -167,9 +167,18 @@
 
 ; How often to announce queue position and/or estimated 
 ; holdtime to caller (0=off)
+; Note that this value is ignored if the caller's queue
+; position has changed (see min-announce-frequency)
 ;
 ;announce-frequency = 90 
 ;
+; The absolute minimum time between the start of each
+; queue position and/or estimated holdtime announcement
+; This is useful for avoiding constant announcements
+; when the caller's queue position is changing frequently
+; (see announce-frequency)
+;
+;min-announce-frequency = 15
 ;
 ; How often to make any periodic announcement (see periodic-announce)
 ;

Modified: team/russell/dundi_results/include/asterisk/lock.h
URL: http://svn.digium.com/view/asterisk/team/russell/dundi_results/include/asterisk/lock.h?view=diff&rev=62266&r1=62265&r2=62266
==============================================================================
--- team/russell/dundi_results/include/asterisk/lock.h (original)
+++ team/russell/dundi_results/include/asterisk/lock.h Sat Apr 28 14:26:36 2007
@@ -305,9 +305,6 @@
 			__ast_mutex_logger("%s line %d (%s): '%s' really deep reentrancy!\n",
 					   filename, lineno, func, mutex_name);
 		}
-	} else {
-		__ast_mutex_logger("%s line %d (%s): Warning: '%s' was locked here.\n",
-                                   t->file[t->reentrancy-1], t->lineno[t->reentrancy-1], t->func[t->reentrancy-1], mutex_name);
 	}
 
 	return res;

Modified: team/russell/dundi_results/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/russell/dundi_results/main/pbx.c?view=diff&rev=62266&r1=62265&r2=62266
==============================================================================
--- team/russell/dundi_results/main/pbx.c (original)
+++ team/russell/dundi_results/main/pbx.c Sat Apr 28 14:26:36 2007
@@ -1564,7 +1564,7 @@
 			parse_variable_name(vars, &offset, &offset2, &isfunction);
 			if (isfunction) {
 				/* Evaluate function */
-				if (c)
+				if (c || !headp)
 					cp4 = ast_func_read(c, vars, workspace, VAR_BUF_SIZE) ? NULL : workspace;
 				else {
 					struct varshead old;



More information about the svn-commits mailing list